Title: [287917] trunk
Revision
287917
Author
mrobin...@webkit.org
Date
2022-01-12 03:40:15 -0800 (Wed, 12 Jan 2022)

Log Message

Interpolation during animation of two empty transform lists should always yield "none"
https://bugs.webkit.org/show_bug.cgi?id=235069

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Update to show passes.

Source/WebCore:

No new tests. This is covered by an existing WPT test.

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): When all keyframes have "transform: none"
they transform function lists should match. This allows TransformOperations::blend to avoid doing
matrix interpolation to generate the interpolated transform.

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287916 => 287917)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-12 10:29:01 UTC (rev 287916)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-01-12 11:40:15 UTC (rev 287917)
@@ -1,3 +1,12 @@
+2022-01-12  Martin Robinson  <mrobin...@webkit.org>
+
+        Interpolation during animation of two empty transform lists should always yield "none"
+        https://bugs.webkit.org/show_bug.cgi?id=235069
+
+        Reviewed by Antoine Quint.
+
+        * web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Update to show passes.
+
 2022-01-12  Youenn Fablet  <you...@apple.com>
 
         New service worker API 'FetchEvent.handled' needs to be supported

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt (287916 => 287917)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt	2022-01-12 10:29:01 UTC (rev 287916)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt	2022-01-12 11:40:15 UTC (rev 287917)
@@ -1,8 +1,8 @@
 
 PASS CSS Transitions: property <transform> from [none] to [none] at (0.25) should be [none]
 PASS CSS Transitions with transition: all: property <transform> from [none] to [none] at (0.25) should be [none]
-FAIL CSS Animations: property <transform> from [none] to [none] at (0.25) should be [none] assert_equals: expected "none " but got "matrix ( 1 , 0 , 0 , 1 , 0 , 0 ) "
-FAIL Web Animations: property <transform> from [none] to [none] at (0.25) should be [none] assert_equals: expected "none " but got "matrix ( 1 , 0 , 0 , 1 , 0 , 0 ) "
+PASS CSS Animations: property <transform> from [none] to [none] at (0.25) should be [none]
+PASS Web Animations: property <transform> from [none] to [none] at (0.25) should be [none]
 PASS CSS Transitions: property <transform> from [none] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(50px) rotate(180deg)]
 PASS CSS Transitions with transition: all: property <transform> from [none] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(50px) rotate(180deg)]
 PASS CSS Animations: property <transform> from [none] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(50px) rotate(180deg)]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt (287916 => 287917)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt	2022-01-12 10:29:01 UTC (rev 287916)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt	2022-01-12 11:40:15 UTC (rev 287917)
@@ -12,7 +12,7 @@
 PASS Commits transforms
 FAIL Commits transforms as a transform list assert_equals: expected "translate(20px, 20px)" but got "matrix(1, 0, 0, 1, 20, 20)"
 FAIL Commits matrix-interpolated relative transforms assert_equals: Resolved transform is correct after commit. expected "matrix(2, 0, 0, 2, 100, 0)" but got "matrix(2, 0, 0, 2, 0, 0)"
-FAIL Commits "none" transform assert_equals: Resolved transform is correct after commit. expected "none" but got "matrix(1, 0, 0, 1, 0, 0)"
+PASS Commits "none" transform
 PASS Commits the intermediate value of an animation in the middle of stack
 FAIL Commit composites on top of the underlying value assert_approx_equals: expected 0.5 +/- 0.0001 but got 1
 PASS Triggers mutation observers when updating style

Modified: trunk/Source/WebCore/ChangeLog (287916 => 287917)


--- trunk/Source/WebCore/ChangeLog	2022-01-12 10:29:01 UTC (rev 287916)
+++ trunk/Source/WebCore/ChangeLog	2022-01-12 11:40:15 UTC (rev 287917)
@@ -1,3 +1,17 @@
+2022-01-12  Martin Robinson  <mrobin...@webkit.org>
+
+        Interpolation during animation of two empty transform lists should always yield "none"
+        https://bugs.webkit.org/show_bug.cgi?id=235069
+
+        Reviewed by Antoine Quint.
+
+        No new tests. This is covered by an existing WPT test.
+
+        * animation/KeyframeEffect.cpp:
+        (WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): When all keyframes have "transform: none"
+        they transform function lists should match. This allows TransformOperations::blend to avoid doing
+        matrix interpolation to generate the interpolated transform.
+
 2022-01-12  Nikolas Zimmermann  <nzimmerm...@igalia.com>
 
         [LBSE] Rename RenderSVGContainer -> LegacyRenderSVGContainer

Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (287916 => 287917)


--- trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-01-12 10:29:01 UTC (rev 287916)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-01-12 11:40:15 UTC (rev 287917)
@@ -1045,8 +1045,11 @@
         }
     }
 
-    if (firstNonEmptyTransformKeyframeIndex == numKeyframes)
+    // All of the frames have an empty list of transform operations, so they match.
+    if (firstNonEmptyTransformKeyframeIndex == numKeyframes) {
+        m_transformFunctionListsMatch = true;
         return;
+    }
 
     const TransformOperations* firstVal = &m_blendingKeyframes[firstNonEmptyTransformKeyframeIndex].style()->transform();
     for (size_t i = firstNonEmptyTransformKeyframeIndex + 1; i < numKeyframes; ++i) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to