diff --git a/dom/animation/AnimationPlayer.cpp b/dom/animation/AnimationPlayer.cpp index 6ac038b75ab..5e3037247d9 100644 --- a/dom/animation/AnimationPlayer.cpp +++ b/dom/animation/AnimationPlayer.cpp @@ -697,6 +697,9 @@ AnimationPlayer::UpdateFinishedState(bool aSeekFlag) } else if (!currentFinishedState && mIsPreviousStateFinished) { // Clear finished promise. We'll create a new one lazily. mFinished = nullptr; + if (mEffect->AsTransition()) { + mEffect->SetIsFinishedTransition(false); + } } mIsPreviousStateFinished = currentFinishedState; // We must recalculate the current time to take account of any mHoldTime diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index 24f71f12f47..2531b41452b 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -300,10 +300,10 @@ public: return mIsFinishedTransition; } - void SetIsFinishedTransition() { + void SetIsFinishedTransition(bool aIsFinished) { MOZ_ASSERT(AsTransition(), "Calling SetIsFinishedTransition but it's not a transition"); - mIsFinishedTransition = true; + mIsFinishedTransition = aIsFinished; } bool IsInPlay(const AnimationPlayer& aPlayer) const; diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index 6061e8e4400..63eaae79e06 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -831,7 +831,7 @@ nsTransitionManager::FlushTransitions(FlushFlags aFlags) // a non-animation style change that would affect it, we need // to know not to start a new transition for the transition // from the almost-completed value to the final value. - player->GetEffect()->SetIsFinishedTransition(); + player->GetEffect()->SetIsFinishedTransition(true); collection->UpdateAnimationGeneration(mPresContext); transitionStartedOrEnded = true; } else if ((computedTiming.mPhase ==