Closed Bug 2060676 Opened 3 months ago Closed 3 months ago

[wpt-sync] Sync PR 61728 - [Masonry] Implement flow-tolerance in dense-packing

Categories

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

task

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Celeste Pan <celestepan@microsoft.com> wrote:

[Masonry] Implement flow-tolerance in dense-packing

This change implements flow-tolerance in dense-packing, and fixes a bug
found where with dense-packing enabled, flow-tolerance was not being
correctly honored. This also adds new tests, to ensure that within
multiple track openings, we will choose the first track opening that is
within flow-tolerance of the minimum.

Our implementation of the dense-packing algorithm now requires 2 passes
-- the first to find the absolute minimum running position among the
eligible track openings, and a second to select the first eligible track
opening which is within flow-tolerance of the minimum. Previously,
because we didn't need to account for flow-tolerance, we could just keep
whatever was the absolute minimum running position as our placement
location, but now we have to make sure we're picking the first track we
see in the flow which is within flow-tolerance of the minimum running
position.

Applying flow-tolerance to dense-packing uncovers a new bug, where the
second part of a split track opening was not correctly calculated;
column-dense-packing-multi-span-009.html and
column-dense-packing-001.html are split-track-opening-focused tests
which catch this problem.

Tests references for
[row|column]-fill-reverse-dense-packing-[definite|indefinite]-size-001.html
were updated, as item 4 should affect the auto-placement cursor, and
even though item 5 does not, that makes track 4 the logical
auto-placement position for item 6, given that it doesn't get densely
packed.

[1] https://drafts.csswg.org/css-grid-3/#grid-lanes-layout-algorithm

Bug: 343257585, 517847439
Change-Id: If2fb596867778854c4d9168dfefa3ec217b7ac4e
Reviewed-on: https://chromium-review.googlesource.com/8111177
WPT-Export-Revision: 1524c3da62990436530c4d6de893e739d7675ff9

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 15 tests

Status Summary

Firefox

FAIL: 15

Chrome

PASS: 3
FAIL: 12

Safari

PASS: 4
FAIL: 11

Links

GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

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