Title: [230683] tags/Safari-606.1.13.1
Revision
230683
Author
kocsen_ch...@apple.com
Date
2018-04-16 14:52:30 -0700 (Mon, 16 Apr 2018)

Log Message

Cherry-pick r230665. rdar://problem/39397649

    [Web Animations] Animations do not naturally get a finish event
    https://bugs.webkit.org/show_bug.cgi?id=184639
    <rdar://problem/39397649>

    Reviewed by Jon Lee.

    LayoutTests/imported/w3c:

    Record two progressions in the Web Animations WPT tests.

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

    Source/WebCore:

    We must call updateFinishedState() when an animation gets sampled as it means its timeline's time has progressed
    and it may have crossed to a finished state. Calling updateFinishedState() when sampling means that we'll correctly
    set the animation's hold time to its end value, which means that currentTime() will now always be clamped to return
    the end time once its has reached it, so we must not schedule animations to resolve immediately anymore since otherwise
    they will keep being scheduled in a loop.

    * animation/WebAnimation.cpp:
    (WebCore::WebAnimation::timeToNextRequiredTick const):
    (WebCore::WebAnimation::resolve):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: tags/Safari-606.1.13.1/LayoutTests/imported/w3c/ChangeLog (230682 => 230683)


--- tags/Safari-606.1.13.1/LayoutTests/imported/w3c/ChangeLog	2018-04-16 21:52:24 UTC (rev 230682)
+++ tags/Safari-606.1.13.1/LayoutTests/imported/w3c/ChangeLog	2018-04-16 21:52:30 UTC (rev 230683)
@@ -1,3 +1,45 @@
+2018-04-16  Kocsen Chung  <kocsen_ch...@apple.com>
+
+        Cherry-pick r230665. rdar://problem/39397649
+
+    [Web Animations] Animations do not naturally get a finish event
+    https://bugs.webkit.org/show_bug.cgi?id=184639
+    <rdar://problem/39397649>
+    
+    Reviewed by Jon Lee.
+    
+    LayoutTests/imported/w3c:
+    
+    Record two progressions in the Web Animations WPT tests.
+    
+    * web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
+    
+    Source/WebCore:
+    
+    We must call updateFinishedState() when an animation gets sampled as it means its timeline's time has progressed
+    and it may have crossed to a finished state. Calling updateFinishedState() when sampling means that we'll correctly
+    set the animation's hold time to its end value, which means that currentTime() will now always be clamped to return
+    the end time once its has reached it, so we must not schedule animations to resolve immediately anymore since otherwise
+    they will keep being scheduled in a loop.
+    
+    * animation/WebAnimation.cpp:
+    (WebCore::WebAnimation::timeToNextRequiredTick const):
+    (WebCore::WebAnimation::resolve):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-04-15  Antoine Quint  <grao...@apple.com>
+
+            [Web Animations] Animations do not naturally get a finish event
+            https://bugs.webkit.org/show_bug.cgi?id=184639
+            <rdar://problem/39397649>
+
+            Reviewed by Jon Lee.
+
+            Record two progressions in the Web Animations WPT tests.
+
+            * web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
+
 2018-04-09  Brendan McLoughlin  <bren...@bocoup.com>
 
         sync remaining web-platform-tests to 94b33b573a069ae5170104ca581a354a35762536

Modified: tags/Safari-606.1.13.1/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt (230682 => 230683)


--- tags/Safari-606.1.13.1/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt	2018-04-16 21:52:24 UTC (rev 230682)
+++ tags/Safari-606.1.13.1/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt	2018-04-16 21:52:30 UTC (rev 230683)
@@ -1,8 +1,8 @@
 
-FAIL Updating the finished state when playing past end assert_equals: Hold time is set to target end clamping current time expected 100000 but got 100029
+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 
-FAIL Updating the finished state when playing in reverse past zero assert_equals: Hold time is set to zero clamping current time expected 0 but got -15
+PASS Updating the finished state when playing in reverse past zero 
 PASS Updating the finished state when seeking a reversed animation past zero 
 FAIL Updating the finished state when seeking a reversed animation exactly to zero assert_equals: Hold time is set so current time should NOT change expected 0 but got -0
 PASS Updating the finished state when playing before end 

Modified: tags/Safari-606.1.13.1/Source/WebCore/ChangeLog (230682 => 230683)


--- tags/Safari-606.1.13.1/Source/WebCore/ChangeLog	2018-04-16 21:52:24 UTC (rev 230682)
+++ tags/Safari-606.1.13.1/Source/WebCore/ChangeLog	2018-04-16 21:52:30 UTC (rev 230683)
@@ -1,5 +1,53 @@
 2018-04-16  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r230665. rdar://problem/39397649
+
+    [Web Animations] Animations do not naturally get a finish event
+    https://bugs.webkit.org/show_bug.cgi?id=184639
+    <rdar://problem/39397649>
+    
+    Reviewed by Jon Lee.
+    
+    LayoutTests/imported/w3c:
+    
+    Record two progressions in the Web Animations WPT tests.
+    
+    * web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
+    
+    Source/WebCore:
+    
+    We must call updateFinishedState() when an animation gets sampled as it means its timeline's time has progressed
+    and it may have crossed to a finished state. Calling updateFinishedState() when sampling means that we'll correctly
+    set the animation's hold time to its end value, which means that currentTime() will now always be clamped to return
+    the end time once its has reached it, so we must not schedule animations to resolve immediately anymore since otherwise
+    they will keep being scheduled in a loop.
+    
+    * animation/WebAnimation.cpp:
+    (WebCore::WebAnimation::timeToNextRequiredTick const):
+    (WebCore::WebAnimation::resolve):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-04-15  Antoine Quint  <grao...@apple.com>
+
+            [Web Animations] Animations do not naturally get a finish event
+            https://bugs.webkit.org/show_bug.cgi?id=184639
+            <rdar://problem/39397649>
+
+            Reviewed by Jon Lee.
+
+            We must call updateFinishedState() when an animation gets sampled as it means its timeline's time has progressed
+            and it may have crossed to a finished state. Calling updateFinishedState() when sampling means that we'll correctly
+            set the animation's hold time to its end value, which means that currentTime() will now always be clamped to return
+            the end time once its has reached it, so we must not schedule animations to resolve immediately anymore since otherwise
+            they will keep being scheduled in a loop.
+
+            * animation/WebAnimation.cpp:
+            (WebCore::WebAnimation::timeToNextRequiredTick const):
+            (WebCore::WebAnimation::resolve):
+
+2018-04-16  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r230521. rdar://problem/39344671
 
     [Web Animations] Turn Web Animations on by default

Modified: tags/Safari-606.1.13.1/Source/WebCore/animation/WebAnimation.cpp (230682 => 230683)


--- tags/Safari-606.1.13.1/Source/WebCore/animation/WebAnimation.cpp	2018-04-16 21:52:24 UTC (rev 230682)
+++ tags/Safari-606.1.13.1/Source/WebCore/animation/WebAnimation.cpp	2018-04-16 21:52:30 UTC (rev 230683)
@@ -992,11 +992,6 @@
     if (localTime < 0_s)
         return -localTime;
 
-    // If our current time is just at the acthive duration threshold we want to invalidate as
-    // soon as possible to restore a non-animated value.
-    if (std::abs(localTime.microseconds() - m_effect->timing()->activeDuration().microseconds()) < timeEpsilon.microseconds())
-        return 0_s;
-
     // In any other case, we're idle or already outside our active duration and have no need
     // to schedule an invalidation.
     return Seconds::infinity();
@@ -1006,6 +1001,8 @@
 {
     if (m_effect)
         m_effect->apply(targetStyle);
+
+    updateFinishedState(DidSeek::No, SynchronouslyNotify::Yes);
 }
 
 void WebAnimation::acceleratedRunningStateDidChange()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to