Title: [236323] trunk
Revision
236323
Author
[email protected]
Date
2018-09-21 09:57:10 -0700 (Fri, 21 Sep 2018)

Log Message

REGRESSION (r235962-r235963): Layout Test animations/suspend-resume-animation-events.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=189607
<rdar://problem/44652315>

Reviewed by Dean Jackson.

Source/WebCore:

There is no reason we shouldn't return the document timeline's time when suspended as otherwise animations may
report an unresolved current time when suspended which would wreak havoc when invalidating what DOM events to
dispatch for CSS Animations and Transitions. We also shouldn't be invalidation DOM events when suspended.

* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime):
(WebCore::DocumentTimeline::DocumentTimeline::performInvalidationTask):

LayoutTests:

* animations/suspend-resume-animation-events.html: Ensure the test always opts into Web Animations backing CSS Animations and Transitions.
* platform/mac-wk2/TestExpectations: Mark the test as no longer flaky.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (236322 => 236323)


--- trunk/LayoutTests/ChangeLog	2018-09-21 16:41:13 UTC (rev 236322)
+++ trunk/LayoutTests/ChangeLog	2018-09-21 16:57:10 UTC (rev 236323)
@@ -1,3 +1,14 @@
+2018-09-21  Antoine Quint  <[email protected]>
+
+        REGRESSION (r235962-r235963): Layout Test animations/suspend-resume-animation-events.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=189607
+        <rdar://problem/44652315>
+
+        Reviewed by Dean Jackson.
+
+        * animations/suspend-resume-animation-events.html: Ensure the test always opts into Web Animations backing CSS Animations and Transitions.
+        * platform/mac-wk2/TestExpectations: Mark the test as no longer flaky.
+
 2018-09-21  Per Arne Vollan  <[email protected]>
 
         Layout Test webanimations/accelerated-animation-suspension.html is failing

Modified: trunk/LayoutTests/animations/suspend-resume-animation-events.html (236322 => 236323)


--- trunk/LayoutTests/animations/suspend-resume-animation-events.html	2018-09-21 16:41:13 UTC (rev 236322)
+++ trunk/LayoutTests/animations/suspend-resume-animation-events.html	2018-09-21 16:57:10 UTC (rev 236323)
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!doctype html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
 <html lang="en">
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (236322 => 236323)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-09-21 16:41:13 UTC (rev 236322)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-09-21 16:57:10 UTC (rev 236323)
@@ -877,5 +877,3 @@
 imported/w3c/web-platform-tests/payment-request/user-accepts-payment-request-algo-manual.https.html [ Skip ]
 
 webkit.org/b/184204 [ Sierra ] http/wpt/cache-storage/cache-put-keys.https.any.worker.html [ Pass Failure ]
-
-webkit.org/b/189607 animations/suspend-resume-animation-events.html [ Pass Failure ]

Modified: trunk/Source/WebCore/ChangeLog (236322 => 236323)


--- trunk/Source/WebCore/ChangeLog	2018-09-21 16:41:13 UTC (rev 236322)
+++ trunk/Source/WebCore/ChangeLog	2018-09-21 16:57:10 UTC (rev 236323)
@@ -1,3 +1,19 @@
+2018-09-21  Antoine Quint  <[email protected]>
+
+        REGRESSION (r235962-r235963): Layout Test animations/suspend-resume-animation-events.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=189607
+        <rdar://problem/44652315>
+
+        Reviewed by Dean Jackson.
+
+        There is no reason we shouldn't return the document timeline's time when suspended as otherwise animations may
+        report an unresolved current time when suspended which would wreak havoc when invalidating what DOM events to
+        dispatch for CSS Animations and Transitions. We also shouldn't be invalidation DOM events when suspended.
+
+        * animation/DocumentTimeline.cpp:
+        (WebCore::DocumentTimeline::currentTime):
+        (WebCore::DocumentTimeline::DocumentTimeline::performInvalidationTask):
+
 2018-09-21  Mike Gorse  <[email protected]>
 
         Build tools should work when the /usr/bin/python is python3

Modified: trunk/Source/WebCore/animation/DocumentTimeline.cpp (236322 => 236323)


--- trunk/Source/WebCore/animation/DocumentTimeline.cpp	2018-09-21 16:41:13 UTC (rev 236322)
+++ trunk/Source/WebCore/animation/DocumentTimeline.cpp	2018-09-21 16:57:10 UTC (rev 236323)
@@ -141,7 +141,7 @@
 
 std::optional<Seconds> DocumentTimeline::currentTime()
 {
-    if (m_paused || m_isSuspended || !m_document || !m_document->domWindow())
+    if (m_paused || !m_document || !m_document->domWindow())
         return AnimationTimeline::currentTime();
 
     if (auto* mainDocumentTimeline = m_document->existingTimeline()) {
@@ -216,9 +216,11 @@
 void DocumentTimeline::performInvalidationTask()
 {
     // Now that the timing model has changed we can see if there are DOM events to dispatch for declarative animations.
-    for (auto& animation : animations()) {
-        if (is<DeclarativeAnimation>(animation))
-            downcast<DeclarativeAnimation>(*animation).invalidateDOMEvents();
+    if (!m_isSuspended) {
+        for (auto& animation : animations()) {
+            if (is<DeclarativeAnimation>(animation))
+                downcast<DeclarativeAnimation>(*animation).invalidateDOMEvents();
+        }
     }
 
     applyPendingAcceleratedAnimations();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to