This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16380 - Define what happens if content is in a display: none iframe
Summary: Define what happens if content is in a display: none iframe
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 21:04 UTC by Aryeh Gregor
Modified: 2013-08-08 13:28 UTC (History)
1 user (show)

See Also:


Attachments

Description Aryeh Gregor 2012-03-14 21:04:27 UTC
Lots of stuff refers to the viewport or initial containing block.  It's not clear whether these exist in a display: none iframe.  Here's a test-case that illustrates a problem that just bit me:

data:text/html,<!doctype html>
<iframe style="display:none"
onload="this.style.display = ''"
src='data:text/html,<!doctype html>
<body style="height:1000px">
<script>scroll(0,200)</script>
'></iframe>

In Firefox 14.0a1 and Chrome 19 dev, the iframe isn't scrolled.  In Opera Next 12.00 alpha, it is.  IE 10 Developer Preview doesn't support data: as the source for iframes, but I think it's not scrolled here.  But a similar case in Chrome did scroll.  What should happen here?
Comment 1 Glenn Adams 2012-08-03 05:55:19 UTC
reassign to myself; apparently i am not the default assignee for this component
Comment 2 Simon Pieters 2013-05-15 10:51:52 UTC
I think I'll hook into HTML's "being rendered" for this, and I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=22040 to make it cover the display:none iframe case.
Comment 3 Simon Pieters 2013-05-16 13:00:26 UTC
(Turns out I didn't need "being rendered".)

https://dvcs.w3.org/hg/csswg/rev/a3aa467d947d