Title: [250335] trunk
Revision
250335
Author
grao...@webkit.org
Date
2019-09-24 23:53:42 -0700 (Tue, 24 Sep 2019)

Log Message

[Web Animations] Removing an element should only cancel its declarative animations
https://bugs.webkit.org/show_bug.cgi?id=202165

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark a WPT progression and a change in FAIL expectation in a test where we used to cancel an animation and now don't.

* web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt:

Source/WebCore:

When an element is removed, an Animation created using the JS API should not be canceled.
Only declarative animations should be.

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::elementWasRemoved):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (250334 => 250335)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-09-25 04:42:21 UTC (rev 250334)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-09-25 06:53:42 UTC (rev 250335)
@@ -1,5 +1,17 @@
 2019-09-24  Antoine Quint  <grao...@apple.com>
 
+        [Web Animations] Removing an element should only cancel its declarative animations
+        https://bugs.webkit.org/show_bug.cgi?id=202165
+
+        Reviewed by Dean Jackson.
+
+        Mark a WPT progression and a change in FAIL expectation in a test where we used to cancel an animation and now don't.
+
+        * web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
+        * web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
+
+2019-09-24  Antoine Quint  <grao...@apple.com>
+
         [Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
         https://bugs.webkit.org/show_bug.cgi?id=181121
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt (250334 => 250335)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt	2019-09-25 04:42:21 UTC (rev 250334)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt	2019-09-25 06:53:42 UTC (rev 250335)
@@ -2,6 +2,6 @@
 FAIL Effect values reflect changes to font-size on element assert_equals: Effect value after updating font-size expected "300px" but got "150px"
 FAIL Effect values reflect changes to font-size on parent element assert_equals: Effect value after updating font-size on parent element expected "300px" but got "150px"
 PASS Effect values reflect changes to font-size when computed style is not immediately flushed 
-FAIL Effect values reflect changes to font-size from reparenting assert_equals: Effect value after attaching to font-size:20px parent expected "300px" but got "0px"
+FAIL Effect values reflect changes to font-size from reparenting assert_equals: Effect value after attaching to font-size:20px parent expected "300px" but got "150px"
 PASS Effect values reflect changes to target element 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt (250334 => 250335)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt	2019-09-25 04:42:21 UTC (rev 250334)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt	2019-09-25 06:53:42 UTC (rev 250335)
@@ -1,6 +1,4 @@
 
-Harness Error (TIMEOUT), message = null
-
 PASS Canceling an animation should cause its start time and hold time to be unresolved 
 PASS A play-pending ready promise should be rejected when the animation is canceled 
 PASS A pause-pending ready promise should be rejected when the animation is canceled 
@@ -8,5 +6,5 @@
 PASS The ready promise should be replaced when the animation is canceled 
 PASS The finished promise should NOT be rejected if the animation is already idle 
 PASS The cancel event should NOT be fired if the animation is already idle 
-TIMEOUT Canceling an animation should fire cancel event on orphaned element Test timed out
+PASS Canceling an animation should fire cancel event on orphaned element 
 

Modified: trunk/Source/WebCore/ChangeLog (250334 => 250335)


--- trunk/Source/WebCore/ChangeLog	2019-09-25 04:42:21 UTC (rev 250334)
+++ trunk/Source/WebCore/ChangeLog	2019-09-25 06:53:42 UTC (rev 250335)
@@ -1,3 +1,16 @@
+2019-09-24  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Removing an element should only cancel its declarative animations
+        https://bugs.webkit.org/show_bug.cgi?id=202165
+
+        Reviewed by Dean Jackson.
+
+        When an element is removed, an Animation created using the JS API should not be canceled.
+        Only declarative animations should be.
+
+        * animation/AnimationTimeline.cpp:
+        (WebCore::AnimationTimeline::elementWasRemoved):
+
 2019-09-24  Alex Christensen  <achristen...@webkit.org>
 
         Remove SchemeRegistry's list of URL schemes allowing local storage in private browsing, which is unused

Modified: trunk/Source/WebCore/animation/AnimationTimeline.cpp (250334 => 250335)


--- trunk/Source/WebCore/animation/AnimationTimeline.cpp	2019-09-25 04:42:21 UTC (rev 250334)
+++ trunk/Source/WebCore/animation/AnimationTimeline.cpp	2019-09-25 06:53:42 UTC (rev 250335)
@@ -197,8 +197,10 @@
 
 void AnimationTimeline::elementWasRemoved(Element& element)
 {
-    for (auto& animation : animationsForElement(element))
-        animation->cancel(WebAnimation::Silently::Yes);
+    for (auto& cssTransition : m_elementToCSSTransitionsMap.get(&element))
+        cssTransition->cancel(WebAnimation::Silently::Yes);
+    for (auto& cssAnimation : m_elementToCSSAnimationsMap.get(&element))
+        cssAnimation->cancel(WebAnimation::Silently::Yes);
 }
 
 void AnimationTimeline::removeAnimationsForElement(Element& element)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to