[css-grid] Fix line name positions after auto repeat with no line names #19661
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.
When serializing grid-template-rows/columns of a grid container, we need
to handle auto repeat() specially in order to insert the line names at
the correct places.
Before this patch, this was skipped for indices before the insertion
point of the auto repeat, and in case the auto repeat had no line name.
The latter logic was wrong, if there is an auto repeat we still need the
special code after the insertion point, even if it has no line names.
The proper condition to check is whether there is no auto repeat.
The patch also avoids a 2nd call to GridAutoRepeatRows/Columns since we
already have the value in a variable.
BUG=1011329
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-withcontent.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: I16d06275384ab8c7866b4981ba8dcc665258b29d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857125
Reviewed-by: Manuel Rego <rego@igalia.com>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#708661}