Bug 1815349 [wpt PR 38381] - [GridNG] Clamp auto-placement to subgrid area, a=testonly
commitd552fa5abff122620c32cde975e1df8ac7b2aa0a
authorKurt Catti-Schmidt (SCHMIDT) <kschmi@microsoft.com>
Fri, 10 Feb 2023 17:39:18 +0000 (10 17:39 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 20 Feb 2023 09:49:10 +0000 (20 09:49 +0000)
treee273ec9e02a283a3d9d9310bb359c0953a5015b8
parent2758a3299791ee6e4ae8fbda7da562f791ce75f5
Bug 1815349 [wpt PR 38381] - [GridNG] Clamp auto-placement to subgrid area, a=testonly

Automatic update from web-platform-tests
[GridNG] Clamp auto-placement to subgrid area

While prototyping auto-repeat for subgrids, I came across a subtle
placement bug with subgrids that's a sub-case of
repeat-auto-fill-001.html.

In summary, auto placement for grids depends on `minor_max_end_line_`,
which determines when to wrap lines. For normal grids this can extend
indefinitely, and implicit tracks will be created to fit the expanded track numbers. However, for subgrids, this can be at maximum the
subgrid span size. Implicit tracks can be created for subgrids, but
only up to the subgrid span size.

Prior to this change, we were only clamping at the very end of
placement, which was causing various "double-placement" issues,
demonstrated in the test case added.

Bug: 618969
Change-Id: Ic3972408e4dd4f2069fa1bf26c95d815c26cb929
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4225602
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com>
Reviewed-by: Alison Maher <almaher@microsoft.com>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1102306}

--

wpt-commits: b215e3d1c0bca23473f2d124a2e39e282e6ba30a
wpt-pr: 38381
testing/web-platform/tests/css/css-grid/subgrid/placement-implicit-001-ref.html [new file with mode: 0644]
testing/web-platform/tests/css/css-grid/subgrid/placement-implicit-001.html [new file with mode: 0644]