Commit Graph

5 Commits

Author SHA1 Message Date
Brian Birtles
197cde67e9 Bug 1112480 part 6 - Make PendingPlayerTracker call StartOnNextTick; r=jwatt
This patch switches on the new, "actually start the player in the next refresh
driver tick" behavior. It updates PendingPlayerTracker, adding
a StartPendingPlayersOnNextTick method which calls the appropriate method on
AnimationPlayer. The existing StartPendingPlayers is renamed to
StartPendingPlayersNow and is used for testing only.

Furthermore, since we now expect AnimationPlayer::StartOnNextTick to be
functional, AnimationPlayer::DoPlay is updated to use it when there is no
document available. This should make playing an animation player always
asynchronous, that is, always transition to the pending state temporarily
(unless we are already playing).
2015-01-09 07:57:58 +09:00
Brian Birtles
b9e7ffb4b3 Bug 927349 part 15 - Schedule a paint when a new pending animation is added; r=jwatt
We would like to trigger animations from the point when the first frame of the
animation is painted. However, some animations will never trigger a paint (e.g.
animations with an empty keyframes rule). These animations should start start
however. To ensure this, whenever an animation is newly pending we schedule
a paint.
2014-12-22 09:35:41 +09:00
Brian Birtles
5243b86e0a Bug 927349 part 14 - Store reference to owning document on PendingPlayerTracker; r=jwatt
This patch adds a reference from PendingPlayerTracker back to the document
object that owns it. This is used in the next patch in this series to find the
document's root frame for scheduling a paint.
2014-12-22 09:35:41 +09:00
Brian Birtles
0c11a79bec Bug 927349 part 9 - Add PendingPlayerTracker::StartPendingPlayers; r=jwatt 2014-12-22 09:35:41 +09:00
Brian Birtles
9b03999995 Bug 927349 part 1 - Add PendingPlayerTracker; r=jwatt
This patch adds a hashtable to nsDocument that stores all the animation players
that are currently waiting to start. In the future it may also be used to store
players that are waiting to pause which is why the methods are called
AddPlayPending/RemovePlayPending instead of just AddPlayer/RemovePlayer.
2014-12-18 08:42:41 +09:00