[css-grid] Preserve auto repeat() in getComputedStyle() for non-grids #18936
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Usually, the resolved value of grid-template-rows/columns is the used
value, expanding the repeat() notation. But for elements with a non-grid
display, the resolved value is just the computed value, with repeat(),
since the used value doesn't exist.
Before this patch, the repeat() was dropped, and line names after it
appeared at the wrong position or were also dropped. There was also an
assert failure in debug. This patch fixes the serialization for auto
repeat(). Integer repeat() is still expanded at computed-value time, so
it's not preserved in getComputedStyle().
Spec: https://drafts.csswg.org/css-grid/#resolved-track-list
BUG=988516
TEST=external/wpt/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
TEST=external/wpt/css/css-grid/parsing/grid-template-columns-computed.html
TEST=external/wpt/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
TEST=external/wpt/css/css-grid/parsing/grid-template-rows-computed.html
There are some test failures because integer repeat() is still expanded
at computed-value time (http://crbug.com/989004).
Change-Id: Ia262102472f2270cc9fed97a76f2766a1c17e931
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724517
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Reviewed-by: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#699793}