mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1415780 - Call UpdateTiming() prior to remove the animtion from the timeline in Animation::CancelNoUpdate. r=birtles
Now AnimationEventDispatcher ensures that the refresh driver's next tick happens for cancel event, so we don't need to re-observe the timeline (it happens in UpdateTiming) once after removing the animation from the timeline. MozReview-Commit-ID: 7ivclmYIkPa --HG-- extra : rebase_source : 286b3d5d29208496bfe8405819b44b5f52f6671c
This commit is contained in:
parent
175bc2d176
commit
fedb7434fb
@ -804,21 +804,12 @@ Animation::CancelNoUpdate()
|
||||
mHoldTime.SetNull();
|
||||
mStartTime.SetNull();
|
||||
|
||||
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
|
||||
|
||||
if (mTimeline) {
|
||||
mTimeline->RemoveAnimation(this);
|
||||
}
|
||||
MaybeQueueCancelEvent(activeTime);
|
||||
|
||||
// When an animation is cancelled it no longer needs further ticks from the
|
||||
// timeline. However, if we queued a cancel event and this was the last
|
||||
// animation attached to the timeline, the timeline will stop observing the
|
||||
// refresh driver and there may be no subsequent refresh driver tick for
|
||||
// dispatching the queued event.
|
||||
//
|
||||
// By calling UpdateTiming *after* removing ourselves from our timeline, we
|
||||
// ensure the timeline will register with the refresh driver for at least one
|
||||
// more tick.
|
||||
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user