mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1150288 - Restore old behavior of mIsPreviousStateFinished into a new variable, since we need it in CanThrottle. r=birtles
(I don't understand the motivation for the changes to how it was set, but this just switches to having two variables for the two uses.) This fixes the test failures in test_animations_omta.html with OMT animations enabled.
This commit is contained in:
parent
2f6554bf7c
commit
953d3f8dfc
@ -406,7 +406,7 @@ AnimationPlayer::CanThrottle() const
|
||||
// finishing, we need an unthrottled sample so we can apply the correct
|
||||
// end-of-animation behavior on the main thread (either removing the
|
||||
// animation style or applying the fill mode).
|
||||
return mIsPreviousStateFinished;
|
||||
return mFinishedAtLastComposeStyle;
|
||||
}
|
||||
|
||||
void
|
||||
@ -462,7 +462,9 @@ AnimationPlayer::ComposeStyle(nsRefPtr<css::AnimValuesStyleRule>& aStyleRule,
|
||||
AutoRestore<Nullable<TimeDuration>> restoreHoldTime(mHoldTime);
|
||||
bool updatedHoldTime = false;
|
||||
|
||||
if (PlayState() == AnimationPlayState::Pending &&
|
||||
AnimationPlayState playState = PlayState();
|
||||
|
||||
if (playState == AnimationPlayState::Pending &&
|
||||
mHoldTime.IsNull() &&
|
||||
!mStartTime.IsNull()) {
|
||||
Nullable<TimeDuration> timeToUse = mPendingReadyTime;
|
||||
@ -485,6 +487,8 @@ AnimationPlayer::ComposeStyle(nsRefPtr<css::AnimValuesStyleRule>& aStyleRule,
|
||||
if (updatedHoldTime) {
|
||||
UpdateTiming();
|
||||
}
|
||||
|
||||
mFinishedAtLastComposeStyle = (playState == AnimationPlayState::Finished);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
, mPendingState(PendingState::NotPending)
|
||||
, mIsRunningOnCompositor(false)
|
||||
, mIsPreviousStateFinished(false)
|
||||
, mFinishedAtLastComposeStyle(false)
|
||||
, mIsRelevant(false)
|
||||
{
|
||||
}
|
||||
@ -332,6 +333,7 @@ protected:
|
||||
// Indicates whether we were in the finished state during our
|
||||
// most recent unthrottled sample (our last ComposeStyle call).
|
||||
bool mIsPreviousStateFinished; // Spec calls this "previous finished state"
|
||||
bool mFinishedAtLastComposeStyle;
|
||||
// Indicates that the animation should be exposed in an element's
|
||||
// getAnimations() list.
|
||||
bool mIsRelevant;
|
||||
|
Loading…
Reference in New Issue
Block a user