mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
51fed648c3
The assertion in nsTimeStamp::operator >= occasionally fails due to a null RHS timestamp when called from AnimationPlayer::GetCurrentTimeDuration, which, in turn, is called from AnimationPlayer::SetSource. The issue appears to be that we're not correctly initializing AnimationPlayer.mPlayState. This value can be running (0) or paused (1) but we only ever compare against the paused state (i.e. every other value is effectively treated as running). If we don't initialize this we can end up in the paused state but with mPauseStart not set to a valid (non-null) TimeStamp. This creates an inconsistent state since we assume that when we're paused mPauseStart is non-null, hence the assertion fails. This gets tickled because, since bug 1040543, we call AnimationPlayer::SetSource from nsAnimationManager::BuildAnimations *before* we set mPlayState and mPauseStart. This patch initializes mPlayState to the running state so we don't accidentally end up in an inconsistent state. It also removes some (now unnecessary) initialization of mPlayState and mPauseStart from nsTransitionManager::ConsiderStartingTransition. In future we could also consider reworking nsAnimationManager::BuildAnimations so that we call SetSource on the new animation player *after* setting up its play state. That may be more correct and would further avoid this problem but may not be necessary since all that code is likely to change in the near future. |
||
---|---|---|
.. | ||
test | ||
Animation.cpp | ||
Animation.h | ||
AnimationPlayer.cpp | ||
AnimationPlayer.h | ||
AnimationTimeline.cpp | ||
AnimationTimeline.h | ||
moz.build |