Closed Bug 1935226 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 49526 - [Grid] Serialize grid-areas for implict tracks in grid-template values

Categories

(Core :: Layout: Grid, task, P4)

task

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Kurt Catti-Schmidt <kschmi@microsoft.com> wrote:

[Grid] Serialize grid-areas for implict tracks in grid-template values

This CL fixes an issue with serializing the grid-template shorthand
when it is defined via longhands that create implicit tracks. The
current behavior iterates over explicit track sizes, which leaves out
grid areas that cover implicit tracks. The fix is to iterate over the
remaining rows defined in the grid-area map to ensure all defined
grid-areas are serialized. This will ensure that grid-template
properly round-trips without dropping grid area definitions.

WPT coverage was very light for grid-template shorthands with
implicit tracks, so I augmented a few existing tests to cover these
scenarios. No additional issues were discovered. There weren't any
tests explicitly testing the grid-template serialization via
longhands, so I added a new test that fails without this fix
(grid-template-shorthand-composition.html).

Change-Id: If88460391fbfa2127cf07f32e7b81acb6ece6536
Bug: 380369291

Reviewed-on: https://chromium-review.googlesource.com/6068810
WPT-Export-Revision: 8b391973d04fa2f66d39e644648551b5b24af380

Component: web-platform-tests → Layout: Grid
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 4 tests and 28 subtests

Status Summary

Firefox

OK : 4
PASS: 178
FAIL: 2

Chrome

OK : 4
PASS: 179
FAIL: 1

Safari

OK : 4
PASS: 178
FAIL: 2

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-grid/parsing/grid-template-shorthand-composition.html [wpt.fyi]
    • grid-template-rows: auto, grid-template-columns: auto, and "grid-template-areas: "a a a" "b b b";" should be valid.: FAIL (Chrome: PASS, Safari: FAIL)
    • grid-template-rows: min-content, grid-template-columns: min-content, and "grid-template-areas: "a a a" "b b b" "c c c" "d d d";" should be valid.: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5cb3f272e1d5 [wpt PR 49526] - [Grid] Serialize grid-areas for implict tracks in grid-template values, a=testonly https://hg.mozilla.org/integration/autoland/rev/82afce5eac56 [wpt PR 49526] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.