Title: [272366] trunk
Revision
272366
Author
mrobin...@webkit.org
Date
2021-02-04 04:01:29 -0800 (Thu, 04 Feb 2021)

Log Message

Improve the serialization of scroll-snap-type and scroll-snap-align
https://bugs.webkit.org/show_bug.cgi?id=221324

LayoutTests/imported/w3c:

Reviewed by Alex Christensen.

* web-platform-tests/css/css-scroll-snap/inheritance-expected.txt:
* web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt:
* web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt:
* web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt:
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

Reviewed by Alex Christensen.

Improve serialization of scroll-snap-type and scroll-snap-align. When the values
are the same for both dimensions or a default value is used, don't add it to
the list of consumed tokens. The primitive conversion process will handle this
default correctly and serialization will produce a canonical serialization correctly.

We handle this case for both serialization of the style (eg getPropertyValue) and
for serialization of computed style.

No new tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForScrollSnapAlignment): For the computed style don't serialize
the second value if it is the same as the first.
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeScrollSnapAlign): Only add the second value to the value list if it
exists and if it is different than the first value.
(WebCore::consumeScrollSnapType): Only add the second value if it is a non-default value.

LayoutTests:

Reviewed by Alex Christensen.

* css3/scroll-snap/resources/iframe-content-rtl.html:
* css3/scroll-snap/resources/iframe-content.html:
* css3/scroll-snap/scroll-snap-inherit-expected.txt:
* css3/scroll-snap/scroll-snap-inherit.html:
* css3/scroll-snap/scroll-snap-initial-expected.txt:
* css3/scroll-snap/scroll-snap-initial.html:
* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
* css3/scroll-snap/scroll-snap-property-computed-style.js:
* platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (272365 => 272366)


--- trunk/LayoutTests/ChangeLog	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/ChangeLog	2021-02-04 12:01:29 UTC (rev 272366)
@@ -1,3 +1,20 @@
+2021-02-04  Martin Robinson  <mrobin...@igalia.com>
+
+        Improve the serialization of scroll-snap-type and scroll-snap-align
+        https://bugs.webkit.org/show_bug.cgi?id=221324
+
+        Reviewed by Alex Christensen.
+
+        * css3/scroll-snap/resources/iframe-content-rtl.html:
+        * css3/scroll-snap/resources/iframe-content.html:
+        * css3/scroll-snap/scroll-snap-inherit-expected.txt:
+        * css3/scroll-snap/scroll-snap-inherit.html:
+        * css3/scroll-snap/scroll-snap-initial-expected.txt:
+        * css3/scroll-snap/scroll-snap-initial.html:
+        * css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
+        * css3/scroll-snap/scroll-snap-property-computed-style.js:
+        * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
+
 2021-02-04  Rob Buis  <rb...@igalia.com>
 
         Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware

Modified: trunk/LayoutTests/css3/scroll-snap/resources/iframe-content-rtl.html (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/resources/iframe-content-rtl.html	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/resources/iframe-content-rtl.html	2021-02-04 12:01:29 UTC (rev 272366)
@@ -70,7 +70,7 @@
         top.succeeded = shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-type')", "both mandatory");
         document.querySelectorAll(".colorBox").forEach(colorBox => {
             window.colorBox = colorBox;
-            top.succeeded = shouldMatch("getComputedStyle(colorBox).getPropertyValue('scroll-snap-align')", "start start");
+            top.succeeded = shouldMatch("getComputedStyle(colorBox).getPropertyValue('scroll-snap-align')", "start");
         });
         if (top.succeeded)
             top.debug("iframe processed all tests successfully.");

Modified: trunk/LayoutTests/css3/scroll-snap/resources/iframe-content.html (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/resources/iframe-content.html	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/resources/iframe-content.html	2021-02-04 12:01:29 UTC (rev 272366)
@@ -69,7 +69,7 @@
         top.succeeded = shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-type')", "both mandatory");
         document.querySelectorAll(".colorBox").forEach(colorBox => {
             window.colorBox = colorBox;
-            top.succeeded = shouldMatch("getComputedStyle(colorBox).getPropertyValue('scroll-snap-align')", "start start");
+            top.succeeded = shouldMatch("getComputedStyle(colorBox).getPropertyValue('scroll-snap-align')", "start");
         });
         if (top.succeeded)
             top.debug("iframe processed all tests successfully.");

Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-inherit-expected.txt (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-inherit-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-inherit-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -6,7 +6,7 @@
 PASS noInherit.style['scroll-snap-type'] is ""
 PASS window.getComputedStyle(noInherit).getPropertyValue('scroll-snap-type') is "both mandatory"
 PASS noInherit.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(noInherit).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(noInherit).getPropertyValue('scroll-snap-align') is "center"
 PASS noInherit.style['scroll-padding'] is ""
 PASS noInherit.style['scroll-padding-left'] is ""
 PASS noInherit.style['scroll-padding-right'] is ""
@@ -23,7 +23,7 @@
 PASS inheritType.style['scroll-snap-type'] is "inherit"
 PASS window.getComputedStyle(inheritType).getPropertyValue('scroll-snap-type') is "x"
 PASS inheritType.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(inheritType).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(inheritType).getPropertyValue('scroll-snap-align') is "center"
 PASS inheritType.style['scroll-padding'] is ""
 PASS inheritType.style['scroll-padding-left'] is ""
 PASS inheritType.style['scroll-padding-right'] is ""
@@ -57,7 +57,7 @@
 PASS inheritPadding.style['scroll-snap-type'] is ""
 PASS window.getComputedStyle(inheritPadding).getPropertyValue('scroll-snap-type') is "both mandatory"
 PASS inheritPadding.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(inheritPadding).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(inheritPadding).getPropertyValue('scroll-snap-align') is "center"
 PASS inheritPadding.style['scroll-padding'] is "inherit"
 PASS inheritPadding.style['scroll-padding-left'] is "inherit"
 PASS inheritPadding.style['scroll-padding-right'] is "inherit"
@@ -74,7 +74,7 @@
 PASS inheritMargin.style['scroll-snap-type'] is ""
 PASS window.getComputedStyle(inheritMargin).getPropertyValue('scroll-snap-type') is "both mandatory"
 PASS inheritMargin.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(inheritMargin).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(inheritMargin).getPropertyValue('scroll-snap-align') is "center"
 PASS inheritMargin.style['scroll-padding'] is ""
 PASS inheritMargin.style['scroll-padding-left'] is ""
 PASS inheritMargin.style['scroll-padding-right'] is ""
@@ -108,7 +108,7 @@
 PASS inheritNone.style['scroll-snap-type'] is ""
 PASS window.getComputedStyle(inheritNone).getPropertyValue('scroll-snap-type') is "none"
 PASS inheritNone.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(inheritNone).getPropertyValue('scroll-snap-align') is "none none"
+PASS window.getComputedStyle(inheritNone).getPropertyValue('scroll-snap-align') is "none"
 PASS inheritNone.style['scroll-padding'] is ""
 PASS inheritNone.style['scroll-padding-left'] is ""
 PASS inheritNone.style['scroll-padding-right'] is ""

Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-inherit.html (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-inherit.html	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-inherit.html	2021-02-04 12:01:29 UTC (rev 272366)
@@ -162,7 +162,7 @@
         shouldBeEmptyString("noInherit.style['scroll-snap-type']");
         shouldBeEqualToString("window.getComputedStyle(noInherit).getPropertyValue('scroll-snap-type')", "both mandatory");
         shouldBeEmptyString("noInherit.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(noInherit).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(noInherit).getPropertyValue('scroll-snap-align')", "center");
         shouldBeEmptyString("noInherit.style['scroll-padding']");
         shouldBeEmptyString("noInherit.style['scroll-padding-left']");
         shouldBeEmptyString("noInherit.style['scroll-padding-right']");
@@ -181,7 +181,7 @@
         shouldBeEqualToString("inheritType.style['scroll-snap-type']", "inherit");
         shouldBeEqualToString("window.getComputedStyle(inheritType).getPropertyValue('scroll-snap-type')", "x");
         shouldBeEmptyString("inheritType.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(inheritType).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(inheritType).getPropertyValue('scroll-snap-align')", "center");
         shouldBeEmptyString("inheritType.style['scroll-padding']");
         shouldBeEmptyString("inheritType.style['scroll-padding-left']");
         shouldBeEmptyString("inheritType.style['scroll-padding-right']");
@@ -219,7 +219,7 @@
         shouldBeEmptyString("inheritPadding.style['scroll-snap-type']");
         shouldBeEqualToString("window.getComputedStyle(inheritPadding).getPropertyValue('scroll-snap-type')", "both mandatory");
         shouldBeEmptyString("inheritPadding.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(inheritPadding).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(inheritPadding).getPropertyValue('scroll-snap-align')", "center");
         shouldBeEqualToString("inheritPadding.style['scroll-padding']", "inherit");
         shouldBeEqualToString("inheritPadding.style['scroll-padding-left']", "inherit");
         shouldBeEqualToString("inheritPadding.style['scroll-padding-right']", "inherit");
@@ -238,7 +238,7 @@
         shouldBeEmptyString("inheritMargin.style['scroll-snap-type']");
         shouldBeEqualToString("window.getComputedStyle(inheritMargin).getPropertyValue('scroll-snap-type')", "both mandatory");
         shouldBeEmptyString("inheritMargin.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(inheritMargin).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(inheritMargin).getPropertyValue('scroll-snap-align')", "center");
         shouldBeEmptyString("inheritMargin.style['scroll-padding']");
         shouldBeEmptyString("inheritMargin.style['scroll-padding-left']");
         shouldBeEmptyString("inheritMargin.style['scroll-padding-right']");
@@ -276,7 +276,7 @@
         shouldBeEmptyString("inheritNone.style['scroll-snap-type']");
         shouldBeEqualToString("window.getComputedStyle(inheritNone).getPropertyValue('scroll-snap-type')", "none");
         shouldBeEmptyString("inheritNone.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(inheritNone).getPropertyValue('scroll-snap-align')", "none none");
+        shouldBeEqualToString("window.getComputedStyle(inheritNone).getPropertyValue('scroll-snap-align')", "none");
         shouldBeEmptyString("inheritNone.style['scroll-padding']");
         shouldBeEmptyString("inheritNone.style['scroll-padding-left']");
         shouldBeEmptyString("inheritNone.style['scroll-padding-right']");

Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -10,7 +10,7 @@
 PASS noInitial.style['scroll-snap-margin'] is ""
 PASS window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-margin') is "1px"
 PASS noInitial.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-align') is "center"
 PASS initialType.style['scroll-snap-type'] is "initial"
 PASS window.getComputedStyle(initialType).getPropertyValue('scroll-snap-type') is "none"
 PASS initialType.style['scroll-padding'] is ""
@@ -18,7 +18,7 @@
 PASS initialType.style['scroll-snap-margin'] is ""
 PASS window.getComputedStyle(initialType).getPropertyValue('scroll-snap-margin') is "1px"
 PASS initialType.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(initialType).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(initialType).getPropertyValue('scroll-snap-align') is "center"
 PASS initialPadding.style['scroll-snap-type'] is ""
 PASS window.getComputedStyle(initialPadding).getPropertyValue('scroll-snap-type') is "both"
 PASS initialPadding.style['scroll-padding'] is "initial"
@@ -26,7 +26,7 @@
 PASS initialPadding.style['scroll-snap-margin'] is ""
 PASS window.getComputedStyle(initialPadding).getPropertyValue('scroll-snap-margin') is "1px"
 PASS initialPadding.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(initialPadding).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(initialPadding).getPropertyValue('scroll-snap-align') is "center"
 PASS initialMargin.style['scroll-snap-type'] is ""
 PASS window.getComputedStyle(initialMargin).getPropertyValue('scroll-snap-type') is "both"
 PASS initialMargin.style['scroll-padding'] is ""
@@ -34,7 +34,7 @@
 PASS initialMargin.style['scroll-snap-margin'] is "initial"
 PASS window.getComputedStyle(initialMargin).getPropertyValue('scroll-snap-margin') is "0px"
 PASS initialMargin.style['scroll-snap-align'] is ""
-PASS window.getComputedStyle(initialMargin).getPropertyValue('scroll-snap-align') is "center center"
+PASS window.getComputedStyle(initialMargin).getPropertyValue('scroll-snap-align') is "center"
 PASS initialAlign.style['scroll-snap-type'] is ""
 PASS window.getComputedStyle(initialAlign).getPropertyValue('scroll-snap-type') is "both"
 PASS initialAlign.style['scroll-padding'] is ""
@@ -42,7 +42,7 @@
 PASS initialAlign.style['scroll-snap-margin'] is ""
 PASS window.getComputedStyle(initialAlign).getPropertyValue('scroll-snap-margin') is "1px"
 PASS initialAlign.style['scroll-snap-align'] is "initial"
-PASS window.getComputedStyle(initialAlign).getPropertyValue('scroll-snap-align') is "none none"
+PASS window.getComputedStyle(initialAlign).getPropertyValue('scroll-snap-align') is "none"
 PASS allInitial.style['scroll-snap-type'] is "initial"
 PASS window.getComputedStyle(allInitial).getPropertyValue('scroll-snap-type') is "none"
 PASS allInitial.style['scroll-padding'] is "initial"
@@ -50,7 +50,7 @@
 PASS allInitial.style['scroll-snap-margin'] is "initial"
 PASS window.getComputedStyle(allInitial).getPropertyValue('scroll-snap-margin') is "0px"
 PASS allInitial.style['scroll-snap-align'] is "initial"
-PASS window.getComputedStyle(allInitial).getPropertyValue('scroll-snap-align') is "none none"
+PASS window.getComputedStyle(allInitial).getPropertyValue('scroll-snap-align') is "none"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial.html (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial.html	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-initial.html	2021-02-04 12:01:29 UTC (rev 272366)
@@ -165,7 +165,7 @@
         shouldBeEmptyString("noInitial.style['scroll-snap-margin']");
         shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-margin')", "1px");
         shouldBeEmptyString("noInitial.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(noInitial).getPropertyValue('scroll-snap-align')", "center");
 
         var initialType = document.getElementById('initialType');
         shouldBeEqualToString("initialType.style['scroll-snap-type']", "initial");
@@ -175,7 +175,7 @@
         shouldBeEmptyString("initialType.style['scroll-snap-margin']");
         shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('scroll-snap-margin')", "1px");
         shouldBeEmptyString("initialType.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(initialType).getPropertyValue('scroll-snap-align')", "center");
 
         var initialPadding = document.getElementById('initialPadding');
         shouldBeEmptyString("initialPadding.style['scroll-snap-type']");
@@ -185,7 +185,7 @@
         shouldBeEmptyString("initialPadding.style['scroll-snap-margin']");
         shouldBeEqualToString("window.getComputedStyle(initialPadding).getPropertyValue('scroll-snap-margin')", "1px");
         shouldBeEmptyString("initialPadding.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(initialPadding).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(initialPadding).getPropertyValue('scroll-snap-align')", "center");
 
         var initialMargin = document.getElementById('initialMargin');
         shouldBeEmptyString("initialMargin.style['scroll-snap-type']");
@@ -195,7 +195,7 @@
         shouldBeEqualToString("initialMargin.style['scroll-snap-margin']", "initial");
         shouldBeEqualToString("window.getComputedStyle(initialMargin).getPropertyValue('scroll-snap-margin')", "0px");
         shouldBeEmptyString("initialMargin.style['scroll-snap-align']");
-        shouldBeEqualToString("window.getComputedStyle(initialMargin).getPropertyValue('scroll-snap-align')", "center center");
+        shouldBeEqualToString("window.getComputedStyle(initialMargin).getPropertyValue('scroll-snap-align')", "center");
 
         var initialAlign = document.getElementById('initialAlign');
         shouldBeEmptyString("initialAlign.style['scroll-snap-type']");
@@ -205,7 +205,7 @@
         shouldBeEmptyString("initialAlign.style['scroll-snap-margin']");
         shouldBeEqualToString("window.getComputedStyle(initialAlign).getPropertyValue('scroll-snap-margin')", "1px");
         shouldBeEqualToString("initialAlign.style['scroll-snap-align']", "initial");
-        shouldBeEqualToString("window.getComputedStyle(initialAlign).getPropertyValue('scroll-snap-align')", "none none");
+        shouldBeEqualToString("window.getComputedStyle(initialAlign).getPropertyValue('scroll-snap-align')", "none");
 
         var allInitial = document.getElementById('allInitial');
         shouldBeEqualToString("allInitial.style['scroll-snap-type']", "initial");
@@ -215,7 +215,7 @@
         shouldBeEqualToString("allInitial.style['scroll-snap-margin']", "initial");
         shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('scroll-snap-margin')", "0px");
         shouldBeEqualToString("allInitial.style['scroll-snap-align']", "initial");
-        shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('scroll-snap-align')", "none none");
+        shouldBeEqualToString("window.getComputedStyle(allInitial).getPropertyValue('scroll-snap-align')", "none");
         </script>
         <script src=""
     </body>

Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -41,31 +41,31 @@
 PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-type') is 'inline mandatory'
 
 invalid snap align: `potato`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 empty string: ``
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 too many values: `start center end`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 invalid second value: `start wut`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 invalid first value: `wat center`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 one length: `10px`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 two lengths: `10px 50px`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 initial value: `initial`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none none'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'none'
 
 single value: `start`
-PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'start start'
+PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'start'
 
 two values: `start end`
 PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-align') is 'start end'

Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js (272365 => 272366)


--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js	2021-02-04 12:01:29 UTC (rev 272366)
@@ -36,16 +36,16 @@
 
 // Test the scroll-snap-align property
 // Invalid declarations
-testComputedScrollSnapRule("invalid snap align", "scroll-snap-align", "potato", "none none");
-testComputedScrollSnapRule("empty string", "scroll-snap-align", "", "none none");
-testComputedScrollSnapRule("too many values", "scroll-snap-align", "start center end", "none none");
-testComputedScrollSnapRule("invalid second value", "scroll-snap-align", "start wut", "none none");
-testComputedScrollSnapRule("invalid first value", "scroll-snap-align", "wat center", "none none");
-testComputedScrollSnapRule("one length", "scroll-snap-align", "10px", "none none");
-testComputedScrollSnapRule("two lengths", "scroll-snap-align", "10px 50px", "none none");
+testComputedScrollSnapRule("invalid snap align", "scroll-snap-align", "potato", "none");
+testComputedScrollSnapRule("empty string", "scroll-snap-align", "", "none");
+testComputedScrollSnapRule("too many values", "scroll-snap-align", "start center end", "none");
+testComputedScrollSnapRule("invalid second value", "scroll-snap-align", "start wut", "none");
+testComputedScrollSnapRule("invalid first value", "scroll-snap-align", "wat center", "none");
+testComputedScrollSnapRule("one length", "scroll-snap-align", "10px", "none");
+testComputedScrollSnapRule("two lengths", "scroll-snap-align", "10px 50px", "none");
 // Valid declarations
-testComputedScrollSnapRule("initial value", "scroll-snap-align", "initial", "none none");
-testComputedScrollSnapRule("single value", "scroll-snap-align", "start", "start start");
+testComputedScrollSnapRule("initial value", "scroll-snap-align", "initial", "none");
+testComputedScrollSnapRule("single value", "scroll-snap-align", "start", "start");
 testComputedScrollSnapRule("two values", "scroll-snap-align", "start end", "start end");
 
 // Test the scroll-padding property

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (272365 => 272366)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-04 12:01:29 UTC (rev 272366)
@@ -1,3 +1,16 @@
+2021-02-04  Martin Robinson  <mrobin...@webkit.org>
+
+        Improve the serialization of scroll-snap-type and scroll-snap-align
+        https://bugs.webkit.org/show_bug.cgi?id=221324
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/css/css-scroll-snap/inheritance-expected.txt:
+        * web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt:
+        * web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt:
+        * web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt:
+        * web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
+
 2021-02-03  Sam Weinig  <wei...@apple.com>
 
         Add support for hwb() colors defined in CSS Color 4

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/inheritance-expected.txt (272365 => 272366)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/inheritance-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/inheritance-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -31,7 +31,7 @@
 PASS Property scroll-padding-right does not inherit
 PASS Property scroll-padding-top has initial value auto
 PASS Property scroll-padding-top does not inherit
-FAIL Property scroll-snap-align has initial value none assert_equals: expected "none" but got "none none"
+PASS Property scroll-snap-align has initial value none
 PASS Property scroll-snap-align does not inherit
 FAIL Property scroll-snap-stop has initial value normal assert_true: scroll-snap-stop doesn't seem to be supported in the computed style expected true got false
 FAIL Property scroll-snap-stop does not inherit assert_true: expected true got false

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt (272365 => 272366)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -1,9 +1,9 @@
 
-FAIL Property scroll-snap-align value 'none' assert_equals: expected "none" but got "none none"
-FAIL Property scroll-snap-align value 'start' assert_equals: expected "start" but got "start start"
-FAIL Property scroll-snap-align value 'end' assert_equals: expected "end" but got "end end"
-FAIL Property scroll-snap-align value 'center' assert_equals: expected "center" but got "center center"
+PASS Property scroll-snap-align value 'none'
+PASS Property scroll-snap-align value 'start'
+PASS Property scroll-snap-align value 'end'
+PASS Property scroll-snap-align value 'center'
 PASS Property scroll-snap-align value 'start none'
 PASS Property scroll-snap-align value 'center end'
-FAIL Property scroll-snap-align value 'start start' assert_equals: expected "start" but got "start start"
+PASS Property scroll-snap-align value 'start start'
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt (272365 => 272366)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -5,5 +5,5 @@
 PASS e.style['scroll-snap-align'] = "center" should set the property value
 PASS e.style['scroll-snap-align'] = "start none" should set the property value
 PASS e.style['scroll-snap-align'] = "center end" should set the property value
-FAIL e.style['scroll-snap-align'] = "start start" should set the property value assert_equals: serialization should be canonical expected "start" but got "start start"
+PASS e.style['scroll-snap-align'] = "start start" should set the property value
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt (272365 => 272366)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -8,6 +8,6 @@
 PASS e.style['scroll-snap-type'] = "y mandatory" should set the property value
 PASS e.style['scroll-snap-type'] = "block mandatory" should set the property value
 PASS e.style['scroll-snap-type'] = "both mandatory" should set the property value
-FAIL e.style['scroll-snap-type'] = "inline proximity" should set the property value assert_equals: serialization should be canonical expected "inline" but got "inline proximity"
-FAIL e.style['scroll-snap-type'] = "x proximity" should set the property value assert_equals: serialization should be canonical expected "x" but got "x proximity"
+PASS e.style['scroll-snap-type'] = "inline proximity" should set the property value
+PASS e.style['scroll-snap-type'] = "x proximity" should set the property value
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt (272365 => 272366)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -7,5 +7,5 @@
 PASS another cssText order (non-alphabetical order)
 PASS whitespaces in value
 PASS invalid property does not appear
-FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style:
  none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bott
 om: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-setti
 ngs: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: 
 auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-
 block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0
 , 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; verti
 cal-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -web
 kit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -
 webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
+FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: 
 none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; botto
 m: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settin
 gs: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: a
 uto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-b
 lock-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); 
 stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-al
 ign: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-bo
 x-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit
 -mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
 

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt (272365 => 272366)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-02-04 12:01:29 UTC (rev 272366)
@@ -7,5 +7,5 @@
 PASS another cssText order (non-alphabetical order)
 PASS whitespaces in value
 PASS invalid property does not appear
-FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style:
  none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bott
 om: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-setti
 ngs: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: 
 auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-
 block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0
 , 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; verti
 cal-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -web
 kit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -
 webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-mod
 ify: read-only; -webkit-user-select: text;"
+FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: 
 none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; botto
 m: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settin
 gs: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: a
 uto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-b
 lock-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); 
 stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-al
 ign: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-bo
 x-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit
 -mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: r
 ead-only; -webkit-user-select: text;"
 

Modified: trunk/Source/WebCore/ChangeLog (272365 => 272366)


--- trunk/Source/WebCore/ChangeLog	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/Source/WebCore/ChangeLog	2021-02-04 12:01:29 UTC (rev 272366)
@@ -1,3 +1,28 @@
+2021-02-04  Martin Robinson  <mrobin...@webkit.org>
+
+        Improve the serialization of scroll-snap-type and scroll-snap-align
+        https://bugs.webkit.org/show_bug.cgi?id=221324
+
+        Reviewed by Alex Christensen.
+
+        Improve serialization of scroll-snap-type and scroll-snap-align. When the values
+        are the same for both dimensions or a default value is used, don't add it to
+        the list of consumed tokens. The primitive conversion process will handle this
+        default correctly and serialization will produce a canonical serialization correctly.
+
+        We handle this case for both serialization of the style (eg getPropertyValue) and
+        for serialization of computed style.
+
+        No new tests.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForScrollSnapAlignment): For the computed style don't serialize
+        the second value if it is the same as the first.
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeScrollSnapAlign): Only add the second value to the value list if it
+        exists and if it is different than the first value.
+        (WebCore::consumeScrollSnapType): Only add the second value if it is a non-default value.
+
 2021-02-04  Rob Buis  <rb...@igalia.com>
 
         Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (272365 => 272366)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-02-04 12:01:29 UTC (rev 272366)
@@ -1113,7 +1113,8 @@
 {
     auto value = CSSValueList::createSpaceSeparated();
     value->append(CSSPrimitiveValue::create(alignment.y));
-    value->append(CSSPrimitiveValue::create(alignment.x));
+    if (alignment.x != alignment.y)
+        value->append(CSSPrimitiveValue::create(alignment.x));
     return value;
 }
 

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (272365 => 272366)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-02-04 11:02:50 UTC (rev 272365)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-02-04 12:01:29 UTC (rev 272366)
@@ -2508,13 +2508,22 @@
 
 static RefPtr<CSSValueList> consumeScrollSnapAlign(CSSParserTokenRange& range)
 {
+    auto firstValue = consumeIdent<CSSValueNone, CSSValueStart, CSSValueCenter, CSSValueEnd>(range);
+    if (!firstValue)
+        return nullptr;
+
+    auto secondValue = consumeIdent<CSSValueNone, CSSValueStart, CSSValueCenter, CSSValueEnd>(range);
+    bool shouldAddSecondValue = secondValue && !secondValue->equals(*firstValue);
+
     RefPtr<CSSValueList> alignmentValue = CSSValueList::createSpaceSeparated();
-    if (RefPtr<CSSPrimitiveValue> firstValue = consumeIdent<CSSValueNone, CSSValueStart, CSSValueCenter, CSSValueEnd>(range)) {
-        alignmentValue->append(firstValue.releaseNonNull());
-        if (auto secondValue = consumeIdent<CSSValueNone, CSSValueStart, CSSValueCenter, CSSValueEnd>(range))
-            alignmentValue->append(secondValue.releaseNonNull());
-    }
-    return alignmentValue->length() ? alignmentValue : nullptr;
+    alignmentValue->append(firstValue.releaseNonNull());
+
+    // Only add the second value if it differs from the first so that we produce the canonical
+    // serialization of this CSSValueList.
+    if (shouldAddSecondValue)
+        alignmentValue->append(secondValue.releaseNonNull());
+
+    return alignmentValue;
 }
 
 static RefPtr<CSSValueList> consumeScrollSnapType(CSSParserTokenRange& range)
@@ -2524,10 +2533,12 @@
     auto firstValue = consumeIdent<CSSValueNone, CSSValueX, CSSValueY, CSSValueBlock, CSSValueInline, CSSValueBoth>(range);
     if (!firstValue)
         return nullptr;
+    typeValue->append(firstValue.releaseNonNull());
+
+    // We only add the second value if it is not the initial value as described in specification
+    // so that serialization of this CSSValueList produces the canonical serialization.
     auto secondValue = consumeIdent<CSSValueProximity, CSSValueMandatory>(range);
-
-    typeValue->append(firstValue.releaseNonNull());
-    if (secondValue)
+    if (secondValue && secondValue->valueID() != CSSValueProximity)
         typeValue->append(secondValue.releaseNonNull());
 
     return typeValue;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to