- From: Michael Blain <mpb@google.com>
- Date: Fri, 31 Oct 2014 00:18:36 -0400
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: public-web-perf@w3.org
- Message-ID: <CAKZ0ab9a3Or32sptZi+jH7+XNvQELBAsF=1NF-yPV8xsW9sO=g@mail.gmail.com>
Thanks for your thoughts, and my apologies for making you repeat them. Mozilla seems ahead of the curve already (at least in the build that Pan showed us, I believe it was vanilla though.) When a frame was off screen, it didn't fire rAFs. Still said .hidden was false though. I think if Mozilla could just set the .hidden property based on whatever mechanism is controlling suppressing those rAFs, you guys would be good to go. That was why the attendees thought it would be OK to try and make the change first, and see if it brakes things later. The pages would already be broken in Firefox. The reason the spec steered clear of using MUST in terms of setting .hidden = true is because there are many situations and edge-cases where the browser might not know (without extra effort) for CERTAIN that something is visible. Maybe another window is in front of the browser, maybe some CSS transform actually ends up rotating or transposing it in a way which happens not to result in any pixels being drawn, etc. Some attendees were trying to address the situation of a chat message, and actually marking it read only if it was up on screen. But basically, we wanted to say if the browser definitely knows it's visible, say hidden=false. If it's definitely not visible, hidden=true. If you're not sure, for any reason.. err on the side of hidden=false. For energy-saving reasons, that translated into some people wanting to avoid rAF (and maybe others?) for frames that are definitely not viewable. I think that part could be up for debate. if rAF isn't the only API affected, and if this could seriously impact existing pages, maybe we want to let people say via a META tag that they want to prevent this behavior ("hidden frames still run script", e.g.) Thanks, -Mike On Thu, Oct 30, 2014 at 11:58 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote: > On 10/30/14, 11:46 PM, Boris Zbarsky wrote: > >> In term's of Mozilla's implementation, what I will probably be >> recommending internally is that we not change our behavior at all >> > > Though I'm probably willing to be convinced otherwise for display:none > iframes specifically. But even there, I worry about compat impacts on > things like vibration API... > > -Boris > >
Received on Friday, 31 October 2014 04:19:03 UTC