Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-grid] Preserve auto repeat() in getComputedStyle() for non-grids #18936

Merged
merged 1 commit into from Sep 25, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 9, 2019

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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants