W3C home > Mailing lists > Public > public-web-perf@w3.org > January 2012

Re: [RequestAnimationFrame] requestAnimationFrame use in documents whose containing elements have no CSS box

From: James Robinson <jamesr@google.com>
Date: Tue, 3 Jan 2012 10:36:25 -0800
Message-ID: <CAD73mdLAb2MYrbHuhGMvF2KbVkgo_bSvd0ZyJSL1Tjs3yjmWEg@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-web-perf@w3.org
On Thu, Dec 22, 2011 at 8:30 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> Consider a testcase like this:
>
>  <iframe style="display: none"
>          src="some-document-using-**requestAnimationFrame">
>  </iframe>
>
> I believe that right now Gecko will not run the animation frame callbacks
> for that subdocument.  I'm guessing that WebKit will run them, based on
> brief code inspection.  What does IE do?
>
> The reason Gecko doesn't run them is that they're tied into the general
> "animation" infrastructure, which gets turned off in any situation in which
> styles cannot be computed.  And in documents whose viewport does not have a
> useful size (because the iframe has no CSS box at all), that's the case in
> Gecko.
>

That sounds like perfectly reasonable behavior.


>
> The obvious questions are:
>
> 1)  Does the spec allow this behavior?
>

Currently, no.


> 2)  If not, should it?
>

I believe it should.

3)  Should it require it?  (This would take a bit of thinking to define;
> the definition of what Gecko does is above: no request callbacks in a
> document whose containing element has no CSS box; there may be some
> weirdness with svg:foreignObject kids having boxes even if the
> foreignObject is display:none, of course.)


I think it should but I'm not sure how to do so. It would surprise me if
this concept is completely novel in the web platform, does nothing else
need this?  If this is novel, could you propose some spec text?  The most
obvious WebKit implementation would be based on a similar CSS box
implementation construct.

As an aside, I had hoped that the hidden attribute from DocumentVisibility
would define this but that's defined purely in terms of the top-level
browsing context of the document.  It'd be nice if the property we use is
something that authors can directly query.

- James


>
>
> -Boris
>
>
Received on Tuesday, 3 January 2012 18:36:53 UTC

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