New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make cancelAnimationFrame cancel pending callbacks #4375
Conversation
Calling cancelAnimationFrame from within a requestAnimationFrame callback should cancel any requestAnimationFrame callbacks that are pending for the current frame. The currently specified behavior does not permit that, however, since it clones the set of callbacks before iterating over them. This patch updates the algorithm to run animation frame callbacks such that it is possible to cancel a pending animation frame callback. This also brings the specified behavior into line with its implementation in Blink, EdgeHTML, and WebKit. This closes whatwg#4359.
Added a WPT in web-platform-tests/wpt#15455 |
I made my affiliation with Mozilla public but it's still telling me that I have not signed up to participate. |
@birtles I invited you to join Mozilla's GitHub organization for this. Once you join and make your membership public all will be in order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks great. I have a couple of nits, but I could fix those as well before merging. (I also took the liberty of updating your comment to point to the actual added tests.)
Have you filed a bug against Firefox already?
Great, thank you! I'll fix the nits tomorrow (unless you get to it first). |
Thanks Anne! |
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455 UltraBlame original commit: e7d92d3120c423087b25c70bdcd4c3696ae078a5
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455 UltraBlame original commit: 52a879d4e479200bddbe0bf3ee6b4c28e7d220de
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455 UltraBlame original commit: e7d92d3120c423087b25c70bdcd4c3696ae078a5
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455 UltraBlame original commit: 52a879d4e479200bddbe0bf3ee6b4c28e7d220de
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455 UltraBlame original commit: e7d92d3120c423087b25c70bdcd4c3696ae078a5
…e cancels a pending animation frame callback, a=testonly Automatic update from web-platform-tests HTML: cancelAnimationFrame cancels a pending animation frame callback For whatwg/html#4375. -- wpt-commits: bbbe615d3f5b7b44ed49b4b369f19d4c5dd32e53 wpt-pr: 15455 UltraBlame original commit: 52a879d4e479200bddbe0bf3ee6b4c28e7d220de
Calling cancelAnimationFrame from within a requestAnimationFrame
callback should cancel any requestAnimationFrame callbacks that are
pending for the current frame. The currently specified behavior does not
permit that, however, since it clones the set of callbacks before
iterating over them.
This patch updates the algorithm to run animation frame callbacks such
that it is possible to cancel a pending animation frame callback.
This also brings the specified behavior into line with its
implementation in Blink, EdgeHTML, and WebKit.
This closes #4359.
/imagebitmap-and-animations.html ( diff )
/infrastructure.html ( diff )