Title: [258274] trunk
Revision
258274
Author
grao...@webkit.org
Date
2020-03-11 13:04:18 -0700 (Wed, 11 Mar 2020)

Log Message

[Mac wk2 Release] imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html flaky fail
https://bugs.webkit.org/show_bug.cgi?id=206746
<rdar://problem/58867580>

Patch by Antoine Quint <grao...@webkit.org> on 2020-03-11
Reviewed by Dean Jackson.

Source/WebCore:

Because we could end up in situation where localTime was very marginally smaller than endTime inside of WebAnimation::play(), we would end up
with an unresolved hold time and we would return before calling WebAnimation::timingDidChange() and thus scheduling an animation update from
the timeline because we'd assume it was paused. As a result, the animation would never end and the test would wait for a "finish" event which
would never come.

We now account for an epsilon value when comparing times to account for such situations.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::play):

LayoutTests:

* platform/mac-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (258273 => 258274)


--- trunk/LayoutTests/ChangeLog	2020-03-11 19:50:41 UTC (rev 258273)
+++ trunk/LayoutTests/ChangeLog	2020-03-11 20:04:18 UTC (rev 258274)
@@ -1,3 +1,13 @@
+2020-03-11  Antoine Quint  <grao...@webkit.org>
+
+        [Mac wk2 Release] imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html flaky fail
+        https://bugs.webkit.org/show_bug.cgi?id=206746
+        <rdar://problem/58867580>
+
+        Reviewed by Dean Jackson.
+
+        * platform/mac-wk2/TestExpectations:
+
 2020-03-11  Jason Lawrence  <lawrenc...@apple.com>
 
         REGRESSION: (r257915?) [ Mac ] accessibility/accessibility-node-memory-management.html is flaky failing.

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (258273 => 258274)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-03-11 19:50:41 UTC (rev 258273)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-03-11 20:04:18 UTC (rev 258274)
@@ -929,8 +929,6 @@
 
 webkit.org/b/206864 http/tests/workers/service/basic-timeout.https.html [ Pass Failure ]
 
-webkit.org/b/206746 [ Release ] imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html [ Pass Failure ]
-
 webkit.org/b/206696 [ Release ] editing/selection/caret-at-bidi-boundary.html [ Slow ]
 
 webkit.org/b/206708 fast/animation/request-animation-frame-iframe.html [ Pass Failure ]

Modified: trunk/Source/WebCore/ChangeLog (258273 => 258274)


--- trunk/Source/WebCore/ChangeLog	2020-03-11 19:50:41 UTC (rev 258273)
+++ trunk/Source/WebCore/ChangeLog	2020-03-11 20:04:18 UTC (rev 258274)
@@ -1,3 +1,21 @@
+2020-03-11  Antoine Quint  <grao...@webkit.org>
+
+        [Mac wk2 Release] imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html flaky fail
+        https://bugs.webkit.org/show_bug.cgi?id=206746
+        <rdar://problem/58867580>
+
+        Reviewed by Dean Jackson.
+
+        Because we could end up in situation where localTime was very marginally smaller than endTime inside of WebAnimation::play(), we would end up
+        with an unresolved hold time and we would return before calling WebAnimation::timingDidChange() and thus scheduling an animation update from
+        the timeline because we'd assume it was paused. As a result, the animation would never end and the test would wait for a "finish" event which
+        would never come.
+
+        We now account for an epsilon value when comparing times to account for such situations.
+
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::play):
+
 2020-03-11  Chris Dumez  <cdu...@apple.com>
 
         Defer async scripts until DOMContentLoaded or first paint, whichever comes first

Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (258273 => 258274)


--- trunk/Source/WebCore/animation/WebAnimation.cpp	2020-03-11 19:50:41 UTC (rev 258273)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp	2020-03-11 20:04:18 UTC (rev 258274)
@@ -928,7 +928,7 @@
     bool hasPendingReadyPromise = false;
 
     // 3. Perform the steps corresponding to the first matching condition from the following, if any:
-    if (effectivePlaybackRate() > 0 && autoRewind == AutoRewind::Yes && (!localTime || localTime.value() < 0_s || localTime.value() >= endTime)) {
+    if (effectivePlaybackRate() > 0 && autoRewind == AutoRewind::Yes && (!localTime || localTime.value() < 0_s || (localTime.value() + timeEpsilon) >= endTime)) {
         // If animation's effective playback rate > 0, the auto-rewind flag is true and either animation's:
         //     - current time is unresolved, or
         //     - current time < zero, or
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to