author | Brian Birtles <birtles@gmail.com> |
Fri, 27 Mar 2015 15:56:45 +0900 | |
changeset 236031 | bd35c507997e26e65ebb9cffd656fc8ec3c72224 |
parent 236030 | 7d0f03b20dbe4a34b5e0b50bc6114478459c3473 |
child 236032 | 7d8a20857b50140f0b10f13f4f44b51ad19b57be |
push id | 57572 |
push user | bbirtles@mozilla.com |
push date | Fri, 27 Mar 2015 06:57:17 +0000 |
treeherder | mozilla-inbound@ecac23a4d713 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jwatt |
bugs | 1109390 |
milestone | 39.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/animation/AnimationPlayer.cpp +++ b/dom/animation/AnimationPlayer.cpp @@ -344,17 +344,19 @@ AnimationPlayer::Cancel() mStartTime.SetNull(); UpdateSourceContent(); } bool AnimationPlayer::IsRunning() const { - if (IsPaused() || !GetSource() || GetSource()->IsFinishedTransition()) { + if (IsPausedOrPausing() || + !GetSource() || + GetSource()->IsFinishedTransition()) { return false; } ComputedTiming computedTiming = GetSource()->GetComputedTiming(); return computedTiming.mPhase == ComputedTiming::AnimationPhase_Active; } void
--- a/dom/animation/AnimationPlayer.h +++ b/dom/animation/AnimationPlayer.h @@ -186,27 +186,34 @@ public: * This method returns the start time, if resolved. Otherwise, if we have * a pending ready time, it returns the corresponding start time. If neither * of those are available, it returns null. */ Nullable<TimeDuration> GetCurrentOrPendingStartTime() const; void Cancel(); - const nsString& Name() const { + const nsString& Name() const + { return mSource ? mSource->Name() : EmptyString(); } - bool IsPaused() const { return PlayState() == AnimationPlayState::Paused; } + bool IsPausedOrPausing() const + { + return PlayState() == AnimationPlayState::Paused || + mPendingState == PendingState::PausePending; + } bool IsRunning() const; - bool HasCurrentSource() const { + bool HasCurrentSource() const + { return GetSource() && GetSource()->IsCurrent(); } - bool HasInEffectSource() const { + bool HasInEffectSource() const + { return GetSource() && GetSource()->IsInEffect(); } bool IsRelevant() const { return mIsRelevant; } void UpdateRelevance(); void SetIsRunningOnCompositor() { mIsRunningOnCompositor = true; } void ClearIsRunningOnCompositor() { mIsRunningOnCompositor = false; }
--- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -343,21 +343,22 @@ nsAnimationManager::CheckAnimationRule(n // Handle changes in play state. // CSSAnimationPlayer takes care of override behavior so that, // for example, if the author has called pause(), that will // override the animation-play-state. // (We should check newPlayer->IsStylePaused() but that requires // downcasting to CSSAnimationPlayer and we happen to know that // newPlayer will only ever be paused by calling PauseFromStyle - // making IsPaused synonymous in this case.) - if (!oldPlayer->IsStylePaused() && newPlayer->IsPaused()) { + // making IsPausedOrPausing synonymous in this case.) + if (!oldPlayer->IsStylePaused() && newPlayer->IsPausedOrPausing()) { oldPlayer->PauseFromStyle(); animationChanged = true; - } else if (oldPlayer->IsStylePaused() && !newPlayer->IsPaused()) { + } else if (oldPlayer->IsStylePaused() && + !newPlayer->IsPausedOrPausing()) { oldPlayer->PlayFromStyle(); animationChanged = true; } if (animationChanged) { nsNodeUtils::AnimationChanged(oldPlayer); }