[Webkit-unassigned] [Bug 100257] Don't fire requestAnimationFrame for scripts in frames that are out of view

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 9 09:31:40 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=100257





--- Comment #16 from Nick Johnson <nick at spider.io>  2012-11-09 09:33:17 PST ---
(In reply to comment #15)
> (In reply to comment #14)
> > Is it your position that it's better to have no patch than this one? It seems to me that a better approach would be to land this patch now, and implement a better solution later, since this patch provides a performance improvement - just one that isn't as great as it could potentially be.
> 
> Do you know of any actual pages that would benefit from this performance improvement?

In practice, there are few pages currently using requestAnimationFrame, since it's not widespread yet.

In principle, any animated advert in an IFrame (which is most of them) would benefit from this if the ad used requestAnimationFrame.

> 
> What does the page visibility API do for out-of-view iframes?

Per the spec (http://www.w3.org/TR/page-visibility/#sec-document-interface):

"On getting, the hidden attribute MUST return true if the Document contained by the top level browsing context (root window in the browser's viewport) [HTML5] is not visible at all. The attribute MUST return false if the Document contained by the top level browsing context is at least partially visible on at least one screen."

So as it stands, it conveys visibility information only for the top level document, not for any nested documents. I don't believe there's any assumption that the Document.hidden property will correlate with the status of a requestAnimationFrame callback anywhere, though.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list