Title: [276551] trunk
- Revision
- 276551
- Author
- grao...@webkit.org
- Date
- 2021-04-24 12:32:35 -0700 (Sat, 24 Apr 2021)
Log Message
Computed style for the translate CSS property should use px for the z value
https://bugs.webkit.org/show_bug.cgi?id=225018
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark a single WPT progression.
* web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
Source/WebCore:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computedTranslate):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (276550 => 276551)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-24 16:02:06 UTC (rev 276550)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-24 19:32:35 UTC (rev 276551)
@@ -1,3 +1,15 @@
+2021-04-24 Antoine Quint <grao...@webkit.org>
+
+ Computed style for the translate CSS property should use px for the z value
+ https://bugs.webkit.org/show_bug.cgi?id=225018
+
+ Reviewed by Dean Jackson.
+
+ Mark a single WPT progression.
+
+ * web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
+
2021-04-23 Cathie Chen <cathiec...@igalia.com>
Not computing image aspect ratios from width and height attributes for lazy loaded images
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt (276550 => 276551)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt 2021-04-24 16:02:06 UTC (rev 276550)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt 2021-04-24 19:32:35 UTC (rev 276551)
@@ -1,22 +1,22 @@
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (-1) should be [-100% calc(200px + 100%) 300px] assert_equals: expected "0px 200px 300 " but got "- 100px "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0) should be [calc(50px + 0%) calc(200px + 50%) 300px] assert_equals: expected "50px 200px 300 " but got "- 50px "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.25) should be [calc(62.5px + 25%) calc(200px + 37.5%) 300px] assert_equals: expected "62.5px 200px 300 " but got "- 37.5px "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.75) should be [calc(87.5px + 75%) calc(200px + 12.5%) 300px] assert_equals: expected "87.5px 200px 300 " but got "- 12.5px "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (1) should be [calc(100px + 100%) calc(200px + 0%) 300px] assert_equals: expected "100px 200px 300 " but got "0px "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (2) should be [calc(150px + 200%) calc(200px - 50%) 300px] assert_equals: expected "150px 200px 300 " but got "50px "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (-1) should be [100% calc(600px - 50%) 500px] assert_equals: expected "0px 600px 500 " but got "- 200px 200px - 100 "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0) should be [calc(100px + 50%) calc(300px + 0%) 300px] assert_equals: expected "100px 300px 300 " but got "0px 100px "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.25) should be [calc(125px + 37.5%) calc(225px + 12.5%) 250px] assert_equals: expected "125px 225px 250 " but got "50px 75px 25 "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.75) should be [calc(175px + 12.5%) calc(75px + 37.5%) 150px] assert_equals: expected "175px 75px 150 " but got "150px 25px 75 "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (-1) should be [-100% calc(200px + 100%) 300px] assert_equals: expected "0px 200px 300px " but got "- 100px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0) should be [calc(50px + 0%) calc(200px + 50%) 300px] assert_equals: expected "50px 200px 300px " but got "- 50px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.25) should be [calc(62.5px + 25%) calc(200px + 37.5%) 300px] assert_equals: expected "62.5px 200px 300px " but got "- 37.5px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.75) should be [calc(87.5px + 75%) calc(200px + 12.5%) 300px] assert_equals: expected "87.5px 200px 300px " but got "- 12.5px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (1) should be [calc(100px + 100%) calc(200px + 0%) 300px] assert_equals: expected "100px 200px 300px " but got "0px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (2) should be [calc(150px + 200%) calc(200px - 50%) 300px] assert_equals: expected "150px 200px 300px " but got "50px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (-1) should be [100% calc(600px - 50%) 500px] assert_equals: expected "0px 600px 500px " but got "- 200px 200px - 100px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0) should be [calc(100px + 50%) calc(300px + 0%) 300px] assert_equals: expected "100px 300px 300px " but got "0px 100px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.25) should be [calc(125px + 37.5%) calc(225px + 12.5%) 250px] assert_equals: expected "125px 225px 250px " but got "50px 75px 25px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.75) should be [calc(175px + 12.5%) calc(75px + 37.5%) 150px] assert_equals: expected "175px 75px 150px " but got "150px 25px 75px "
PASS Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (1) should be [calc(200px + 0%) 50% 100px]
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (2) should be [calc(300px - 50%) calc(-300px + 100%) -100px] assert_equals: expected "300px - 300px - 100 " but got "400px - 100px 200 "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (-1) should be [calc(-300px + 100%) -50% -400px] assert_equals: expected "- 300px 0px - 400 " but got "- 200px 200px - 100 "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (2) should be [calc(300px - 50%) calc(-300px + 100%) -100px] assert_equals: expected "300px - 300px - 100px " but got "400px - 100px 200px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (-1) should be [calc(-300px + 100%) -50% -400px] assert_equals: expected "- 300px 0px - 400px " but got "- 200px 200px - 100px "
PASS Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0) should be [50% calc(100px + 0%)]
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.25) should be [calc(75px + 37.5%) calc(125px + 12.5%) 100px] assert_equals: expected "75px 125px 100 " but got "50px 75px 25 "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.75) should be [calc(225px + 12.5%) calc(175px + 37.5%) 300px] assert_equals: expected "225px 175px 300 " but got "150px 25px 75 "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (1) should be [calc(300px + 0%) calc(200px + 50%) 400px] assert_equals: expected "300px 200px 400 " but got "200px 0px 100 "
-FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (2) should be [calc(600px - 50%) calc(300px + 100%) 800px] assert_equals: expected "600px 300px 800 " but got "400px - 100px 200 "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.25) should be [calc(75px + 37.5%) calc(125px + 12.5%) 100px] assert_equals: expected "75px 125px 100px " but got "50px 75px 25px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.75) should be [calc(225px + 12.5%) calc(175px + 37.5%) 300px] assert_equals: expected "225px 175px 300px " but got "150px 25px 75px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (1) should be [calc(300px + 0%) calc(200px + 50%) 400px] assert_equals: expected "300px 200px 400px " but got "200px 0px 100px "
+FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (2) should be [calc(600px - 50%) calc(300px + 100%) 800px] assert_equals: expected "600px 300px 800px " but got "400px - 100px 200px "
PASS Compositing: property <translate> underlying [none] from replace [none] to add [100px] at (-1) should be [-100px]
PASS Compositing: property <translate> underlying [none] from replace [none] to add [100px] at (0) should be [none]
PASS Compositing: property <translate> underlying [none] from replace [none] to add [100px] at (0.25) should be [25px]
@@ -41,18 +41,18 @@
PASS Compositing: property <translate> underlying [none] from replace [0px 40px 60px] to add [none] at (0.75) should be [0px 10px 15px]
PASS Compositing: property <translate> underlying [none] from replace [0px 40px 60px] to add [none] at (1) should be [none]
PASS Compositing: property <translate> underlying [none] from replace [0px 40px 60px] to add [none] at (2) should be [0px -40px -60px]
-FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (-1) should be [160px 0px -60px] assert_equals: expected "160px 0px - 60 " but got "0px - 40px - 60 "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (-1) should be [160px 0px -60px] assert_equals: expected "160px 0px - 60px " but got "0px - 40px - 60px "
FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (0) should be [80px 20px] assert_equals: expected "80px 20px " but got "none "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (0.25) should be [60px 25px 15px] assert_equals: expected "60px 25px 15 " but got "0px 10px 15 "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (0.5) should be [40px 30px 30px] assert_equals: expected "40px 30px 30 " but got "0px 20px 30 "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (0.75) should be [20px 35px 45px] assert_equals: expected "20px 35px 45 " but got "0px 30px 45 "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (0.25) should be [60px 25px 15px] assert_equals: expected "60px 25px 15px " but got "0px 10px 15px "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (0.5) should be [40px 30px 30px] assert_equals: expected "40px 30px 30px " but got "0px 20px 30px "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (0.75) should be [20px 35px 45px] assert_equals: expected "20px 35px 45px " but got "0px 30px 45px "
PASS Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (1) should be [0px 40px 60px]
-FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (2) should be [-80px 60px 120px] assert_equals: expected "- 80px 60px 120 " but got "0px 80px 120 "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (-1) should be [160px 120px 120px] assert_equals: expected "160px 120px 120 " but got "0px 80px 120 "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0) should be [80px 60px 60px] assert_equals: expected "80px 60px 60 " but got "0px 40px 60 "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0.25) should be [60px 45px 45px] assert_equals: expected "60px 45px 45 " but got "0px 30px 45 "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0.5) should be [40px 30px 30px] assert_equals: expected "40px 30px 30 " but got "0px 20px 30 "
-FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0.75) should be [20px 15px 15px] assert_equals: expected "20px 15px 15 " but got "0px 10px 15 "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [none] to replace [0px 40px 60px] at (2) should be [-80px 60px 120px] assert_equals: expected "- 80px 60px 120px " but got "0px 80px 120px "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (-1) should be [160px 120px 120px] assert_equals: expected "160px 120px 120px " but got "0px 80px 120px "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0) should be [80px 60px 60px] assert_equals: expected "80px 60px 60px " but got "0px 40px 60px "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0.25) should be [60px 45px 45px] assert_equals: expected "60px 45px 45px " but got "0px 30px 45px "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0.5) should be [40px 30px 30px] assert_equals: expected "40px 30px 30px " but got "0px 20px 30px "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (0.75) should be [20px 15px 15px] assert_equals: expected "20px 15px 15px " but got "0px 10px 15px "
PASS Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (1) should be [none]
-FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (2) should be [-80px -60px -60px] assert_equals: expected "- 80px - 60px - 60 " but got "0px - 40px - 60 "
+FAIL Compositing: property <translate> underlying [80px 20px] from add [0px 40px 60px] to replace [none] at (2) should be [-80px -60px -60px] assert_equals: expected "- 80px - 60px - 60px " but got "0px - 40px - 60px "
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt (276550 => 276551)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt 2021-04-24 16:02:06 UTC (rev 276550)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt 2021-04-24 19:32:35 UTC (rev 276551)
@@ -216,8 +216,8 @@
PASS translate (type: translateList) has testInterpolation function
PASS translate with two unspecified values
PASS translate with one unspecified value
-FAIL translate with all three values specified assert_equals: The value should be 300px 100px 200px at 500ms expected "300px 100px 200px" but got "300px 100px 200"
-FAIL translate with combination of percentages and lengths assert_equals: The value should be calc(0% + 200px) calc(25% - 50.5px) 200px at 500ms expected "calc(0% + 200px) calc(25% - 50.5px) 200px" but got "200px -50.5px 200"
+PASS translate with all three values specified
+FAIL translate with combination of percentages and lengths assert_equals: The value should be calc(0% + 200px) calc(25% - 50.5px) 200px at 500ms expected "calc(0% + 200px) calc(25% - 50.5px) 200px" but got "200px -50.5px 200px"
PASS scale (type: scaleList) has testInterpolation function
PASS scale with two unspecified values
PASS scale with one unspecified value
Modified: trunk/Source/WebCore/ChangeLog (276550 => 276551)
--- trunk/Source/WebCore/ChangeLog 2021-04-24 16:02:06 UTC (rev 276550)
+++ trunk/Source/WebCore/ChangeLog 2021-04-24 19:32:35 UTC (rev 276551)
@@ -1,3 +1,13 @@
+2021-04-24 Antoine Quint <grao...@webkit.org>
+
+ Computed style for the translate CSS property should use px for the z value
+ https://bugs.webkit.org/show_bug.cgi?id=225018
+
+ Reviewed by Dean Jackson.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::computedTranslate):
+
2021-04-24 Tyler Wilcock <twilc...@protonmail.com>
Refactor ValueRange from enum to enum class
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (276550 => 276551)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2021-04-24 16:02:06 UTC (rev 276550)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2021-04-24 19:32:35 UTC (rev 276551)
@@ -623,7 +623,7 @@
} else {
list->append(zoomAdjustedPixelValue(transform.m41(), style));
list->append(zoomAdjustedPixelValue(transform.m42(), style));
- list->append(zoomAdjustedNumberValue(transform.m43(), style));
+ list->append(zoomAdjustedPixelValue(transform.m43(), style));
}
return list;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes