Closed Bug 1579872 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 18936 - [css-grid] Preserve auto repeat() in getComputedStyle() for non-grids

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 18936 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/18936
Details from upstream follow.

Oriol Brufau <obrufau@igalia.com> wrote:

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

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

Change-Id: Ia262102472f2270cc9fed97a76f2766a1c17e931
Reviewed-on: https://chromium-review.googlesource.com/1724517
WPT-Export-Revision: 93be3d85c966c0411c3adff7c5572ebf4df26f32

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 4 tests and 84 subtests
OK     : 4
PASS   : 68
FAIL   : 16

New tests that have failures or other problems:
/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
    Property grid-template-columns value '[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]' computes to '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]': FAIL
    Property grid-template-columns value '[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]' computes to '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]': FAIL
    Property grid-template-columns value '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]' computes to '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]': FAIL
    Property grid-template-columns value '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]' computes to '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]': FAIL
/css/css-grid/parsing/grid-template-columns-computed.html
    Property grid-template-columns value '[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]' computes to '[a] 1px 2px [b] 3px 4px [d]': FAIL
    Property grid-template-columns value '[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]' computes to '[a] 1px 0px [b] 0px 4px [d]': FAIL
    Property grid-template-columns value '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]' computes to '[a] 1px 2px [b] 3px 4px [d]': FAIL
    Property grid-template-columns value '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]' computes to '[a] 1px 0px [b] 0px 4px [d]': FAIL
/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
    Property grid-template-rows value '[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]' computes to '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]': FAIL
    Property grid-template-rows value '[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]' computes to '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]': FAIL
    Property grid-template-rows value '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]' computes to '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]': FAIL
    Property grid-template-rows value '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]' computes to '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]': FAIL
/css/css-grid/parsing/grid-template-rows-computed.html
    Property grid-template-rows value '[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]' computes to '[a] 1px 2px [b] 3px 4px [d]': FAIL
    Property grid-template-rows value '[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]' computes to '[a] 1px 0px [b] 0px 4px [d]': FAIL
    Property grid-template-rows value '[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]' computes to '[a] 1px 2px [b] 3px 4px [d]': FAIL
    Property grid-template-rows value '[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]' computes to '[a] 1px 0px [b] 0px 4px [d]': FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/195cc7fbce21
[wpt PR 18936] - [css-grid] Preserve auto repeat() in getComputedStyle() for non-grids, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/b6dda52d336f
[wpt PR 18936] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.