Closed Bug 2086926 Opened 1 month ago Closed 19 days ago

[wpt-sync] Sync PR 64133 - [Masonry] Adjust column items for fragmentation expansion

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Alison Maher <almaher@microsoft.com> wrote:

[Masonry] Adjust column items for fragmentation expansion

When a grid-lanes item is fragmented, it may grow beyond the block size
it was given during placement, for example when its content is pushed by
a fragmentainer break or when its min block size encompasses its
fragmented intrinsic size.

This change tracks the remaining block size of each column item as it is
fragmented. When an item reaches its block end with a negative remaining
size, the expansion is recorded as an item offset adjustment on every
lane it spans, and unstarted items in those lanes are shifted down by
that amount.

The expansion is recorded as soon as the item reaches its block end
rather than when it has no break token, since overflowing content may
continue in the next fragmentainer while later items in its lanes are
still laid out in the current one. The persisted total intrinsic block
size is also updated so that later fragments reflect the growth.

Items spanning multiple lanes need additional handling, since each
spanned lane may have expanded by a different amount. The intrinsic
block size of each column in the current fragment is tracked with
ColumnBreakInfo, matching column flex containers, and a spanner is
pushed down by however far the content in any of its lanes now reaches
past its original margin-box start, minus the gap. To support this, the
block-start margin of each item is now persisted alongside its block-end
margin.

Row grid-lanes containers are not changed, since their block size is
driven by row tracks rather than items. Row expansion will be handled
along with row break rules.

Bug: 343257585
Change-Id: I36a4fb1545397958fafcc0b1ab428918729bc850
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8620707
Reviewed-by: Ian Kilpatrick \<ikilpatrick@chromium.org>
Commit-Queue: Alison Maher \<almaher@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1726198}

Component: web-platform-tests → Layout
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 113 tests

Status Summary

Firefox

PASS: 13[GitHub] 51[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 4[GitHub] 62[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

PASS: 2
FAIL: 15

Safari

PASS: 13
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.