Title: [282830] trunk
- Revision
- 282830
- Author
- [email protected]
- Date
- 2021-09-21 11:27:59 -0700 (Tue, 21 Sep 2021)
Log Message
Fix the behavior that 3d translation's second value is serialized to 0px regardless of its specified unit if it is zero value.
https://bugs.webkit.org/show_bug.cgi?id=230534
Patch by Joonghun Park <[email protected]> on 2021-09-21
Reviewed by Simon Fraser.
When being serialized, the css value's unit should be preserved.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt:
* web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html: updated from wpt repository.
Source/WebCore:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeTranslate):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (282829 => 282830)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-21 18:26:46 UTC (rev 282829)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-21 18:27:59 UTC (rev 282830)
@@ -1,3 +1,15 @@
+2021-09-21 Joonghun Park <[email protected]>
+
+ Fix the behavior that 3d translation's second value is serialized to 0px regardless of its specified unit if it is zero value.
+ https://bugs.webkit.org/show_bug.cgi?id=230534
+
+ Reviewed by Simon Fraser.
+
+ When being serialized, the css value's unit should be preserved.
+
+ * web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt:
+ * web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html: updated from wpt repository.
+
2021-09-21 Eric Hutchison <[email protected]>
Unreviewed, reverting r282768.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt (282829 => 282830)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt 2021-09-21 18:26:46 UTC (rev 282829)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt 2021-09-21 18:27:59 UTC (rev 282830)
@@ -9,9 +9,13 @@
PASS e.style['translate'] = "100px 200%" should set the property value
PASS e.style['translate'] = "100% 200px" should set the property value
PASS e.style['translate'] = "100px 200px 0px" should set the property value
+PASS e.style['translate'] = "100px 0px 300px" should set the property value
PASS e.style['translate'] = "100px 0px 0px" should set the property value
PASS e.style['translate'] = "100px 200px 300px" should set the property value
PASS e.style['translate'] = "100% 200% 300px" should set the property value
+PASS e.style['translate'] = "100% 0% 200px" should set the property value
+PASS e.style['translate'] = "0% 0% 100px" should set the property value
+PASS e.style['translate'] = "0em 0em 100px" should set the property value
PASS e.style['translate'] = "calc(10% + 10px) calc(20% + 20px) calc(30em + 30px)" should set the property value
PASS e.style['translate'] = "0" should set the property value
PASS e.style['translate'] = "1px 2px 0" should set the property value
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html (282829 => 282830)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html 2021-09-21 18:26:46 UTC (rev 282829)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html 2021-09-21 18:27:59 UTC (rev 282830)
@@ -24,10 +24,15 @@
test_valid_value("translate", "100% 200px");
test_valid_value("translate", "100px 200px 0px", "100px 200px");
+test_valid_value("translate", "100px 0px 300px", "100px 0px 300px");
test_valid_value("translate", "100px 0px 0px", "100px");
test_valid_value("translate", "100px 200px 300px");
test_valid_value("translate", "100% 200% 300px");
+test_valid_value("translate", "100% 0% 200px", "100% 0% 200px");
+test_valid_value("translate", "0% 0% 100px", "0% 0% 100px");
+test_valid_value("translate", "0em 0em 100px", "0em 0em 100px");
+
test_valid_value("translate", "calc(10% + 10px) calc(20% + 20px) calc(30em + 30px)");
test_valid_value("translate", "0", "0px");
Modified: trunk/Source/WebCore/ChangeLog (282829 => 282830)
--- trunk/Source/WebCore/ChangeLog 2021-09-21 18:26:46 UTC (rev 282829)
+++ trunk/Source/WebCore/ChangeLog 2021-09-21 18:27:59 UTC (rev 282830)
@@ -1,3 +1,15 @@
+2021-09-21 Joonghun Park <[email protected]>
+
+ Fix the behavior that 3d translation's second value is serialized to 0px regardless of its specified unit if it is zero value.
+ https://bugs.webkit.org/show_bug.cgi?id=230534
+
+ Reviewed by Simon Fraser.
+
+ When being serialized, the css value's unit should be preserved.
+
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeTranslate):
+
2021-09-21 Alan Bujtas <[email protected]>
[IFC][Integration] Removed unused AvoidanceReason::FlowTextHasSurrogatePair
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (282829 => 282830)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2021-09-21 18:26:46 UTC (rev 282829)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2021-09-21 18:27:59 UTC (rev 282830)
@@ -1985,7 +1985,7 @@
return list;
// Add the zero value for y if we did not already add a y value.
if (list->length() == 1)
- list->append(CSSPrimitiveValue::create(0, CSSUnitType::CSS_PX));
+ list->append(*y);
list->append(*z);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes