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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183850
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-05-05 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [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 <rniwa@webkit.org>
Fix tests after r183770 on non-Mac ports. These tests are expecting Mac editing behavior.
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\""
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");
+2015-05-05 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [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 <zalan@apple.com>
Remove unused RenderLayerBacking::hasContentsLayer().
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;