W3C home > Mailing lists > Public > public-web-perf@w3.org > April 2013

Re: requestAnimationFrame behavior on display:none iframes

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 10 Apr 2013 20:45:48 -0400
Message-ID: <516607BC.7050501@mit.edu>
To: James Robinson <jamesr@google.com>
CC: "public-web-perf@w3.org" <public-web-perf@w3.org>
On 4/10/13 6:32 PM, James Robinson wrote:
> 1.) Gmail loads up a large portion of its script in an iframe styled to
> be 0x0.  While this iframe is not display:none, it's hidden for any
> practical definition of hidden.

That's not quite true.

For example, it has a well-defined CSS viewport and hence can do media 
queries and selector matching and other CSS things, unlike a 
display:none iframe...

> If animations on hidden iframes did not tick, script that ran inside this
> iframe would not be able to animate parts of the rest of gmail UI.  I
> think this behavior would be broken.

You could make the same argument about scripts in one tab that try to 
script another one that they opened, no?

> The common problem here is that the visibility of the document
> associated with the global context that requestAnimationFrame is picked
> up from is a poor proxy for the visibility of the thing the author is
> actually trying to animate.

But that's not iframe-specific.

> context and document a bit more explicit, but it's possible that
> wouldn't have helped.

I doubt it would have changed how authors think about it.

In any case, I doubt that at this point we're going to agree on this 

Received on Thursday, 11 April 2013 00:46:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:35 UTC