Title: [183850] trunk
Revision
183850
Author
[email protected]
Date
2015-05-05 22:39:02 -0700 (Tue, 05 May 2015)

Log Message

[CSS Grid Layout] grid-template-areas should accept none value
https://bugs.webkit.org/show_bug.cgi?id=144624

Reviewed by Darin Adler.

Source/WebCore:

Default value for grid-template-areas property is "none":
http://dev.w3.org/csswg/css-grid/#propdef-grid-template-areas

Currently if you set the property to "none" from _javascript_, the value
doesn't get reseted and it keeps the old value.

Update fast/css-grid-layout/grid-template-areas-get-set.html adding a
new test case.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTemplateAreas): Add support to parse
"none" successfully.

LayoutTests:

* fast/css-grid-layout/grid-template-areas-get-set-expected.txt:
* fast/css-grid-layout/grid-template-areas-get-set.html: Add new test
case to check "none" support.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (183849 => 183850)


--- trunk/LayoutTests/ChangeLog	2015-05-06 04:57:41 UTC (rev 183849)
+++ trunk/LayoutTests/ChangeLog	2015-05-06 05:39:02 UTC (rev 183850)
@@ -1,3 +1,14 @@
+2015-05-05  Manuel Rego Casasnovas  <[email protected]>
+
+        [CSS Grid Layout] grid-template-areas should accept none value
+        https://bugs.webkit.org/show_bug.cgi?id=144624
+
+        Reviewed by Darin Adler.
+
+        * fast/css-grid-layout/grid-template-areas-get-set-expected.txt:
+        * fast/css-grid-layout/grid-template-areas-get-set.html: Add new test
+        case to check "none" support.
+
 2015-05-05  Ryosuke Niwa  <[email protected]>
 
         Fix tests after r183770 on non-Mac ports. These tests are expecting Mac editing behavior.

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt (183849 => 183850)


--- trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt	2015-05-06 04:57:41 UTC (rev 183849)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt	2015-05-06 05:39:02 UTC (rev 183850)
@@ -15,6 +15,9 @@
 PASS getComputedStyle(gridWithVerticalRectangle).getPropertyValue('-webkit-grid-template-areas') is "\"a a\" \"a a\" \"a a\""
 Test grid-template-areas: initial
 PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "\"foobar\""
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "none"
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "\"foobar\""
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "none"
 Test grid-template-areas: inherit
 PASS getComputedStyle(parentElement).getPropertyValue('-webkit-grid-template-areas') is "\"foo bar\""
 PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "\"foo bar\""

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set.html (183849 => 183850)


--- trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set.html	2015-05-06 04:57:41 UTC (rev 183849)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set.html	2015-05-06 05:39:02 UTC (rev 183850)
@@ -83,6 +83,11 @@
     element.style.webkitGridTemplateAreas = "'foobar'";
     testJSGridTemplateAreas(element, '"foobar"');
     element.style.webkitGridTemplateAreas = "initial";
+    testJSGridTemplateAreas(element, 'none');
+    element.style.webkitGridTemplateAreas = "'foobar'";
+    testJSGridTemplateAreas(element, '"foobar"');
+    element.style.webkitGridTemplateAreas = "none";
+    testJSGridTemplateAreas(element, 'none');
     document.body.removeChild(element);
 
     debug("Test grid-template-areas: inherit");

Modified: trunk/Source/WebCore/ChangeLog (183849 => 183850)


--- trunk/Source/WebCore/ChangeLog	2015-05-06 04:57:41 UTC (rev 183849)
+++ trunk/Source/WebCore/ChangeLog	2015-05-06 05:39:02 UTC (rev 183850)
@@ -1,3 +1,23 @@
+2015-05-05  Manuel Rego Casasnovas  <[email protected]>
+
+        [CSS Grid Layout] grid-template-areas should accept none value
+        https://bugs.webkit.org/show_bug.cgi?id=144624
+
+        Reviewed by Darin Adler.
+
+        Default value for grid-template-areas property is "none":
+        http://dev.w3.org/csswg/css-grid/#propdef-grid-template-areas
+
+        Currently if you set the property to "none" from _javascript_, the value
+        doesn't get reseted and it keeps the old value.
+
+        Update fast/css-grid-layout/grid-template-areas-get-set.html adding a
+        new test case.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseGridTemplateAreas): Add support to parse
+        "none" successfully.
+
 2015-05-05  Zalan Bujtas  <[email protected]>
 
         Remove unused RenderLayerBacking::hasContentsLayer().

Modified: trunk/Source/WebCore/css/CSSParser.cpp (183849 => 183850)


--- trunk/Source/WebCore/css/CSSParser.cpp	2015-05-06 04:57:41 UTC (rev 183849)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2015-05-06 05:39:02 UTC (rev 183850)
@@ -6012,6 +6012,11 @@
 
 PassRefPtr<CSSValue> CSSParser::parseGridTemplateAreas()
 {
+    if (m_valueList->current() && m_valueList->current()->id == CSSValueNone) {
+        m_valueList->next();
+        return cssValuePool().createIdentifierValue(CSSValueNone);
+    }
+
     NamedGridAreaMap gridAreaMap;
     unsigned rowCount = 0;
     unsigned columnCount = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to