Changeset 243374 in webkit
- Timestamp:
- Mar 22, 2019 6:46:56 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r243372 r243374 1 2019-03-22 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::WebAnimation::timeToNextTick const + 757 4 https://bugs.webkit.org/show_bug.cgi?id=196125 5 <rdar://problem/46520059> 6 7 Reviewed by Dean Jackson. 8 9 Because of floating point math in playState() that wouldn't account for timeEpsilon, we would get into a state where the animation phase 10 was "after" but the play state was "running" when the current time was about a microsecond away from the active time boundary. This meant 11 that the early return statement in WebAnimation::timeToNextTick() would not be hit while we would not handle the possibility of being in 12 the "after" phase in the rest of the function, therefore eventually hitting the ASSERT_NOT_REACHED() at the end of the function. 13 14 We now account for timeEpsilon in playState() and correctly report we're in the "finished" play state when in the "after" phase also. 15 16 * animation/WebAnimation.cpp: 17 (WebCore::WebAnimation::playState const): 18 1 19 2019-03-22 Alicia Boya García <aboya@igalia.com> 2 20 -
trunk/Source/WebCore/animation/WebAnimation.cpp
r243346 r243374 529 529 // animation's effective playback rate < 0 and current time ≤ 0, 530 530 // → finished 531 if (animationCurrentTime && ((effectivePlaybackRate() > 0 && animationCurrentTime.value() >= effectEndTime()) || (effectivePlaybackRate() < 0 && animationCurrentTime.value() <= 0_s)))531 if (animationCurrentTime && ((effectivePlaybackRate() > 0 && (*animationCurrentTime + timeEpsilon) >= effectEndTime()) || (effectivePlaybackRate() < 0 && (*animationCurrentTime - timeEpsilon) <= 0_s))) 532 532 return PlayState::Finished; 533 533
Note: See TracChangeset
for help on using the changeset viewer.