diff --git a/dom/animation/AnimationPlayer.h b/dom/animation/AnimationPlayer.h index 1ca074383af4..fb29b68d1a99 100644 --- a/dom/animation/AnimationPlayer.h +++ b/dom/animation/AnimationPlayer.h @@ -234,8 +234,11 @@ public: */ bool IsPlaying() const { - return HasInPlaySource() && // Check we are in the active interval - PlayState() == AnimationPlayState::Running; // And not paused + // We need to have a source animation in its active interval, and + // be either running or waiting to run. + return HasInPlaySource() && + (PlayState() == AnimationPlayState::Running || + mPendingState == PendingState::PlayPending); } bool IsRelevant() const { return mIsRelevant; }