[whatwg] Simplified <picture> element draft

Yoav Weiss yoav at yoav.ws
Tue Jan 7 13:28:57 PST 2014


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.
But this is an issue that applies to any solution that relies on viewport
dimensions for resource loading.
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)



More information about the whatwg mailing list