Description[CSS Grid Layout] Implementation of the grid-template shorthand.
This shorthand sets the values for the grid-template-columns,
grid-template-rows and grid-template-areas, so the
implementation tries to reuse as much available parsing
functions as possible.
The "parsingGridTrackList" was refactored to return a
CSSValue and let the "parseValue" function to assign the
property value. The "forwardSlash" operator is now valid
when the track-list clause is part of a shorthand. The
"parseValue" function checkouts that only additional
clauses are allowed when processing shorthands; the
grid-columns-rows-get-set.html tests was modified to verify
this.
The "parseGridTemplateAreas" was refactored too, in order
to process single areas's rows. This is very useful for the
gris-template secondary syntax, which mixes areas and rows
values.
Finally, the "parseGirdLineNames" function was modified as
well by defining an new argument to concatenate head/tail
custom-ident elements and ensure the identList is at the
heading index, since it's now possible the parseList was
rewound.
The implementation of the grid-template shorthand tries
first to match the <grid-template-columns> / <grid-template-rows>
syntax, failing back to the secondary syntax if needed.
This approach requires to rewind the parseList but it
produces a clearer code.
TEST=fast/css-grid-layout/grid-template-shorthand-get-set.html
BUG=79180, 234196
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170552
Patch Set 1 #
Total comments: 10
Patch Set 2 : grid-template shorthand implementation. #Patch Set 3 : minor issues in the layout tests. #Patch Set 4 : Adding checks and layout tests to verify misplaced 'none' arguments. #
Total comments: 7
Patch Set 5 : New approach: simpler code, reusing track-list parsing and allow rewinding. #
Total comments: 11
Patch Set 6 : rebased and applied suggested changes. #
Total comments: 10
Patch Set 7 : Applied last suggested changes. #Patch Set 8 : Patch rebased and adapted to the new parsing approach. #
Total comments: 6
Patch Set 9 : Applied suggested changes. #
Total comments: 8
Patch Set 10 : Patch rebased and applied suggested changes. #Patch Set 11 : Fixed compilation error (warnings). #Patch Set 12 : Added the new property to the ones runtime enabled only. #Messages
Total messages: 32 (0 generated)
|