[wp-trac] [WordPress Trac] #35894: Post embeds are useless with X-Frame-Options: SAMEORIGIN

WordPress Trac noreply at wordpress.org
Wed Feb 24 21:33:19 UTC 2016


#35894: Post embeds are useless with X-Frame-Options: SAMEORIGIN
-------------------------------------------------+-------------------------
 Reporter:  ethitter                             |       Owner:  swissspidy
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  4.4.3
Component:  Embeds                               |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing fixed-major  |     Focuses:
-------------------------------------------------+-------------------------

Comment (by swissspidy):

 Replying to [comment:10 ocean90]:
 > After [36648] Firefox doesn't display the site icon and featured image
 anymore. Restoring `source.style.display = '';` fixes it for @DrewAPicture
 and me.

 Restoring that line would basically be a revert of the fix.

 I think I tracked it down to this bug in Firefox:
 https://bugzilla.mozilla.org/show_bug.cgi?id=548397

 When an iframe is hidden using `display: none;`,
 `window.getComputedStyle()` is null and assets are not loaded because they
 don't have any width / height set.

 This can be avoided by using an alternate approach to initially hide the
 iframe, like `position: absolute; clip: rect(1px, 1px, 1px, 1px);`.

 Patch attached.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35894#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list