Changeset 233325 in webkit
- Timestamp:
- Jun 28, 2018 2:13:16 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r233312 r233325 1 2018-06-28 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Make imported/mozilla/css-animations/test_animation-starttime.html pass reliably 4 https://bugs.webkit.org/show_bug.cgi?id=183834 5 <rdar://problem/40997932> 6 7 Reviewed by Dean Jackson. 8 9 This test now passes reliably so we remove any specific expectation. Another test needed to be modified to account for 10 the pending state being updated at a different time, so we just wait a frame to ensure the animation is started. 11 12 * TestExpectations: 13 * compositing/visible-rect/animated.html: 14 1 15 2018-06-28 Jer Noble <jer.noble@apple.com> 2 16 -
trunk/LayoutTests/TestExpectations
r233292 r233325 1964 1964 webkit.org/b/181888 imported/w3c/web-platform-tests/web-animations/timing-model/animation-effects/current-iteration.html [ Pass Failure ] 1965 1965 1966 webkit.org/b/183834 imported/mozilla/css-animations/test_animation-starttime.html [ Pass Failure Timeout ]1967 1966 webkit.org/b/183836 imported/mozilla/css-animations/test_animations-dynamic-changes.html [ Pass Failure Timeout ] 1968 1967 webkit.org/b/183837 imported/mozilla/css-transitions/test_document-get-animations.html [ Pass Failure Timeout ] -
trunk/LayoutTests/compositing/visible-rect/animated.html
r231977 r233325 35 35 { 36 36 document.getElementById('animated').addEventListener('webkitAnimationStart', function() { 37 if (window.internals) 38 document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS) 37 requestAnimationFrame(() => { 38 if (window.internals) 39 document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS) 39 40 40 if (window.testRunner) 41 testRunner.notifyDone(); 41 if (window.testRunner) 42 testRunner.notifyDone(); 43 }); 42 44 }, false); 43 45 } -
trunk/LayoutTests/imported/mozilla/ChangeLog
r233141 r233325 1 2018-06-28 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Make imported/mozilla/css-animations/test_animation-starttime.html pass reliably 4 https://bugs.webkit.org/show_bug.cgi?id=183834 5 <rdar://problem/40997932> 6 7 Reviewed by Dean Jackson. 8 9 Mark progressions in the Mozilla CSS Animations tests. 10 11 * css-animations/test_animation-starttime-expected.txt: 12 1 13 2018-06-25 Antoine Quint <graouts@apple.com> 2 14 -
trunk/LayoutTests/imported/mozilla/css-animations/test_animation-starttime-expected.txt
r229864 r233325 7 7 PASS startTime while play-pending from finished state 8 8 PASS startTime while play-pending from finished state using finish() 9 FAIL Pausing should make the startTime become null assert_true: After the animation has started, startTime is greater than the time when it was started expected true got false 9 PASS Pausing should make the startTime become null 10 10 PASS Sanity test to check round-tripping assigning to a new animation's startTime 11 11 PASS Skipping forward through animation -
trunk/Source/WebCore/ChangeLog
r233324 r233325 1 2018-06-28 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Make imported/mozilla/css-animations/test_animation-starttime.html pass reliably 4 https://bugs.webkit.org/show_bug.cgi?id=183834 5 <rdar://problem/40997932> 6 7 Reviewed by Dean Jackson. 8 9 We need to run pending tasks in the "update animations" procedure to ensure that the start time has been set 10 to a different time than the timeline time at the time the animation was asked to play(). This ensure the 11 timeline current time has progressed and can be queried to a different value in a requestAnimationFrame() 12 callback. 13 14 When invalidating events, we need to make sure we disregard instances when an animation has and is still pending 15 so that we wait until we change the pending state to work out which events to enqueue. 16 17 * animation/DeclarativeAnimation.cpp: 18 (WebCore::DeclarativeAnimation::invalidateDOMEvents): 19 * animation/DocumentTimeline.cpp: 20 (WebCore::DocumentTimeline::updateAnimations): 21 * animation/WebAnimation.cpp: 22 (WebCore::WebAnimation::updatePendingTasks): 23 (WebCore::WebAnimation::timeToNextRequiredTick const): 24 (WebCore::WebAnimation::runPendingTasks): 25 * animation/WebAnimation.h: 26 1 27 2018-06-28 Ryosuke Niwa <rniwa@webkit.org> 2 28 -
trunk/Source/WebCore/animation/DeclarativeAnimation.cpp
r232946 r233325 122 122 123 123 auto isPending = pending(); 124 if (isPending && m_wasPending) 125 return; 126 124 127 auto iteration = animationEffect ? animationEffect->currentIteration().value_or(0) : 0; 125 128 auto currentPhase = animationEffect ? animationEffect->phase() : phaseWithoutEffect(); -
trunk/Source/WebCore/animation/DocumentTimeline.cpp
r233140 r233325 233 233 void DocumentTimeline::updateAnimations() 234 234 { 235 for (const auto& animation : animations()) 236 animation->runPendingTasks(); 237 235 238 if (m_document && hasElementAnimations()) { 236 239 for (const auto& elementToAnimationsMapItem : elementToAnimationsMap()) -
trunk/Source/WebCore/animation/WebAnimation.cpp
r233196 r233325 989 989 void WebAnimation::updatePendingTasks() 990 990 { 991 if (hasPendingPauseTask() && is<DocumentTimeline>(m_timeline)) {992 if (auto document = downcast<DocumentTimeline>(*m_timeline).document()) {993 document->postTask([this, protectedThis = makeRef(*this)] (auto&) {994 if (this->hasPendingPauseTask() && m_timeline)995 this->runPendingPauseTask();996 });997 }998 }999 1000 // FIXME: This should only happen if we're ready, at the moment we think we're ready if we have a timeline.1001 if (hasPendingPlayTask() && is<DocumentTimeline>(m_timeline)) {1002 if (auto document = downcast<DocumentTimeline>(*m_timeline).document()) {1003 document->postTask([this, protectedThis = makeRef(*this)] (auto&) {1004 if (this->hasPendingPlayTask() && m_timeline)1005 this->runPendingPlayTask();1006 });1007 }1008 }1009 1010 991 timingModelDidChange(); 1011 992 } … … 1015 996 // If we don't have a timeline, an effect, a start time or a playback rate other than 0, 1016 997 // there is no value to apply so we don't need to schedule invalidation. 1017 if (!m_timeline || !m_effect || !m_ startTime || !m_playbackRate)998 if (!m_timeline || !m_effect || !m_playbackRate) 1018 999 return Seconds::infinity(); 1019 1000 1020 // If we're in the running state, we need to schedule invalidation as soon as possible. 1021 if (playState() == PlayState::Running) 1001 if (pending()) 1002 return 0_s; 1003 1004 if (!m_startTime) 1005 return Seconds::infinity(); 1006 1007 // If we're in or expected to be in the running state, we need to schedule invalidation as soon as possible. 1008 if (hasPendingPlayTask() || playState() == PlayState::Running) 1022 1009 return 0_s; 1023 1010 … … 1034 1021 } 1035 1022 1023 void WebAnimation::runPendingTasks() 1024 { 1025 if (hasPendingPauseTask()) 1026 runPendingPauseTask(); 1027 1028 if (hasPendingPlayTask()) 1029 runPendingPlayTask(); 1030 } 1031 1036 1032 void WebAnimation::resolve(RenderStyle& targetStyle) 1037 1033 { -
trunk/Source/WebCore/animation/WebAnimation.h
r233051 r233325 108 108 Seconds timeToNextRequiredTick() const; 109 109 virtual void resolve(RenderStyle&); 110 void runPendingTasks(); 110 111 void effectTargetDidChange(Element* previousTarget, Element* newTarget); 111 112 void acceleratedStateDidChange();
Note: See TracChangeset
for help on using the changeset viewer.