Bug 927349 part 5 - Cancel players that are no longer used; r=jwatt
commit9fdafb68a4bd87614ec71fc13122e030c7b68e2b
authorBrian Birtles <birtles@gmail.com>
Wed, 17 Dec 2014 23:42:41 +0000 (18 08:42 +0900)
committerBrian Birtles <birtles@gmail.com>
Wed, 17 Dec 2014 23:42:41 +0000 (18 08:42 +0900)
treea2d9688dd283ab339fd0fd5bf6243d4671a99fb0
parentc91b2dea434d9dd1c97b8a63b2468a267c7144ee
Bug 927349 part 5 - Cancel players that are no longer used; r=jwatt

This patch adds a means of terminating an animation so that is has no effect.
The procedure is defined by Web Animations:

  http://w3c.github.io/web-animations/#cancelling-a-player-section

We don't implement all of this, however, since we don't currently support the
finished promise or custom effects.

In a later bug we will expose this as the cancel() method on AnimationPlayer.

We call this method for terminated animations in nsAnimationManager and
nsTransitionManager to ensure they get removed from the pending player tracker
and so that, for example, the ready promise of CSS Animation player objects is
rejected when the corresponding item is removed from animation-name.
dom/animation/AnimationPlayer.cpp
dom/animation/AnimationPlayer.h
layout/style/AnimationCommon.h
layout/style/nsAnimationManager.cpp
layout/style/nsTransitionManager.cpp