[CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 10:15:55 +0000 (10:15 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 10:15:55 +0000 (10:15 +0000)
commite9b729f9e19cee953ac76cba36b977fe78391d1e
tree23c65bcf29e6bc75707ed209049f4f6c55c0a7db
parentc7d38ba94764275fdf953d2a670f4a883fb8c5ca
[CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
https://bugs.webkit.org/show_bug.cgi?id=129713

Reviewed by Darin Adler.

Source/WebCore:

Grid positioning properties no longer accept <string> values for
named grid lines as they did in previous versions of the specs. They
were first replaced by <ident> and since the beginning of 2014 they
should only accept <custom-ident>.

Updated the parser and the style resolver to this new syntax. Also
updated the tests accordingly.

Test: fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html

* css/CSSParser.cpp:
(WebCore::isValidCustomIdent): New function that checks that the
<custom-ident> is valid.
(WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
(WebCore::CSSParser::parseGridPosition):
(WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
Replaced by WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition.
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::createGridPosition):

LayoutTests:

Replaced <string> by <custom-ident> in the tests. Also added a new
one to check that children are properly layed out after changes in
the grid line names.

* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child-expected.txt: Added.
* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html: Added.
* fast/css-grid-layout/grid-item-area-get-set.html:
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html:
* fast/css-grid-layout/grid-item-bad-resolution-double-span.html:
* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-named-grid-line-resolution-expected.txt:
* 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/grid-item-start-before-get-set-expected.txt:
* fast/css-grid-layout/grid-item-start-before-get-set.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-item-area-get-set.html
LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
LayoutTests/fast/css-grid-layout/grid-item-bad-resolution-double-span.html
LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html
LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.html
LayoutTests/fast/css-grid-layout/grid-item-named-grid-area-resolution.html
LayoutTests/fast/css-grid-layout/grid-item-named-grid-line-resolution-expected.txt
LayoutTests/fast/css-grid-layout/grid-item-named-grid-line-resolution.html
LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html
LayoutTests/fast/css-grid-layout/grid-item-position-changed-dynamic.html
LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/StyleResolver.cpp