W3C home > Mailing lists > Public > public-web-perf@w3.org > May 2011

[AnimationRequestFrame] Sample all animations operation and cancelRequestAnimationFrame specification updated

From: James Robinson <jamesr@google.com>
Date: Tue, 3 May 2011 19:15:14 -0700
Message-ID: <BANLkTi=-VhyXtCZZruP3_QDVd_G1qmo8wQ@mail.gmail.com>
To: public-web-perf@w3.org
I've updated the spec at
http://dvcs.w3.org/hg/webperf/raw-file/f1abd45b5641/specs/AnimationRequestFrame/Overview.html
to
address Boris' quibbles from this email
http://lists.w3.org/Archives/Public/public-web-perf/2011May/0016.html about
how cancellation and the invoke all callbacks algorithm interact.  This
version does not handle element visibility checks at all as I'd like for us
to figure out what behavior we want before specifying it.  These are the
properties that I'm trying to preserve, please let me know if this isn't
what we want or if I haven't actually specified what I mean:

- Callbacks registered outside of the "sample all animation" operation
should immediately be eligible to run.
- Callbacks registered during the "sample all animations" operation should
run the next time the browser samples animations.
- A callback should never run after it has been cancelled, regardless of
when it gets cancelled.

I think this is the least surprising behavior for developers.  In the spec
this is specified using a copy of the callback list and a cancellation flag,
but implementations can of course do something simpler that has the same
behavior (such as immediately remove the callback from whatever list it is
in).  The copy stuff will likely be necessary when we add the element
visibility checks in so I've left it specified that way for now.

- James
Received on Wednesday, 4 May 2011 02:15:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 4 May 2011 02:15:41 GMT