Re: [Page Visibility 2] Request for Comments

On 10/31/14, 12:18 AM, Michael Blain wrote:
> When a frame was off screen, it didn't fire rAFs.

Link to the testcase, please?  I'm aware of no such behavior in Gecko. 
The only times we flat out don't fire rAF are when the document is in a 
display:none subtree or when the document is .hidden and all hidden 
documents have been hidden for at least 10 minutes.  In all other cases 
we will fire it (though in some situations at a greatly reduced rate).

In particular, we do not follow the "hidden == no firing at all" bits of 
the rAF spec, pending our concerns about behavior aligning between rAF, 
transition/animation events, and SMIL events being addressed.

> 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.

Again, .hidden affects APIs other than rAF.

> That was why the attendees thought it would be OK to try and make the
> change first, and see if it brakes things later.

I look forward to the attendees shipping browsers with the changes they 
think are web-compatible.  Then we can evaluate.

> 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.

Yes, but if .hidden controls whether other APIs actually work or not, 
then the only way to get basic interop is to have browsers actually 
agree on when it's set.

So you have two options, in my opinion: either divorce .hidden from 
other APIs, and have it be a best-effort thing, or actually define its 
behavior if other APIs are supposed to depend on it.

> I think that part could be up for debate. if rAF isn't the only API
> affected

It's certainly not.  This has been pointed out several times now.

-Boris

Received on Friday, 31 October 2014 04:36:29 UTC