[CSS Grid Layout] Support grid-definition-{rows|columns} repeat() syntax
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Nov 2013 08:31:14 +0000 (08:31 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Nov 2013 08:31:14 +0000 (08:31 +0000)
commitd93ea4040735a3f70a3d88185fc96d14553fe918
tree2c13d6eeadd71c720b3842facf8abf1af1196e6a
parentf84bde18f2944af68449f13439baa61442872a46
[CSS Grid Layout] Support grid-definition-{rows|columns} repeat() syntax
https://bugs.webkit.org/show_bug.cgi?id=103312

Reviewed by Andreas Kling.

PerformanceTests:

Use the repeat() syntax to build the huge grids used by the
performance tests.

* Layout/auto-grid-lots-of-data.html:
* Layout/fixed-grid-lots-of-data.html:

Source/WebCore:

Added support for the repeat() syntax inside
grid-definition-{rows|columns} by just adding the repeated values
to our list of column|row definitions.

The parsing of <track-name> was refactored in a new function as
it's used now in three different places. The <track-size> parsing
was also refactored to share it with the repeat() parsing.

Test: fast/css-grid-layout/grid-element-repeat-get-set.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridTrackNames):
(WebCore::CSSParser::parseGridTrackList):
(WebCore::CSSParser::parseGridTrackRepeatFunction):
(WebCore::CSSParser::parseGridTrackSize):
* css/CSSParser.h:

LayoutTests:

Based on Blink r153155 by <jchaffraix@chromium.org>. Some code was
refactored in a helper function to have a more compact test.

* fast/css-grid-layout/grid-element-repeat-get-set-expected.txt: Added.
* fast/css-grid-layout/grid-element-repeat-get-set.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set.html [new file with mode: 0644]
PerformanceTests/ChangeLog
PerformanceTests/Layout/auto-grid-lots-of-data.html
PerformanceTests/Layout/fixed-grid-lots-of-data.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h