Title: [223346] releases/WebKitGTK/webkit-2.18
Revision
223346
Author
[email protected]
Date
2017-10-16 02:11:32 -0700 (Mon, 16 Oct 2017)

Log Message

Merge r221668 - [css-grid] grid shorthand should not reset the gutter properties
https://bugs.webkit.org/show_bug.cgi?id=176375

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Import new test from WPT.

* web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001-expected.txt: Added.
* web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html: Added.
* web-platform-tests/css/css-grid-1/grid-definition/w3c-import.log:

Source/WebCore:

The CSS WG has resolved that the "grid" shorthand shouldn't reset
the gutter properties anymore:
https://github.com/w3c/csswg-drafts/issues/1036

This was originally implemented in r195529, so this is somehow
a revert of that change.

Test: imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html

* css/CSSProperties.json:
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeGridShorthand):

LayoutTests:

Update the test to check the new behavior.

* fast/css-grid-layout/grid-shorthand-get-set-expected.txt:
* fast/css-grid-layout/grid-shorthand-get-set.html:

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog	2017-10-16 09:11:32 UTC (rev 223346)
@@ -1,3 +1,15 @@
+2017-09-06  Manuel Rego Casasnovas  <[email protected]>
+
+        [css-grid] grid shorthand should not reset the gutter properties
+        https://bugs.webkit.org/show_bug.cgi?id=176375
+
+        Reviewed by Sergio Villar Senin.
+
+        Update the test to check the new behavior.
+
+        * fast/css-grid-layout/grid-shorthand-get-set-expected.txt:
+        * fast/css-grid-layout/grid-shorthand-get-set.html:
+
 2017-10-13  Brent Fulgham  <[email protected]>
 
         Protect FrameView during style calculations

Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt	2017-10-16 09:11:32 UTC (rev 223346)
@@ -331,11 +331,11 @@
 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto"
 PASS element.style.gridAutoRows is "initial"
 
-Test the inherit value on reset-only subproperties (grid-*-gap)
+Test the inherit value does not affect gutter properties (grid-*-gap)
 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap') is "0px"
 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap') is "0px"
-PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap') is "20px"
-PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap') is "100px"
+PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap') is "0px"
+PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap') is "0px"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html	2017-10-16 09:11:32 UTC (rev 223346)
@@ -205,7 +205,7 @@
     testGridDefinitionsSetJSValues("none", "none", "none", "none", "row", "auto", "auto", "none", "none", "none", "initial", "initial", "initial");
 
     debug("");
-    debug("Test the inherit value on reset-only subproperties (grid-*-gap)");
+    debug("Test the inherit value does not affect gutter properties (grid-*-gap)");
     document.body.style.gridRowGap = "100px";
     document.body.style.gridColumnGap = "20px";
     var anotherElement = document.createElement("div");
@@ -213,8 +213,8 @@
     shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap')", "0px");
     shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap')", "0px");
     anotherElement.style.grid = "inherit";
-    shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap')", "20px");
-    shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap')", "100px");
+    shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap')", "0px");
+    shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap')", "0px");
 </script>
 </body>
 </html>

Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/ChangeLog (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/ChangeLog	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/ChangeLog	2017-10-16 09:11:32 UTC (rev 223346)
@@ -1,3 +1,16 @@
+2017-09-06  Manuel Rego Casasnovas  <[email protected]>
+
+        [css-grid] grid shorthand should not reset the gutter properties
+        https://bugs.webkit.org/show_bug.cgi?id=176375
+
+        Reviewed by Sergio Villar Senin.
+
+        Import new test from WPT.
+
+        * web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001-expected.txt: Added.
+        * web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html: Added.
+        * web-platform-tests/css/css-grid-1/grid-definition/w3c-import.log:
+
 2017-09-02  Emilio Cobos Álvarez  <[email protected]>
 
         Wrong getComputedStyle result for pseudo-elements in display: none subtrees.

Added: releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001-expected.txt (0 => 223346)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001-expected.txt	2017-10-16 09:11:32 UTC (rev 223346)
@@ -0,0 +1,4 @@
+
+PASS Check gutter properties initial values 
+PASS Check gutter properties after setting 'grid' shorthand 
+

Added: releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html (0 => 223346)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html	2017-10-16 09:11:32 UTC (rev 223346)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: 'grid' shorthand does not reset gutter properties</title>
+<link rel="author" title="Manuel Rego Casasnovas" href=""
+<link rel="help" href=""
+<meta name="flags" content="dom">
+<script src=""
+<script src=""
+<style>
+  #grid {
+    display: grid;
+    grid-column-gap: 10px;
+    grid-row-gap: 20px;
+  }
+</style>
+<div id="grid"></div>
+<script>
+  var grid = document.getElementById("grid");
+
+  test(
+    () => {
+      assert_equals(window.getComputedStyle(grid)["grid-template-columns"], "none");
+      assert_equals(window.getComputedStyle(grid)["grid-template-rows"], "none");
+      assert_equals(window.getComputedStyle(grid)["grid-column-gap"], "10px");
+      assert_equals(window.getComputedStyle(grid)["grid-row-gap"], "20px");
+    }, "Check gutter properties initial values");
+
+  grid.style.grid = "100px / 200px";
+
+  test(
+    () => {
+      assert_equals(window.getComputedStyle(grid)["grid-template-columns"], "200px");
+      assert_equals(window.getComputedStyle(grid)["grid-template-rows"], "100px");
+      assert_equals(window.getComputedStyle(grid)["grid-column-gap"], "10px");
+      assert_equals(window.getComputedStyle(grid)["grid-row-gap"], "20px");
+    }, "Check gutter properties after setting 'grid' shorthand");
+</script>

Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/w3c-import.log (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/w3c-import.log	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/w3c-import.log	2017-10-16 09:11:32 UTC (rev 223346)
@@ -30,6 +30,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-layout-basic.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-layout-repeat-notation-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-layout-repeat-notation.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-support-flexible-lengths-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-support-grid-template-areas-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-support-grid-template-columns-rows-001.html

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog	2017-10-16 09:11:32 UTC (rev 223346)
@@ -1,3 +1,23 @@
+2017-09-06  Manuel Rego Casasnovas  <[email protected]>
+
+        [css-grid] grid shorthand should not reset the gutter properties
+        https://bugs.webkit.org/show_bug.cgi?id=176375
+
+        Reviewed by Sergio Villar Senin.
+
+        The CSS WG has resolved that the "grid" shorthand shouldn't reset
+        the gutter properties anymore:
+        https://github.com/w3c/csswg-drafts/issues/1036
+
+        This was originally implemented in r195529, so this is somehow
+        a revert of that change.
+
+        Test: imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html
+
+        * css/CSSProperties.json:
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::consumeGridShorthand):
+
 2017-10-13  Brent Fulgham  <[email protected]>
 
         Protect FrameView during style calculations

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/css/CSSProperties.json (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/css/CSSProperties.json	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/css/CSSProperties.json	2017-10-16 09:11:32 UTC (rev 223346)
@@ -4745,9 +4745,7 @@
                     "grid-template-areas",
                     "grid-auto-flow",
                     "grid-auto-rows",
-                    "grid-auto-columns",
-                    "grid-column-gap",
-                    "grid-row-gap"
+                    "grid-auto-columns"
                 ]
             },
             "specification": {

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/css/parser/CSSPropertyParser.cpp (223345 => 223346)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/css/parser/CSSPropertyParser.cpp	2017-10-16 08:48:44 UTC (rev 223345)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/css/parser/CSSPropertyParser.cpp	2017-10-16 09:11:32 UTC (rev 223346)
@@ -5392,7 +5392,7 @@
 
 bool CSSPropertyParser::consumeGridShorthand(bool important)
 {
-    ASSERT(shorthandForProperty(CSSPropertyGrid).length() == 8);
+    ASSERT(shorthandForProperty(CSSPropertyGrid).length() == 6);
 
     CSSParserTokenRange rangeCopy = m_range;
 
@@ -5403,8 +5403,6 @@
         addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
         addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
         addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
-        addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
-        addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
         return true;
     }
 
@@ -5469,8 +5467,6 @@
     addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, gridAutoFlow.releaseNonNull(), important);
     addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, autoColumnsValue.releaseNonNull(), important);
     addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, autoRowsValue.releaseNonNull(), important);
-    addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
-    addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
     
     return true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to