Title: [250303] trunk
Revision
250303
Author
[email protected]
Date
2019-09-24 10:02:13 -0700 (Tue, 24 Sep 2019)

Log Message

[Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
https://bugs.webkit.org/show_bug.cgi?id=181121

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

* web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:

Source/WebCore:

When running the "update animations and send events" steps (https://drafts.csswg.org/web-animations/#update-animations-and-send-events)
we assemble a list of animations to remove after updating their relevance based on the new timeline current time. However, we wouldn't
account for the fact that we would *then* dispatch events which could update the timing properties of animations that had been marked
for removal at this point.

In this specific WPT test, there were two individual tests that would rewind animations within a "finish" event handler and we would
not consider the fact that they had been rewound. We now check a second time before removing an animation that it should indeed be
removed.

* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (250302 => 250303)


--- trunk/LayoutTests/ChangeLog	2019-09-24 16:39:06 UTC (rev 250302)
+++ trunk/LayoutTests/ChangeLog	2019-09-24 17:02:13 UTC (rev 250303)
@@ -1,3 +1,12 @@
+2019-09-24  Antoine Quint  <[email protected]>
+
+        [Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
+        https://bugs.webkit.org/show_bug.cgi?id=181121
+
+        Reviewed by Dean Jackson.
+
+        * TestExpectations:
+
 2019-09-24  Kate Cheney  <[email protected]>
 
         Mixed content blocking is bypassed for WebSockets in Workers (159726)

Modified: trunk/LayoutTests/TestExpectations (250302 => 250303)


--- trunk/LayoutTests/TestExpectations	2019-09-24 16:39:06 UTC (rev 250302)
+++ trunk/LayoutTests/TestExpectations	2019-09-24 17:02:13 UTC (rev 250303)
@@ -2791,7 +2791,6 @@
 
 webkit.org/b/202107 imported/w3c/web-platform-tests/web-animations/interfaces/Animation/style-change-events.html [ Pass Failure ]
 webkit.org/b/202108 imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events.html [ Pass Failure ]
-webkit.org/b/181121 imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html [ Pass Failure ]
 webkit.org/b/202109 imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events.html [ Pass Failure ]
 
 webkit.org/b/183836 imported/mozilla/css-animations/test_animations-dynamic-changes.html [ Pass Failure Timeout ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (250302 => 250303)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-09-24 16:39:06 UTC (rev 250302)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-09-24 17:02:13 UTC (rev 250303)
@@ -1,3 +1,12 @@
+2019-09-24  Antoine Quint  <[email protected]>
+
+        [Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
+        https://bugs.webkit.org/show_bug.cgi?id=181121
+
+        Reviewed by Dean Jackson.
+
+        * web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
+
 2019-09-24  Alex Christensen  <[email protected]>
 
         Import navigation-timing WPT tests that don't time out

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt (250302 => 250303)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt	2019-09-24 16:39:06 UTC (rev 250302)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt	2019-09-24 17:02:13 UTC (rev 250303)
@@ -1,6 +1,4 @@
 
-Harness Error (TIMEOUT), message = null
-
 PASS Updating the finished state when playing past end 
 PASS Updating the finished state when seeking past end 
 PASS Updating the finished state when seeking exactly to end 
@@ -24,8 +22,8 @@
 PASS Finish notification steps run when the animation completes with .finish(), even if we then seek away 
 PASS Animation finished promise is replaced after seeking back to start 
 PASS Animation finished promise is replaced after replaying from start 
-TIMEOUT Animation finish event is fired again after seeking back to start Test timed out
-TIMEOUT Animation finish event is fired again after replaying from start Test timed out
+PASS Animation finish event is fired again after seeking back to start 
+PASS Animation finish event is fired again after replaying from start 
 PASS finish event is not fired at the end of the active interval when the endDelay has not expired 
 PASS finish event is fired after the endDelay has expired 
 

Modified: trunk/Source/WebCore/ChangeLog (250302 => 250303)


--- trunk/Source/WebCore/ChangeLog	2019-09-24 16:39:06 UTC (rev 250302)
+++ trunk/Source/WebCore/ChangeLog	2019-09-24 17:02:13 UTC (rev 250303)
@@ -1,3 +1,22 @@
+2019-09-24  Antoine Quint  <[email protected]>
+
+        [Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
+        https://bugs.webkit.org/show_bug.cgi?id=181121
+
+        Reviewed by Dean Jackson.
+
+        When running the "update animations and send events" steps (https://drafts.csswg.org/web-animations/#update-animations-and-send-events)
+        we assemble a list of animations to remove after updating their relevance based on the new timeline current time. However, we wouldn't
+        account for the fact that we would *then* dispatch events which could update the timing properties of animations that had been marked
+        for removal at this point.
+
+        In this specific WPT test, there were two individual tests that would rewind animations within a "finish" event handler and we would
+        not consider the fact that they had been rewound. We now check a second time before removing an animation that it should indeed be
+        removed.
+
+        * animation/DocumentTimeline.cpp:
+        (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
+
 2019-09-24  Kate Cheney  <[email protected]>
 
         Mixed content blocking is bypassed for WebSockets in Workers (159726)

Modified: trunk/Source/WebCore/animation/DocumentTimeline.cpp (250302 => 250303)


--- trunk/Source/WebCore/animation/DocumentTimeline.cpp	2019-09-24 16:39:06 UTC (rev 250302)
+++ trunk/Source/WebCore/animation/DocumentTimeline.cpp	2019-09-24 17:02:13 UTC (rev 250303)
@@ -404,8 +404,12 @@
         pendingEvent->target()->dispatchEvent(pendingEvent);
 
     // This will cancel any scheduled invalidation if we end up removing all animations.
-    for (auto& animation : animationsToRemove)
-        removeAnimation(*animation);
+    for (auto& animation : animationsToRemove) {
+        // An animation that was initially marked as irrelevant may have changed while we were sending events, so we run the same
+        // check that we ran to add it to animationsToRemove in the first place.
+        if (!animation->isRelevant() && !animation->needsTick())
+            removeAnimation(*animation);
+    }
 
     // Now that animations that needed removal have been removed, let's update the list of completed transitions.
     // This needs to happen after dealing with the list of animations to remove as the animation may have been
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to