diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-10 15:31:59 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-17 13:35:59 -0800 |
commit | 28040489d744e0c5d475a88663056c9040ed5320 (patch) | |
tree | c463676791e4a63e452a95f0a12b2a8519730693 /WebCore/page/animation/AnimationBase.cpp | |
parent | eff9be92c41913c92fb1d3b7983c071f3e718678 (diff) | |
download | external_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2 |
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/page/animation/AnimationBase.cpp')
-rw-r--r-- | WebCore/page/animation/AnimationBase.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/WebCore/page/animation/AnimationBase.cpp b/WebCore/page/animation/AnimationBase.cpp index ade68b5..ad5257e 100644 --- a/WebCore/page/animation/AnimationBase.cpp +++ b/WebCore/page/animation/AnimationBase.cpp @@ -1206,10 +1206,17 @@ void AnimationBase::fireAnimationEventsIfNeeded() } } -void AnimationBase::updatePlayState(bool run) +void AnimationBase::updatePlayState(EAnimPlayState playState) { - if (paused() == run || isNew()) - updateStateMachine(run ? AnimationStateInputPlayStateRunning : AnimationStateInputPlayStatePaused, -1); + // When we get here, we can have one of 4 desired states: running, paused, suspended, paused & suspended. + // The state machine can be in one of two states: running, paused. + // Set the state machine to the desired state. + bool pause = playState == AnimPlayStatePaused || m_compAnim->suspended(); + + if (pause == paused() && !isNew()) + return; + + updateStateMachine(pause ? AnimationStateInputPlayStatePaused : AnimationStateInputPlayStateRunning, -1); } double AnimationBase::timeToNextService() |