[whatwg] Simplified <picture> element draft

Ian Hickson ian at hixie.ch
Mon Mar 10 12:47:59 PDT 2014

On Tue, 7 Jan 2014, Yoav Weiss wrote:
> On Tue, Jan 7, 2014 at 6:20 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> > On 1/7/14 12:01 PM, Yoav Weiss wrote:
> >
> >> I'd love to get some more details regarding that. I'll start a 
> >> mozilla.dev.platform thread on the subject, since it's Gecko 
> >> specific.
> >
> > It's actually not entirely Gecko-specific.
> >
> > Consider a display:none iframe.  How should viewport-size-related 
> > media queries be evaluated in such a thing?  The specs don't define 
> > it, as far as I can tell.  In fact, the specs don't actually define 
> > anything useful for the viewport of a framed document at all, as far 
> > as I can see.  CSS just assumes a viewport exists, and HTML doesn't 
> > define anything about frames setting up a viewport for the document 
> > inside them...
> >
> > But say they defined it.  How would the viewport of a display:none 
> > iframe be defined, exactly?
> >
> > Last I checked, UAs just end up doing wildly different things in this 
> > situation.
> I agree that iframes complicate things, since the parent document's 
> external CSS can modify their viewport dimensions, so there's an 
> inherent race condition there.

It's sort of a race, but it settles, right?

> Since this case is not the majority case, we could bail out of it by 
> delaying the iframe's subresource loading that rely on viewport 
> dimensions until the parent's layout is considered "done" (e.g. all its 
> <head> CSS was parsed and applied)

The <iframe> can change dimensions long after that, still (e.g. if it's 
sized based on other content later in the page, as in a complex table).

I'm sure browsers can optimise a bit here, but it's not clear to me that 
there's anything we need to explicitly require.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list