Title: [287896] trunk
Revision
287896
Author
[email protected]
Date
2022-01-11 14:44:31 -0800 (Tue, 11 Jan 2022)

Log Message

css/css-transitions/KeyframeEffect-setKeyframes.tentative.html is a failure (part 2)
https://bugs.webkit.org/show_bug.cgi?id=235077

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progression, this test now passes entirely.

* web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt:

Source/WebCore:

There were a few issues that prevented the final subtest in this WPT from passing
after the fix made in bug 235062.

First, while we must flush pending style changes for some of the Web Animations APIs
when called on a style-originated animation (CSS Transition or CSS Animation), this
should not apply to setters, only getters. In the context of this test, it was critical
that either setting keyframes or setting the current time not force pending style changes
to be flushed or a reversing CSS Transition may be started too soon and the test would
fail.

Second, when the spec says to use the "the current value of the property in the running
transition", it is equivalent to using the before-change style since we updated the
current value of all animations targeting this element, not getting the value from the
last time this transition was resolved since this would not account for any API calls
or style changes since then, which is precisely what this test is checking.

* animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::setBindingsStartTime): Deleted.
(WebCore::DeclarativeAnimation::setBindingsCurrentTime): Deleted.
* animation/DeclarativeAnimation.h:
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setBindingsKeyframes):
* style/Styleable.cpp:
(WebCore::updateCSSTransitionsForStyleableAndProperty):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287895 => 287896)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-11 21:57:15 UTC (rev 287895)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-11 22:44:31 UTC (rev 287896)
@@ -1,3 +1,14 @@
+2022-01-11  Antoine Quint  <[email protected]>
+
+        css/css-transitions/KeyframeEffect-setKeyframes.tentative.html is a failure (part 2)
+        https://bugs.webkit.org/show_bug.cgi?id=235077
+
+        Reviewed by Dean Jackson.
+
+        Mark WPT progression, this test now passes entirely.
+
+        * web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt:
+
 2022-01-11  Rob Buis  <[email protected]>
 
         [CSS contain] Update css-contain tests from WPT

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt (287895 => 287896)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt	2022-01-11 21:57:15 UTC (rev 287895)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt	2022-01-11 22:44:31 UTC (rev 287896)
@@ -5,6 +5,6 @@
 PASS A transition with replaced keyframes animating the same property still exhibits normal reversing behavior.
 PASS A transition with replaced keyframes animating a different property still exhibits normal reversing behavior  (reversing from the base value).
 PASS A transition with replaced keyframes animating nothing still exhibits normal reversing behavior (reversing from the base value).
-FAIL A transition with replaced keyframes animating nothing on a property being controlled by another modified transition exhibits normal reversing behavior and reverses from the other transition's current value. assert_equals: The reversed transition gets its start value from the other transition controlling left expected "280px" but got "200px"
+PASS A transition with replaced keyframes animating nothing on a property being controlled by another modified transition exhibits normal reversing behavior and reverses from the other transition's current value.
 PASS A transition with replaced kefyrames and composite 'add' exhibits normal reversing behavior, and the effect is not double counted when calculating the before change style
 

Modified: trunk/Source/WebCore/ChangeLog (287895 => 287896)


--- trunk/Source/WebCore/ChangeLog	2022-01-11 21:57:15 UTC (rev 287895)
+++ trunk/Source/WebCore/ChangeLog	2022-01-11 22:44:31 UTC (rev 287896)
@@ -1,3 +1,35 @@
+2022-01-11  Antoine Quint  <[email protected]>
+
+        css/css-transitions/KeyframeEffect-setKeyframes.tentative.html is a failure (part 2)
+        https://bugs.webkit.org/show_bug.cgi?id=235077
+
+        Reviewed by Dean Jackson.
+
+        There were a few issues that prevented the final subtest in this WPT from passing
+        after the fix made in bug 235062.
+
+        First, while we must flush pending style changes for some of the Web Animations APIs
+        when called on a style-originated animation (CSS Transition or CSS Animation), this
+        should not apply to setters, only getters. In the context of this test, it was critical
+        that either setting keyframes or setting the current time not force pending style changes
+        to be flushed or a reversing CSS Transition may be started too soon and the test would
+        fail.
+
+        Second, when the spec says to use the "the current value of the property in the running
+        transition", it is equivalent to using the before-change style since we updated the
+        current value of all animations targeting this element, not getting the value from the
+        last time this transition was resolved since this would not account for any API calls
+        or style changes since then, which is precisely what this test is checking.
+
+        * animation/DeclarativeAnimation.cpp:
+        (WebCore::DeclarativeAnimation::setBindingsStartTime): Deleted.
+        (WebCore::DeclarativeAnimation::setBindingsCurrentTime): Deleted.
+        * animation/DeclarativeAnimation.h:
+        * animation/KeyframeEffect.cpp:
+        (WebCore::KeyframeEffect::setBindingsKeyframes):
+        * style/Styleable.cpp:
+        (WebCore::updateCSSTransitionsForStyleableAndProperty):
+
 2022-01-11  Said Abou-Hallawa  <[email protected]>
 
         [GPU Process] Remove the dependency from FilterEffect to its inputs

Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.cpp (287895 => 287896)


--- trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2022-01-11 21:57:15 UTC (rev 287895)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2022-01-11 22:44:31 UTC (rev 287896)
@@ -138,12 +138,6 @@
     return WebAnimation::bindingsStartTime();
 }
 
-void DeclarativeAnimation::setBindingsStartTime(std::optional<double> startTime)
-{
-    flushPendingStyleChanges();
-    return WebAnimation::setBindingsStartTime(startTime);
-}
-
 std::optional<double> DeclarativeAnimation::bindingsCurrentTime() const
 {
     flushPendingStyleChanges();
@@ -150,12 +144,6 @@
     return WebAnimation::bindingsCurrentTime();
 }
 
-ExceptionOr<void> DeclarativeAnimation::setBindingsCurrentTime(std::optional<double> currentTime)
-{
-    flushPendingStyleChanges();
-    return WebAnimation::setBindingsCurrentTime(currentTime);
-}
-
 WebAnimation::PlayState DeclarativeAnimation::bindingsPlayState() const
 {
     flushPendingStyleChanges();

Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.h (287895 => 287896)


--- trunk/Source/WebCore/animation/DeclarativeAnimation.h	2022-01-11 21:57:15 UTC (rev 287895)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.h	2022-01-11 22:44:31 UTC (rev 287896)
@@ -52,9 +52,7 @@
     void cancelFromStyle();
 
     std::optional<double> bindingsStartTime() const final;
-    void setBindingsStartTime(std::optional<double>) override;
     std::optional<double> bindingsCurrentTime() const final;
-    ExceptionOr<void> setBindingsCurrentTime(std::optional<double>) final;
     WebAnimation::PlayState bindingsPlayState() const final;
     WebAnimation::ReplaceState bindingsReplaceState() const final;
     bool bindingsPending() const final;

Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (287895 => 287896)


--- trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-01-11 21:57:15 UTC (rev 287895)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-01-11 22:44:31 UTC (rev 287896)
@@ -819,8 +819,6 @@
 
 ExceptionOr<void> KeyframeEffect::setBindingsKeyframes(JSGlobalObject& lexicalGlobalObject, Strong<JSObject>&& keyframesInput)
 {
-    if (is<DeclarativeAnimation>(animation()))
-        downcast<DeclarativeAnimation>(*animation()).flushPendingStyleChanges();
     auto retVal = setKeyframes(lexicalGlobalObject, WTFMove(keyframesInput));
     if (!retVal.hasException() && is<CSSAnimation>(animation()))
         downcast<CSSAnimation>(*animation()).effectKeyframesWereSetUsingBindings();

Modified: trunk/Source/WebCore/style/Styleable.cpp (287895 => 287896)


--- trunk/Source/WebCore/style/Styleable.cpp	2022-01-11 21:57:15 UTC (rev 287895)
+++ trunk/Source/WebCore/style/Styleable.cpp	2022-01-11 22:44:31 UTC (rev 287896)
@@ -520,7 +520,7 @@
             auto duration = Seconds(matchingBackingAnimation->duration()) * reversingShorteningFactor;
 
             previouslyRunningTransition->cancelFromStyle();
-            styleable.ensureRunningTransitionsByProperty().set(property, CSSTransition::create(styleable, property, generationTime, *matchingBackingAnimation, &previouslyRunningTransitionCurrentStyle, afterChangeStyle, delay, duration, reversingAdjustedStartStyle, reversingShorteningFactor));
+            styleable.ensureRunningTransitionsByProperty().set(property, CSSTransition::create(styleable, property, generationTime, *matchingBackingAnimation, &beforeChangeStyle, afterChangeStyle, delay, duration, reversingAdjustedStartStyle, reversingShorteningFactor));
         } else {
             // 4. Otherwise, implementations must cancel the running transition and start a new transition whose:
             //   - start time is the time of the style change event plus the matching transition delay,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to