Title: [287550] trunk
Revision
287550
Author
[email protected]
Date
2022-01-03 10:49:23 -0800 (Mon, 03 Jan 2022)

Log Message

[Web Animations] changing the effect of a transition should no longer have it marked as running
https://bugs.webkit.org/show_bug.cgi?id=234823

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progression.

* web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt:

Source/WebCore:

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

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287549 => 287550)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-03 18:45:11 UTC (rev 287549)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-03 18:49:23 UTC (rev 287550)
@@ -1,5 +1,16 @@
 2022-01-03  Antoine Quint  <[email protected]>
 
+        [Web Animations] changing the effect of a transition should no longer have it marked as running
+        https://bugs.webkit.org/show_bug.cgi?id=234823
+
+        Reviewed by Dean Jackson.
+
+        Mark WPT progression.
+
+        * web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt:
+
+2022-01-03  Antoine Quint  <[email protected]>
+
         [Web Animations] calling setKeyframes() on a running CSS Transition has no immediate effect
         https://bugs.webkit.org/show_bug.cgi?id=234818
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt (287549 => 287550)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt	2022-01-03 18:45:11 UTC (rev 287549)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt	2022-01-03 18:49:23 UTC (rev 287550)
@@ -2,7 +2,7 @@
 PASS After setting a transition's effect to null, it still reports the original transition property
 PASS After setting a transition's effect to null, it becomes finished
 PASS After setting a transition's effect to null, style is updated
-FAIL After setting a transition's effect to null, a new transition can be started assert_equals: expected "100px" but got "0px"
+PASS After setting a transition's effect to null, a new transition can be started
 PASS After setting a transition's effect to null, it should be possible to interrupt that transition
 PASS After setting a new keyframe effect with a shorter duration, the transition becomes finished
 PASS After setting a new keyframe effect targeting different properties, the transition continues to report the original transition property

Modified: trunk/Source/WebCore/ChangeLog (287549 => 287550)


--- trunk/Source/WebCore/ChangeLog	2022-01-03 18:45:11 UTC (rev 287549)
+++ trunk/Source/WebCore/ChangeLog	2022-01-03 18:49:23 UTC (rev 287550)
@@ -1,5 +1,17 @@
 2022-01-03  Antoine Quint  <[email protected]>
 
+        [Web Animations] changing the effect of a transition should no longer have it marked as running
+        https://bugs.webkit.org/show_bug.cgi?id=234823
+
+        Reviewed by Dean Jackson.
+
+        * animation/DeclarativeAnimation.cpp:
+        (WebCore::DeclarativeAnimation::setEffect):
+        * animation/DeclarativeAnimation.h:
+        * animation/WebAnimation.h:
+
+2022-01-03  Antoine Quint  <[email protected]>
+
         [Web Animations] calling setKeyframes() on a running CSS Transition has no immediate effect
         https://bugs.webkit.org/show_bug.cgi?id=234818
 

Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.cpp (287549 => 287550)


--- trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2022-01-03 18:45:11 UTC (rev 287549)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2022-01-03 18:49:23 UTC (rev 287550)
@@ -235,6 +235,17 @@
     disassociateFromOwningElement();
 }
 
+void DeclarativeAnimation::setEffect(RefPtr<AnimationEffect>&& newEffect)
+{
+    if (effect() == newEffect)
+        return;
+
+    WebAnimation::setEffect(WTFMove(newEffect));
+
+    if (auto styleable = owningElement())
+        styleable->removeDeclarativeAnimationFromListsForOwningElement(*this);
+}
+
 AnimationEffectPhase DeclarativeAnimation::phaseWithoutEffect() const
 {
     // This shouldn't be called if we actually have an effect.

Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.h (287549 => 287550)


--- trunk/Source/WebCore/animation/DeclarativeAnimation.h	2022-01-03 18:45:11 UTC (rev 287549)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.h	2022-01-03 18:49:23 UTC (rev 287550)
@@ -64,6 +64,7 @@
     ExceptionOr<void> bindingsPause() override;
 
     void setTimeline(RefPtr<AnimationTimeline>&&) final;
+    void setEffect(RefPtr<AnimationEffect>&&) final;
     void cancel() final;
 
     void tick() override;

Modified: trunk/Source/WebCore/animation/WebAnimation.h (287549 => 287550)


--- trunk/Source/WebCore/animation/WebAnimation.h	2022-01-03 18:45:11 UTC (rev 287549)
+++ trunk/Source/WebCore/animation/WebAnimation.h	2022-01-03 18:49:23 UTC (rev 287550)
@@ -73,7 +73,7 @@
     AnimationEffect* bindingsEffect() const { return effect(); }
     virtual void setBindingsEffect(RefPtr<AnimationEffect>&&);
     AnimationEffect* effect() const { return m_effect.get(); }
-    void setEffect(RefPtr<AnimationEffect>&&);
+    virtual void setEffect(RefPtr<AnimationEffect>&&);
     AnimationTimeline* timeline() const { return m_timeline.get(); }
     virtual void setTimeline(RefPtr<AnimationTimeline>&&);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to