Title: [229771] trunk
Revision
229771
Author
commit-qu...@webkit.org
Date
2018-03-20 13:29:57 -0700 (Tue, 20 Mar 2018)

Log Message

[Web Animations] Update the timing model when pending tasks schedule changes
https://bugs.webkit.org/show_bug.cgi?id=183785

Patch by Antoine Quint <grao...@apple.com> on 2018-03-20
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Record a progression now that we correctly invalidate effects as their pending play
or pause task schedule changes. Setting an animation's effect resets pending tasks.

* web-platform-tests/web-animations/interfaces/Animation/effect-expected.txt:

Source/WebCore:

Changing the time at which a pending play or pause task is scheduled changes the pending
state of the animation and thus should notify that the timing model has changed and invalidate
the effect.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::setTimeToRunPendingPlayTask):
(WebCore::WebAnimation::setTimeToRunPendingPauseTask):
(WebCore::WebAnimation::updatePendingTasks):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (229770 => 229771)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-03-20 20:26:17 UTC (rev 229770)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-03-20 20:29:57 UTC (rev 229771)
@@ -1,3 +1,15 @@
+2018-03-20  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Update the timing model when pending tasks schedule changes
+        https://bugs.webkit.org/show_bug.cgi?id=183785
+
+        Reviewed by Dean Jackson.
+
+        Record a progression now that we correctly invalidate effects as their pending play
+        or pause task schedule changes. Setting an animation's effect resets pending tasks. 
+
+        * web-platform-tests/web-animations/interfaces/Animation/effect-expected.txt:
+
 2018-03-16  Claudio Saavedra  <csaave...@igalia.com>
 
         Unreviewed rebaseline

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/effect-expected.txt (229770 => 229771)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/effect-expected.txt	2018-03-20 20:26:17 UTC (rev 229770)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/effect-expected.txt	2018-03-20 20:29:57 UTC (rev 229771)
@@ -1,4 +1,4 @@
 
 PASS effect is set correctly. 
-FAIL Clearing and setting Animation.effect should update the computed style of the target element assert_equals: animation no longer has an effect expected "auto" but got "100px"
+PASS Clearing and setting Animation.effect should update the computed style of the target element 
 

Modified: trunk/Source/WebCore/ChangeLog (229770 => 229771)


--- trunk/Source/WebCore/ChangeLog	2018-03-20 20:26:17 UTC (rev 229770)
+++ trunk/Source/WebCore/ChangeLog	2018-03-20 20:29:57 UTC (rev 229771)
@@ -1,3 +1,19 @@
+2018-03-20  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Update the timing model when pending tasks schedule changes
+        https://bugs.webkit.org/show_bug.cgi?id=183785
+
+        Reviewed by Dean Jackson.
+
+        Changing the time at which a pending play or pause task is scheduled changes the pending
+        state of the animation and thus should notify that the timing model has changed and invalidate
+        the effect.
+
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::setTimeToRunPendingPlayTask):
+        (WebCore::WebAnimation::setTimeToRunPendingPauseTask):
+        (WebCore::WebAnimation::updatePendingTasks):
+
 2018-03-20  Tim Horton  <timothy_hor...@apple.com>
 
         Add and adopt WK_PLATFORM_NAME and adjust default feature defines

Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (229770 => 229771)


--- trunk/Source/WebCore/animation/WebAnimation.cpp	2018-03-20 20:26:17 UTC (rev 229770)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp	2018-03-20 20:29:57 UTC (rev 229771)
@@ -784,6 +784,9 @@
 
 void WebAnimation::setTimeToRunPendingPlayTask(TimeToRunPendingTask timeToRunPendingTask)
 {
+    if (m_timeToRunPendingPlayTask == timeToRunPendingTask)
+        return;
+
     m_timeToRunPendingPlayTask = timeToRunPendingTask;
     updatePendingTasks();
 }
@@ -909,6 +912,9 @@
 
 void WebAnimation::setTimeToRunPendingPauseTask(TimeToRunPendingTask timeToRunPendingTask)
 {
+    if (m_timeToRunPendingPauseTask == timeToRunPendingTask)
+        return;
+
     m_timeToRunPendingPauseTask = timeToRunPendingTask;
     updatePendingTasks();
 }
@@ -964,6 +970,8 @@
             });
         }
     }
+
+    timingModelDidChange();
 }
 
 Seconds WebAnimation::timeToNextRequiredTick(Seconds timelineTime) const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to