Changeset 255810 in webkit
- Timestamp:
- Feb 5, 2020 3:51:40 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r255787 r255810 1 2020-02-05 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Canceling an accelerated animation before it was committed does not prevent it from playing 4 https://bugs.webkit.org/show_bug.cgi?id=207253 5 <rdar://problem/59143624> 6 7 Reviewed by Antti Koivisto. 8 9 Add a new test that checks that an accelerated animation that has been enqueued to start but has 10 not yet been committed is correctly canceled when the cancel() method is called. This test fails 11 prior to this source change. 12 13 * webanimations/accelerated-animation-canceled-before-commit-expected.html: Added. 14 * webanimations/accelerated-animation-canceled-before-commit.html: Added. 15 1 16 2020-02-04 Lauro Moura <lmoura@igalia.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r255790 r255810 1 2020-02-05 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Canceling an accelerated animation before it was committed does not prevent it from playing 4 https://bugs.webkit.org/show_bug.cgi?id=207253 5 <rdar://problem/59143624> 6 7 Reviewed by Antti Koivisto. 8 9 Test: webanimations/accelerated-animation-canceled-before-commit.html 10 11 Merely checking whether an accelerated animation is running prior to enqueuing an action to cancel it is not sufficient 12 since there could be an uncommitted change to start it upon the next animation frame. The same logic would need to apply 13 in other situations where the playback state changes for a potentially in-flight animation. 14 15 * animation/KeyframeEffect.cpp: 16 (WebCore::KeyframeEffect::animationDidSeek): 17 (WebCore::KeyframeEffect::animationWasCanceled): 18 (WebCore::KeyframeEffect::willChangeRenderer): 19 (WebCore::KeyframeEffect::animationSuspensionStateDidChange): 20 1 21 2020-02-05 Philippe Normand <philn@igalia.com> 2 22 -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r255663 r255810 1386 1386 // There is no need to seek if we're not playing an animation already. If seeking 1387 1387 // means we're moving into an active lexicalGlobalObject, we'll pick this up in apply(). 1388 if (m_isRunningAccelerated )1388 if (m_isRunningAccelerated || isAboutToRunAccelerated()) 1389 1389 addPendingAcceleratedAction(AcceleratedAction::Seek); 1390 1390 } … … 1392 1392 void KeyframeEffect::animationWasCanceled() 1393 1393 { 1394 if (m_isRunningAccelerated )1394 if (m_isRunningAccelerated || isAboutToRunAccelerated()) 1395 1395 addPendingAcceleratedAction(AcceleratedAction::Stop); 1396 1396 } … … 1398 1398 void KeyframeEffect::willChangeRenderer() 1399 1399 { 1400 if (m_isRunningAccelerated )1400 if (m_isRunningAccelerated || isAboutToRunAccelerated()) 1401 1401 addPendingAcceleratedAction(AcceleratedAction::Stop); 1402 1402 } … … 1404 1404 void KeyframeEffect::animationSuspensionStateDidChange(bool animationIsSuspended) 1405 1405 { 1406 if (m_isRunningAccelerated )1406 if (m_isRunningAccelerated || isAboutToRunAccelerated()) 1407 1407 addPendingAcceleratedAction(animationIsSuspended ? AcceleratedAction::Pause : AcceleratedAction::Play); 1408 1408 }
Note: See TracChangeset
for help on using the changeset viewer.