- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 02 May 2011 22:15:37 -0400
- To: Jonas Sicking <jonas@sicking.cc>
- CC: public-web-perf@w3.org, "Robert O'Callahan" <robert@ocallahan.org>
On 5/2/11 10:06 PM, Jonas Sicking wrote: > On the other hand, if you do want to implement the feature James is > talking about here, you'd end up with: > > 1) Resample declarative animations. > 2) Run animation frame callbacks if any. > 3) Process pending restyles, if any. > 4) Do relayout, if needed. > 5) If something with an animationcallback has been moved into the > screen, goto 2. Not quite, because if we require that things that are not in the viewport NOT have their animation frame callbacks called and that animation frame callbacks are called in order they were set up, then we need to do relayout before running animation frame callbacks for anything with an element attached in step 2. In other words, the algorithm would then need to look like this: 1) Resample declarative animations. 2) While (have animation frame callbacks that might need to run) I) If next callback has element, flush style and layout II) Run next callback 3) Process restyles. 4) Do relayout. or something. I would really like to avoid this situation. > However you would probably want to use some fuzzy logic so that > objects that are right on the edge, or just moved off the screen, > still get their callback called, Or something.... This is the complicated part. -Boris
Received on Tuesday, 3 May 2011 02:16:11 UTC