Title: [237856] trunk/Source/WebCore
Revision
237856
Author
grao...@webkit.org
Date
2018-11-06 03:15:47 -0800 (Tue, 06 Nov 2018)

Log Message

[Web Animations] Don't reset pending tasks when setting a null effect
https://bugs.webkit.org/show_bug.cgi?id=191301
<rdar://problem/45838422>

Reviewed by Dean Jackson.

The issue https://github.com/w3c/csswg-drafts/issues/2077 has changed the Web Animations API such that
we no longer reset pending tasks when setting a null effect on an animation.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (237855 => 237856)


--- trunk/Source/WebCore/ChangeLog	2018-11-06 11:15:43 UTC (rev 237855)
+++ trunk/Source/WebCore/ChangeLog	2018-11-06 11:15:47 UTC (rev 237856)
@@ -1,5 +1,19 @@
 2018-11-06  Antoine Quint  <grao...@apple.com>
 
+        [Web Animations] Don't reset pending tasks when setting a null effect
+        https://bugs.webkit.org/show_bug.cgi?id=191301
+        <rdar://problem/45838422>
+
+        Reviewed by Dean Jackson.
+
+        The issue https://github.com/w3c/csswg-drafts/issues/2077 has changed the Web Animations API such that
+        we no longer reset pending tasks when setting a null effect on an animation.
+
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::setEffect):
+
+2018-11-06  Antoine Quint  <grao...@apple.com>
+
         [Web Animations] Update the API to allow the "auto" composite value
         https://bugs.webkit.org/show_bug.cgi?id=191300
         <rdar://problem/45838373>

Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (237855 => 237856)


--- trunk/Source/WebCore/animation/WebAnimation.cpp	2018-11-06 11:15:43 UTC (rev 237855)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp	2018-11-06 11:15:47 UTC (rev 237856)
@@ -106,24 +106,20 @@
     if (newEffect == oldEffect)
         return;
 
-    // 3. If new effect is null and old effect is not null, run the procedure to reset an animation's pending tasks on animation.
-    if (!newEffect && oldEffect)
-        resetPendingTasks();
-
-    // 4. If animation has a pending pause task, reschedule that task to run as soon as animation is ready.
+    // 3. If animation has a pending pause task, reschedule that task to run as soon as animation is ready.
     if (hasPendingPauseTask())
         m_timeToRunPendingPauseTask = TimeToRunPendingTask::WhenReady;
 
-    // 5. If animation has a pending play task, reschedule that task to run as soon as animation is ready to play new effect.
+    // 4. If animation has a pending play task, reschedule that task to run as soon as animation is ready to play new effect.
     if (hasPendingPlayTask())
         m_timeToRunPendingPlayTask = TimeToRunPendingTask::WhenReady;
 
-    // 6. If new effect is not null and if new effect is the target effect of another animation, previous animation, run the
+    // 5. If new effect is not null and if new effect is the target effect of another animation, previous animation, run the
     // procedure to set the target effect of an animation (this procedure) on previous animation passing null as new effect.
     if (newEffect && newEffect->animation())
         newEffect->animation()->setEffect(nullptr);
 
-    // 7. Let the target effect of animation be new effect.
+    // 6. Let the target effect of animation be new effect.
     // In the case of a declarative animation, we don't want to remove the animation from the relevant maps because
     // while the effect was set via the API, the element still has a transition or animation set up and we must
     // not break the timeline-to-animation relationship.
@@ -134,7 +130,7 @@
     auto protectedThis = makeRef(*this);
     setEffectInternal(WTFMove(newEffect), isDeclarativeAnimation());
 
-    // 8. Run the procedure to update an animation's finished state for animation with the did seek flag set to false,
+    // 7. Run the procedure to update an animation's finished state for animation with the did seek flag set to false,
     // and the synchronously notify flag set to false.
     timingDidChange(DidSeek::No, SynchronouslyNotify::No);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to