Title: [266659] trunk
Revision
266659
Author
[email protected]
Date
2020-09-05 08:18:36 -0700 (Sat, 05 Sep 2020)

Log Message

Implement serialization of CSSPropertyGap
https://bugs.webkit.org/show_bug.cgi?id=216210

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-align/parsing/gap-valid-expected.txt: Expect pass.

Source/WebCore:

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const): Use get2Values to serialize
the gap shorthand.

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266658 => 266659)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-09-05 10:11:24 UTC (rev 266658)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-09-05 15:18:36 UTC (rev 266659)
@@ -1,3 +1,12 @@
+2020-09-05  Darin Adler  <[email protected]>
+
+        Implement serialization of CSSPropertyGap
+        https://bugs.webkit.org/show_bug.cgi?id=216210
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/css/css-align/parsing/gap-valid-expected.txt: Expect pass.
+
 2020-09-04  Alex Christensen  <[email protected]>
 
         Align KOI8-U and ibm866 encodings with Chrome, Firefox, and the specification

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/gap-valid-expected.txt (266658 => 266659)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/gap-valid-expected.txt	2020-09-05 10:11:24 UTC (rev 266658)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/gap-valid-expected.txt	2020-09-05 15:18:36 UTC (rev 266659)
@@ -1,11 +1,11 @@
 
-FAIL e.style['gap'] = "normal normal" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "10px 10px" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "20% 20%" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "calc(20% + 10px) calc(20% + 10px)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "normal 10px" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "10px 20%" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "20% calc(20% + 10px)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "calc(20% + 10px) 0px" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['gap'] = "0px normal" should set the property value assert_not_equals: property should be set got disallowed value ""
+PASS e.style['gap'] = "normal normal" should set the property value 
+PASS e.style['gap'] = "10px 10px" should set the property value 
+PASS e.style['gap'] = "20% 20%" should set the property value 
+PASS e.style['gap'] = "calc(20% + 10px) calc(20% + 10px)" should set the property value 
+PASS e.style['gap'] = "normal 10px" should set the property value 
+PASS e.style['gap'] = "10px 20%" should set the property value 
+PASS e.style['gap'] = "20% calc(20% + 10px)" should set the property value 
+PASS e.style['gap'] = "calc(20% + 10px) 0px" should set the property value 
+PASS e.style['gap'] = "0px normal" should set the property value 
 

Modified: trunk/Source/WebCore/ChangeLog (266658 => 266659)


--- trunk/Source/WebCore/ChangeLog	2020-09-05 10:11:24 UTC (rev 266658)
+++ trunk/Source/WebCore/ChangeLog	2020-09-05 15:18:36 UTC (rev 266659)
@@ -1,3 +1,14 @@
+2020-09-05  Darin Adler  <[email protected]>
+
+        Implement serialization of CSSPropertyGap
+        https://bugs.webkit.org/show_bug.cgi?id=216210
+
+        Reviewed by Alex Christensen.
+
+        * css/StyleProperties.cpp:
+        (WebCore::StyleProperties::getPropertyValue const): Use get2Values to serialize
+        the gap shorthand.
+
 2020-09-05  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r266614 and r266657.

Modified: trunk/Source/WebCore/css/StyleProperties.cpp (266658 => 266659)


--- trunk/Source/WebCore/css/StyleProperties.cpp	2020-09-05 10:11:24 UTC (rev 266658)
+++ trunk/Source/WebCore/css/StyleProperties.cpp	2020-09-05 15:18:36 UTC (rev 266659)
@@ -149,8 +149,6 @@
             return String();
     }
 
-    // FIXME: If all longhands are initial or inherit, the shorthand should be serialized as that keyword.
-
     // Shorthand and 4-values properties
     switch (propertyID) {
     case CSSPropertyAll:
@@ -285,6 +283,8 @@
         return String();
     case CSSPropertyBorderRadius:
         return get4Values(borderRadiusShorthand());
+    case CSSPropertyGap:
+        return get2Values(gapShorthand());
 #if ENABLE(CSS_SCROLL_SNAP)
     case CSSPropertyScrollSnapMargin:
         return get4Values(scrollSnapMarginShorthand());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to