mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1207951 - Fix buggy logic in ComposeStyle; r=heycam
This commit is contained in:
parent
9f7447f6cb
commit
ead24303e1
@ -617,11 +617,9 @@ Animation::ComposeStyle(nsRefPtr<AnimValuesStyleRule>& aStyleRule,
|
||||
// immediately before updating the style rule and then restore it immediately
|
||||
// afterwards. This is purely to prevent visual flicker. Other behavior
|
||||
// such as dispatching events continues to rely on the regular timeline time.
|
||||
bool updatedHoldTime = false;
|
||||
{
|
||||
AutoRestore<Nullable<TimeDuration>> restoreHoldTime(mHoldTime);
|
||||
bool updatedHoldTime = false;
|
||||
|
||||
AnimationPlayState playState = PlayState();
|
||||
|
||||
if (playState == AnimationPlayState::Pending &&
|
||||
mHoldTime.IsNull() &&
|
||||
@ -642,13 +640,16 @@ Animation::ComposeStyle(nsRefPtr<AnimValuesStyleRule>& aStyleRule,
|
||||
}
|
||||
|
||||
mEffect->ComposeStyle(aStyleRule, aSetProperties);
|
||||
|
||||
if (updatedHoldTime) {
|
||||
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
|
||||
}
|
||||
|
||||
mFinishedAtLastComposeStyle = (playState == AnimationPlayState::Finished);
|
||||
}
|
||||
|
||||
// Now that the hold time has been restored, update the effect
|
||||
if (updatedHoldTime) {
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(playState == PlayState(),
|
||||
"Play state should not change during the course of compositing");
|
||||
mFinishedAtLastComposeStyle = (playState == AnimationPlayState::Finished);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user