Bug 1070745 part 8 - Use play/pause from nsAnimationManager; r=dholbert
commit81c9d5cfcbb8aa90dbd216c48fa15842907159bd
authorBrian Birtles <birtles@gmail.com>
Mon, 20 Oct 2014 04:55:44 +0000 (20 13:55 +0900)
committerBrian Birtles <birtles@gmail.com>
Mon, 20 Oct 2014 04:55:44 +0000 (20 13:55 +0900)
tree6629f8052337112963aa7d5b7277e654c9e97f2a
parent3b9fd1bf92aaabeffd418f378ea2c8c5add7e772
Bug 1070745 part 8 - Use play/pause from nsAnimationManager; r=dholbert

This patch uses the PlayFromStyle/PauseFromStyle methods on CSSAnimationPlayer
to perform play/pause control. (This allows us to encapsulate mHoldTime and
mPaused. We will encapsulate mStartTime etc. in subsequent bugs.

The override behavior of play()/pause() with regard to animation-play-state is:
* pause()/play() override the current animation-play-state
* pause() causes the player to remain paused until play() is called regardless
  of changes to animation-play-state
(* Calling play() will override the animation-play-state but won't "stick". i.e.
   subsequently setting animation-play-state: paused will pause the animation.)

These different permutations are tested in the next patch in this series.

This interaction will probably become more complicated once we introduce
finishing behavior (since we might not want animations to restart when
setting animation-play-state: running).
dom/animation/AnimationPlayer.h
layout/style/nsAnimationManager.cpp