Title: [289903] trunk
Revision
289903
Author
mrobin...@webkit.org
Date
2022-02-16 10:08:58 -0800 (Wed, 16 Feb 2022)

Log Message

transform: perspective(0) should not be considered an identity operation
https://bugs.webkit.org/show_bug.cgi?id=236644

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt: Update expectations.
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

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

* platform/graphics/transforms/PerspectiveTransformOperation.h: When the value of a perspective operation
is zero, it isn't an identity operation, because it will be rounded to 1px.

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289902 => 289903)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-16 18:04:21 UTC (rev 289902)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-16 18:08:58 UTC (rev 289903)
@@ -1,3 +1,13 @@
+2022-02-16  Martin Robinson  <mrobin...@webkit.org>
+
+        transform: perspective(0) should not be considered an identity operation
+        https://bugs.webkit.org/show_bug.cgi?id=236644
+
+        Reviewed by Antoine Quint.
+
+        * web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt: Update expectations.
+        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
+
 2022-02-16  Ziran Sun  <z...@igalia.com>
 
         [InputElement] Remove extra form data made by image submit button when "value" attribute is present.

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt (289902 => 289903)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt	2022-02-16 18:04:21 UTC (rev 289902)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt	2022-02-16 18:08:58 UTC (rev 289903)
@@ -161,12 +161,12 @@
 PASS Web Animations: property <transform> from [perspective(0.1px) translateZ(0.25px)] to [perspective(0.1px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
 PASS CSS Transitions: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
 PASS CSS Transitions with transition: all: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
-FAIL CSS Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 1 , 0 , 0 , 0.25 , 0.75 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0.25 , 1 ) "
-FAIL Web Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 1 , 0 , 0 , 0.25 , 0.75 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0.25 , 1 ) "
-FAIL CSS Transitions: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
-FAIL CSS Transitions with transition: all: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
-FAIL CSS Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
-FAIL Web Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.67 , 0 , 0 , 0.5 , 0.67 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , - 0.17 , 0 , 0 , 0.5 , 0.92 ) "
+PASS CSS Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
+PASS Web Animations: property <transform> from [perspective(0px) translateZ(0.25px)] to [perspective(0px) translateZ(0.25px)] at (0.5) should be [perspective(1px) translateZ(0.25px)]
+PASS CSS Transitions: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
+PASS CSS Transitions with transition: all: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
+PASS CSS Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
+PASS Web Animations: property <transform> from [perspective(0px) translateZ(0.5px)] to [perspective(3px) translateZ(0.5px)] at (0.5) should be [perspective(1.5px) translateZ(0.5px)]
 PASS CSS Transitions: property <transform> from [perspective(10px) translateZ(0.5px)] to [perspective(1px) translateZ(0.5px)] at (-1) should be [translateZ(0.5px)]
 PASS CSS Transitions with transition: all: property <transform> from [perspective(10px) translateZ(0.5px)] to [perspective(1px) translateZ(0.5px)] at (-1) should be [translateZ(0.5px)]
 PASS CSS Animations: property <transform> from [perspective(10px) translateZ(0.5px)] to [perspective(1px) translateZ(0.5px)] at (-1) should be [translateZ(0.5px)]

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt	2022-02-16 18:04:21 UTC (rev 289902)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt	2022-02-16 18:08:58 UTC (rev 289903)
@@ -227,7 +227,7 @@
 PASS transform: non-invertible matrices
 PASS transform: non-invertible matrices in matched transform lists
 PASS transform: non-invertible matrices in mismatched transform lists
-FAIL transform: perspective assert_approx_equals: expected matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.55, 0, 0, 0, 1) but got matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.05, 0, 0, 0, 1): The value should be matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.55, 0, 0, 0, 1) at 500ms but got matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.05, 0, 0, 0, 1) expected -0.55 +/- 0.0001 but got -0.05
+PASS transform: perspective
 PASS transform-box (type: discrete) has testInterpolation function
 PASS transform-box uses discrete animation when animating between "fill-box" and "border-box" with linear easing
 PASS transform-box uses discrete animation when animating between "fill-box" and "border-box" with effect easing

Modified: trunk/Source/WebCore/ChangeLog (289902 => 289903)


--- trunk/Source/WebCore/ChangeLog	2022-02-16 18:04:21 UTC (rev 289902)
+++ trunk/Source/WebCore/ChangeLog	2022-02-16 18:08:58 UTC (rev 289903)
@@ -1,3 +1,15 @@
+2022-02-16  Martin Robinson  <mrobin...@webkit.org>
+
+        transform: perspective(0) should not be considered an identity operation
+        https://bugs.webkit.org/show_bug.cgi?id=236644
+
+        Reviewed by Antoine Quint.
+
+        No new tests. This is covered by existing WPT tests.
+
+        * platform/graphics/transforms/PerspectiveTransformOperation.h: When the value of a perspective operation
+        is zero, it isn't an identity operation, because it will be rounded to 1px.
+
 2022-02-16  Ziran Sun  <z...@igalia.com>
 
         [InputElement] Remove extra form data made by image submit button when "value" attribute is present.

Modified: trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h (289902 => 289903)


--- trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h	2022-02-16 18:04:21 UTC (rev 289902)
+++ trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h	2022-02-16 18:08:58 UTC (rev 289903)
@@ -50,7 +50,7 @@
     std::optional<Length> perspective() const { return m_p; }
     
 private:
-    bool isIdentity() const override { return !m_p || !floatValueForLength(*m_p, 1); }
+    bool isIdentity() const override { return !m_p; }
     bool isAffectedByTransformOrigin() const override { return !isIdentity(); }
     bool isRepresentableIn2D() const final { return false; }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to