Title: [289732] trunk
Revision
289732
Author
[email protected]
Date
2022-02-14 06:03:06 -0800 (Mon, 14 Feb 2022)

Log Message

Animation from "scale()" to "scale() translate()" does not yield the expected result
https://bugs.webkit.org/show_bug.cgi?id=222595
<rdar://problem/74926700>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark tests as passing.
* web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
* web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt:

Source/WebCore:

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

When blending two transform lists, where one list is longer than the other, extending the
shorter list with identity transform functions. This is the behavior specified in the
CSS Transforms Module Level 2 specification.

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): Instead of checking each frame
against the first keyframe, collect a list of shared transform primitives and check that each
list has the same number of compatible primitives or a prefix of compatible primitives and is
shorter.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): When the transform operation
lists have different sizes, don't always return false. Instead check that the parts that do exist
have matching primitives.
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::operationsMatch const):  Only check the transformations in
the shared list size.
(WebCore::TransformOperations::blendByMatchingOperations const): Properly handle when one of the
two operations is null instead of just the toOperation.

LayoutTests:

* compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt:
* compositing/layer-creation/translate-scale-animation-overlap-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (289731 => 289732)


--- trunk/LayoutTests/ChangeLog	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/ChangeLog	2022-02-14 14:03:06 UTC (rev 289732)
@@ -1,3 +1,14 @@
+2022-02-14  Martin Robinson  <[email protected]>
+
+        Animation from "scale()" to "scale() translate()" does not yield the expected result
+        https://bugs.webkit.org/show_bug.cgi?id=222595
+        <rdar://problem/74926700>
+
+        Reviewed by Simon Fraser.
+
+        * compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt:
+        * compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
+
 2022-02-13  Fujii Hironori  <[email protected]>
 
         Delete fast/animation/request-animation-frame-disabled.html after RequestAnimationFrameEnabled setting is deleted

Modified: trunk/LayoutTests/compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt (289731 => 289732)


--- trunk/LayoutTests/compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt	2022-02-14 14:03:06 UTC (rev 289732)
@@ -5,7 +5,7 @@
     (GraphicsLayer
       (bounds 800.00 600.00)
       (contentsOpaque 1)
-      (children 783
+      (children 800
         (GraphicsLayer
           (offsetFromRenderer width=-14 height=-14)
           (position 34.00 66.00)
@@ -14,11 +14,6 @@
           (drawsContent 1)
         )
         (GraphicsLayer
-          (position 20.00 30.00)
-          (bounds 4.00 4.00)
-          (contentsOpaque 1)
-        )
-        (GraphicsLayer
           (position 30.00 30.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -244,11 +239,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 40.00)
+          (position 480.00 30.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 30.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 40.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -474,11 +474,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 50.00)
+          (position 480.00 40.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 40.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 50.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -704,11 +709,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 60.00)
+          (position 480.00 50.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 50.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 60.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -934,11 +944,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 70.00)
+          (position 480.00 60.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 60.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 70.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1164,11 +1179,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 80.00)
+          (position 480.00 70.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 70.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 80.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1394,11 +1414,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 90.00)
+          (position 480.00 80.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 80.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 90.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1624,11 +1649,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 100.00)
+          (position 480.00 90.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 90.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 100.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1854,11 +1884,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 110.00)
+          (position 480.00 100.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 100.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 110.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2084,11 +2119,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 120.00)
+          (position 480.00 110.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 110.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 120.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2314,11 +2354,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 130.00)
+          (position 480.00 120.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 120.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 130.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2544,11 +2589,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 140.00)
+          (position 480.00 130.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 130.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 140.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2774,11 +2824,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 150.00)
+          (position 480.00 140.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 140.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 150.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3004,11 +3059,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 160.00)
+          (position 480.00 150.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 150.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 160.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3234,11 +3294,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 170.00)
+          (position 480.00 160.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 160.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 170.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3464,11 +3529,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 180.00)
+          (position 480.00 170.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 170.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 180.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3694,11 +3764,16 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
-          (position 20.00 190.00)
+          (position 480.00 180.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 490.00 180.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 30.00 190.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3923,6 +3998,16 @@
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
+        (GraphicsLayer
+          (position 480.00 190.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 490.00 190.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
       )
     )
   )

Modified: trunk/LayoutTests/compositing/layer-creation/translate-scale-animation-overlap-expected.txt (289731 => 289732)


--- trunk/LayoutTests/compositing/layer-creation/translate-scale-animation-overlap-expected.txt	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/compositing/layer-creation/translate-scale-animation-overlap-expected.txt	2022-02-14 14:03:06 UTC (rev 289732)
@@ -5,7 +5,7 @@
     (GraphicsLayer
       (bounds 800.00 600.00)
       (contentsOpaque 1)
-      (children 685
+      (children 739
         (GraphicsLayer
           (offsetFromRenderer width=-14 height=-14)
           (position 24.00 68.00)
@@ -204,6 +204,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 30.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 30.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 30.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 40.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -394,6 +409,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 40.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 40.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 40.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 50.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -584,6 +614,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 50.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 50.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 50.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 60.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -774,6 +819,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 60.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 60.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 60.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 70.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -964,6 +1024,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 70.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 70.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 70.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 80.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1154,6 +1229,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 80.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 80.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 80.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 90.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1344,6 +1434,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 90.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 90.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 90.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 100.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1534,6 +1639,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 100.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 100.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 100.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 110.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1724,6 +1844,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 110.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 110.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 110.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 120.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -1914,6 +2049,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 120.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 120.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 120.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 130.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2104,6 +2254,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 130.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 130.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 130.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 140.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2294,6 +2459,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 140.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 140.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 140.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 150.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2484,6 +2664,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 150.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 150.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 150.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 160.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2674,6 +2869,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 160.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 160.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 160.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 170.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -2864,6 +3074,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 170.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 170.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 170.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 180.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3054,6 +3279,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 180.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 180.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 180.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 190.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3244,6 +3484,21 @@
           (contentsOpaque 1)
         )
         (GraphicsLayer
+          (position 420.00 190.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 190.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 190.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
           (position 40.00 200.00)
           (bounds 4.00 4.00)
           (contentsOpaque 1)
@@ -3433,6 +3688,21 @@
           (bounds 4.00 4.00)
           (contentsOpaque 1)
         )
+        (GraphicsLayer
+          (position 420.00 200.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 430.00 200.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
+        (GraphicsLayer
+          (position 440.00 200.00)
+          (bounds 4.00 4.00)
+          (contentsOpaque 1)
+        )
       )
     )
   )

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289731 => 289732)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-14 14:03:06 UTC (rev 289732)
@@ -1,3 +1,15 @@
+2022-02-14  Martin Robinson  <[email protected]>
+
+        Animation from "scale()" to "scale() translate()" does not yield the expected result
+        https://bugs.webkit.org/show_bug.cgi?id=222595
+        <rdar://problem/74926700>
+
+        Reviewed by Simon Fraser.
+
+        * web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark tests as passing.
+        * web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
+        * web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt:
+
 2022-02-13  Matt Woodrow  <[email protected]>
 
         Add support for parsing 'subgrid' in grid-template-columns/row

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt	2022-02-14 14:03:06 UTC (rev 289732)
@@ -11,14 +11,14 @@
 PASS CSS Transitions with transition: all: property <transform> from [translate(200px) rotate(720deg)] to [none] at (0.25) should be [translate(150px) rotate(540deg)]
 PASS CSS Animations: property <transform> from [translate(200px) rotate(720deg)] to [none] at (0.25) should be [translate(150px) rotate(540deg)]
 PASS Web Animations: property <transform> from [translate(200px) rotate(720deg)] to [none] at (0.25) should be [translate(150px) rotate(540deg)]
-FAIL CSS Transitions: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
-FAIL CSS Transitions with transition: all: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
-FAIL CSS Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
-FAIL Web Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
-FAIL CSS Transitions: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
-FAIL CSS Transitions with transition: all: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
-FAIL CSS Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
-FAIL Web Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
+PASS CSS Transitions: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
+PASS CSS Transitions with transition: all: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
+PASS CSS Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
+PASS Web Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
+PASS CSS Transitions: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
+PASS CSS Transitions with transition: all: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
+PASS CSS Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
+PASS Web Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
 PASS CSS Transitions: property <transform> from [scale(2) rotate(360deg) translate(100px) matrix(1, 0, 0, 1, 100, 0) skew(0deg)] to [scale(3) rotate(1080deg) translate(200px) matrix(1, 0, 0, 1, 0, 200) skew(720deg)] at (0.25) should be [scale(2.25) rotate(540deg) translate(125px) matrix(1, 0, 0, 1, 75, 50) skew(180deg)]
 PASS CSS Transitions with transition: all: property <transform> from [scale(2) rotate(360deg) translate(100px) matrix(1, 0, 0, 1, 100, 0) skew(0deg)] to [scale(3) rotate(1080deg) translate(200px) matrix(1, 0, 0, 1, 0, 200) skew(720deg)] at (0.25) should be [scale(2.25) rotate(540deg) translate(125px) matrix(1, 0, 0, 1, 75, 50) skew(180deg)]
 PASS CSS Animations: property <transform> from [scale(2) rotate(360deg) translate(100px) matrix(1, 0, 0, 1, 100, 0) skew(0deg)] to [scale(3) rotate(1080deg) translate(200px) matrix(1, 0, 0, 1, 0, 200) skew(720deg)] at (0.25) should be [scale(2.25) rotate(540deg) translate(125px) matrix(1, 0, 0, 1, 75, 50) skew(180deg)]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt (289731 => 289732)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt	2022-02-14 14:03:06 UTC (rev 289732)
@@ -71,22 +71,22 @@
 PASS Web Animations: property <transform> from [scaleZ(1) perspective(400px)] to [scaleZ(2) perspective(500px)] at (0.75) should be [scaleZ(1.75) perspective(470.5882352941176px)]
 PASS Web Animations: property <transform> from [scaleZ(1) perspective(400px)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
 PASS Web Animations: property <transform> from [scaleZ(1) perspective(400px)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(3) perspective(666.6666666666666px)]
-FAIL CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
+PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
 PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
 PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
 PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
 PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(2) perspective(250px)]
-FAIL CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
+PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
 PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
 PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
 PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
 PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(2) perspective(250px)]
-FAIL CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
+PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
 PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
 PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
 PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
 PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(2) perspective(250px)]
-FAIL Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
+PASS Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
 PASS Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
 PASS Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
 PASS Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt (289731 => 289732)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt	2022-02-14 14:03:06 UTC (rev 289732)
@@ -23,30 +23,30 @@
 PASS Web Animations: property <transform> from [skewX(10rad) scaleZ(1)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
 PASS Web Animations: property <transform> from [skewX(10rad) scaleZ(1)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
 PASS Web Animations: property <transform> from [skewX(10rad) scaleZ(1)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
-FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
+PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
 PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
-FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
-FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
+PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
+PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
 PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
-FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
-FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
+PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
+PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
 PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
-FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
-FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
+PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
+PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
 PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
-FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
-FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
+PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
+PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
 PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
-FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
-FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
+PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
+PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
 PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
-FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
-FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
+PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
+PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
 PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
-FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
-FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
+PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
+PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
 PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
-FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
+PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
 PASS CSS Transitions: property <transform> from [scaleZ(3) perspective(400px)] to [scaleZ(4) skewX(1rad) perspective(500px)] at (-1) should be [scaleZ(2) matrix3d(1, 0, 0, 0, -1.55741, 1, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)]
 PASS CSS Transitions: property <transform> from [scaleZ(3) perspective(400px)] to [scaleZ(4) skewX(1rad) perspective(500px)] at (0) should be [scaleZ(3) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)]
 PASS CSS Transitions: property <transform> from [scaleZ(3) perspective(400px)] to [scaleZ(4) skewX(1rad) perspective(500px)] at (0.25) should be [scaleZ(3.25) matrix3d(1, 0, 0, 0, 0.389352, 1, 0, 0, 0, 0, 1, -0.002375, 0, 0, 0, 1)]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt (289731 => 289732)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt	2022-02-14 14:03:06 UTC (rev 289732)
@@ -216,8 +216,8 @@
 PASS transform: skew
 PASS transform: rotate and translate
 PASS transform: translate and rotate
-FAIL transform: extend shorter list (from) assert_approx_equals: expected matrix(-1, 0, 0, -1, -50, 0) but got matrix(1, 0, 0, 1, 50, 0): The value should be matrix(-1, 0, 0, -1, -50, 0) at 500ms but got matrix(1, 0, 0, 1, 50, 0) expected -1 +/- 0.0001 but got 1
-FAIL transform: extend shorter list (to) assert_approx_equals: expected matrix(-1, 0, 0, -1, -50, 0) but got matrix(1, 0, 0, 1, 50, 0): The value should be matrix(-1, 0, 0, -1, -50, 0) at 500ms but got matrix(1, 0, 0, 1, 50, 0) expected -1 +/- 0.0001 but got 1
+PASS transform: extend shorter list (from)
+PASS transform: extend shorter list (to)
 PASS transform: mismatch order of translate and rotate
 PASS transform: matrix
 PASS transform: rotate3d

Modified: trunk/Source/WebCore/ChangeLog (289731 => 289732)


--- trunk/Source/WebCore/ChangeLog	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/Source/WebCore/ChangeLog	2022-02-14 14:03:06 UTC (rev 289732)
@@ -1,3 +1,32 @@
+2022-02-14  Martin Robinson  <[email protected]>
+
+        Animation from "scale()" to "scale() translate()" does not yield the expected result
+        https://bugs.webkit.org/show_bug.cgi?id=222595
+        <rdar://problem/74926700>
+
+        Reviewed by Simon Fraser.
+
+        No new tests. This is covered by existing WPT tests.
+
+        When blending two transform lists, where one list is longer than the other, extending the
+        shorter list with identity transform functions. This is the behavior specified in the
+        CSS Transforms Module Level 2 specification.
+
+        * animation/KeyframeEffect.cpp:
+        (WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): Instead of checking each frame
+        against the first keyframe, collect a list of shared transform primitives and check that each
+        list has the same number of compatible primitives or a prefix of compatible primitives and is
+        shorter.
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): When the transform operation
+        lists have different sizes, don't always return false. Instead check that the parts that do exist
+        have matching primitives.
+        * platform/graphics/transforms/TransformOperations.cpp:
+        (WebCore::TransformOperations::operationsMatch const):  Only check the transformations in
+        the shared list size.
+        (WebCore::TransformOperations::blendByMatchingOperations const): Properly handle when one of the
+        two operations is null instead of just the toOperation.
+
 2022-02-14  Alejandro G. Castro  <[email protected]>
 
         [GTK][WPE] Avoid mapping attributes when the vector is empty in createImage

Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (289731 => 289732)


--- trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-02-14 14:03:06 UTC (rev 289732)
@@ -938,34 +938,11 @@
     if (m_blendingKeyframes.size() < 2 || !m_blendingKeyframes.containsProperty(CSSPropertyTransform))
         return;
 
-    // Empty transforms match anything, so find the first non-empty entry as the reference.
-    size_t numKeyframes = m_blendingKeyframes.size();
-    size_t firstNonEmptyTransformKeyframeIndex = numKeyframes;
+    Vector<TransformOperation::OperationType> sharedPrimitives;
+    sharedPrimitives.reserveInitialCapacity(m_blendingKeyframes[0].style()->transform().operations().size());
 
-    for (size_t i = 0; i < numKeyframes; ++i) {
-        const KeyframeValue& currentKeyframe = m_blendingKeyframes[i];
-        if (currentKeyframe.style()->transform().operations().size()) {
-            firstNonEmptyTransformKeyframeIndex = i;
-            break;
-        }
-    }
-
-    // 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) {
-        const KeyframeValue& currentKeyframe = m_blendingKeyframes[i];
-        const TransformOperations* val = &currentKeyframe.style()->transform();
-
-        // An empty transform list matches anything.
-        if (val->operations().isEmpty())
-            continue;
-
-        if (!firstVal->operationsMatch(*val))
+    for (const auto& keyframe : m_blendingKeyframes) {
+        if (!keyframe.style()->transform().updateSharedPrimitives(sharedPrimitives))
             return;
     }
 

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (289731 => 289732)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2022-02-14 14:03:06 UTC (rev 289732)
@@ -733,43 +733,8 @@
     sharedPrimitives.clear();
     sharedPrimitives.reserveInitialCapacity(operationsAt(valueList, 0).size());
 
-    // Find a list of transform primitives for the given TransformOperations which are compatible with the primitives
-    // stored in sharedPrimitives. The results are written back into sharedPrimitives. This returns false if any element
-    // of TransformOperation does not have a shared primitive, otherwise it returns true.
-    auto updateSharedPrimitives = [&](const TransformOperations& operations) {
-        // Empty transform lists are implicitly a list of identity transforms.
-        if (!operations.size())
-            return true;
-
-        // If we have seen a non-empty list already and this list's size doesn't match, then we can't use shared
-        // primitives. FIXME: This should handle prefix matches and then fall back to matrix interpolation for the rest
-        // of the list.
-        // See: https://bugs.webkit.org/show_bug.cgi?id=235757
-        if (sharedPrimitives.size() && sharedPrimitives.size() != operations.size())
-            return false;
-
-        for (size_t i = 0; i < operations.size(); ++i) {
-            const auto* operation = operations.at(i);
-
-            // If we haven't seen an operation at this index before, we can simply use our primitive type.
-            if (i >= sharedPrimitives.size()) {
-                ASSERT(i == sharedPrimitives.size());
-                sharedPrimitives.append(operation->primitiveType());
-                continue;
-            }
-
-            if (auto sharedPrimitive = operation->sharedPrimitiveType(sharedPrimitives[i]))
-                sharedPrimitives[i] = *sharedPrimitive;
-            else
-                return false;
-        }
-
-        return true;
-    };
-
     for (size_t i = 0; i < valueList.size(); ++i) {
-        const TransformOperations& operations = operationsAt(valueList, i);
-        if (!updateSharedPrimitives(operations))
+        if (!operationsAt(valueList, i).updateSharedPrimitives(sharedPrimitives))
             return false;
     }
 

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp (289731 => 289732)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp	2022-02-14 14:03:06 UTC (rev 289732)
@@ -52,13 +52,11 @@
 
 bool TransformOperations::operationsMatch(const TransformOperations& other) const
 {
-    size_t numOperations = operations().size();
-    // If the sizes of the function lists don't match, the lists don't match
-    if (numOperations != other.operations().size())
-        return false;
-    
-    // If the types of each function are not the same, the lists don't match
-    for (size_t i = 0; i < numOperations; ++i) {
+    // If functions at the same index don't share a blending primitive, the lists don't match.
+    // When the lists are different sizes, the missing functions in the shorter list are treated
+    // as identity functions.
+    size_t minimumLength = std::min(operations().size(), other.operations().size());
+    for (size_t i = 0; i < minimumLength; ++i) {
         if (!operations()[i]->sharedPrimitiveType(other.operations()[i].get()))
             return false;
     }
@@ -65,6 +63,30 @@
     return true;
 }
 
+bool TransformOperations::updateSharedPrimitives(Vector<TransformOperation::OperationType>& sharedPrimitives) const
+{
+    for (size_t i = 0; i < operations().size(); ++i) {
+        const auto* operation = at(i);
+
+        // If we haven't seen an operation at this index before, we can simply use our primitive type.
+        if (i >= sharedPrimitives.size()) {
+            ASSERT(i == sharedPrimitives.size());
+            sharedPrimitives.append(operation->primitiveType());
+            continue;
+        }
+
+        if (auto sharedPrimitive = operation->sharedPrimitiveType(sharedPrimitives[i]))
+            sharedPrimitives[i] = *sharedPrimitive;
+        else {
+            // FIXME: This should handle prefix matches and then fall back to matrix interpolation for the rest
+            // of the list. See: https://bugs.webkit.org/show_bug.cgi?id=235757
+            return false;
+        }
+    }
+
+    return true;
+}
+
 bool TransformOperations::affectedByTransformOrigin() const
 {
     for (const auto& operation : m_operations) {
@@ -90,16 +112,19 @@
         RefPtr<TransformOperation> toOperation = (i < toOperationCount) ? operations()[i].get() : nullptr;
         if (fromOperation && toOperation && !fromOperation->sharedPrimitiveType(toOperation.get()))
             return blendByUsingMatrixInterpolation(from, context, boxSize);
-        RefPtr<TransformOperation> blendedOperation = toOperation ? toOperation->blend(fromOperation.get(), context) : (fromOperation ? RefPtr<TransformOperation>(fromOperation->blend(nullptr, context, true)) : nullptr);
-        if (blendedOperation)
-            result.operations().append(blendedOperation);
-        else {
-            auto identityOperation = IdentityTransformOperation::create();
-            if (context.progress > 0.5)
-                result.operations().append(toOperation ? toOperation : WTFMove(identityOperation));
-            else
-                result.operations().append(fromOperation ? fromOperation : WTFMove(identityOperation));
-        }
+
+        RefPtr<TransformOperation> blendedOperation;
+        if (fromOperation && toOperation)
+            blendedOperation = toOperation->blend(fromOperation.get(), context);
+        else if (!fromOperation)
+            blendedOperation = toOperation->blend(nullptr, 1 - context.progress, true);
+        else if (!toOperation)
+            blendedOperation = fromOperation->blend(nullptr, context, true);
+
+        // We should have exited early above if the fromOperation and toOperation didn't share a transform
+        // function primitive, so blending the two operations should always yield a result.
+        ASSERT(blendedOperation);
+        result.operations().append(blendedOperation);
     }
 
     return result;

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h (289731 => 289732)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h	2022-02-14 13:04:06 UTC (rev 289731)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h	2022-02-14 14:03:06 UTC (rev 289732)
@@ -71,6 +71,11 @@
     }
 
     bool operationsMatch(const TransformOperations&) const;
+
+    // Find a list of transform primitives for the given TransformOperations which are compatible with the primitives
+    // stored in sharedPrimitives. The results are written back into sharedPrimitives. This returns false if any element
+    // of TransformOperation does not have a shared primitive, otherwise it returns true.
+    bool updateSharedPrimitives(Vector<TransformOperation::OperationType>& sharedPrimitives) const;
     
     void clear()
     {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to