[CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
https://bugs.webkit.org/show_bug.cgi?id=129041
Patch by Javier Fernandez <[email protected]> on 2014-03-24
Reviewed by Sergio Villar Senin.
From Blink r162555 by <[email protected]>
Source/WebCore:
Names for grid lines are now specified as a list of whitespace separated
idents enclosed in parentheses instead of as a list of strings.
Updated tests to match the new <grid-line> syntax.
- CMakeLists.txt:
- GNUmakefile.list.am:
- WebCore.xcodeproj/project.pbxproj: Added info of the new file for the CSSGridLineNamesValue class.
- css/CSSComputedStyleDeclaration.cpp:
(WebCore::addValuesForNamedGridLinesAtIndex): The named <grid-line> value is now a list.
- css/CSSGrammar.y.in: New syntax for named <grid-line>.
- css/CSSGridLineNamesValue.cpp: Added.
(WebCore::CSSGridLineNamesValue::customCSSText): String representation of the named <grid-line> as a list of Strings.
(WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Constructor.
(WebCore::CSSGridLineNamesValue::cloneForCSSOM): Ref counted cloning function.
- css/CSSGridLineNamesValue.h: Added.
(WebCore::CSSGridLineNamesValue::create): Ref counted constructor.
(WebCore::CSSParser::parseGridLineNames): It replaces the old parseGrdTrackNames.
(WebCore::CSSParser::parseGridTrackList): Using the new named <grid-line> syntax.
(WebCore::CSSParser::parseGridTrackRepeatFunction): Using the new named <grid-line> syntax.
- css/CSSParser.h:
- css/CSSParserValues.cpp:
(WebCore::destroy): Handling the case of CSSValue being CSSValueList intances.
(WebCore::CSSParserValue::createCSSValue): Handling the case of CSSValue being CSSValueList intances.
(WebCore::CSSParserValue::setFromValueList): Adds the named <grid-line> list to the CSSParserValueList instance.
(WebCore::CSSValue::equals): Handling the case of the new CSSGridLineNamesValue class.
(WebCore::CSSValue::cssText): Handling the case of the new CSSGridLineNamesValue class.
(WebCore::CSSValue::destroy): Handling the case of the new CSSGridLineNamesValue class.
(WebCore::CSSValue::isGridLineNamesValue): Type cast check for the new CSSGridLineNamesValue class.
(WebCore::createGridTrackList): Using the new named <grid-line> syntax.
LayoutTests:
Updated tests to match the new <grid-line> syntax.
- fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
- fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
- fast/css-grid-layout/grid-element-repeat-get-set-expected.txt:
- fast/css-grid-layout/grid-element-repeat-get-set.html:
- fast/css-grid-layout/grid-item-bad-resolution-double-span.html:
- fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
- fast/css-grid-layout/grid-item-named-grid-line-resolution.html:
- fast/css-grid-layout/grid-item-negative-position-resolution.html:
- fast/css-grid-layout/grid-item-position-changed-dynamic.html:
- fast/css-grid-layout/named-grid-line-get-set-expected.txt:
- fast/css-grid-layout/named-grid-line-get-set.html:
- fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
- fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
- fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt:
- fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt:
- fast/css-grid-layout/non-grid-element-repeat-get-set.html:
- fast/css-grid-layout/non-named-grid-line-get-set-expected.txt:
- fast/css-grid-layout/non-named-grid-line-get-set.html:
- fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
(testInherit):
(testInitial):
- fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
(testInherit):
(testInitial):
- fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js:
(testInherit):
(testInitial):
- fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
(testInherit):
(testInitial):