Closed Bug 2018798 Opened 9 months ago Closed 8 months ago

[wpt-sync] Sync PR 57999 - [Masonry] Clamp impact of negative margins on running positions to zero

Categories

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

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Celeste Pan <celestepan@microsoft.com> wrote:

[Masonry] Clamp impact of negative margins on running positions to zero

Based on how the CSSWG resolved the effect of negative margins
(margin-top [1] and margin-bottom [2]), the item's VISUAL placement
should always be affected by negative margins without clamping, but the
track's running position should never go backwards -- this means that
when calculating an item's size contribution to the running position, we
should never allow the item's contribution to go below 0.

This change only tests for the running position contribution. Tests and
possible code changes needed for dense-packing will be added in a
follow-up change.

A baseline test was disabled as the negative margin handling for that
test is incorrect based on the resolution in [3].

[1] https://github.com/w3c/csswg-drafts/issues/12918
[2] https://github.com/w3c/csswg-drafts/issues/13164
[3] https://github.com/w3c/csswg-drafts/issues/13165

Bug: 343257585
Change-Id: Idc32a6638fb64da25c3928e77098a6d97b1a052a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7585254
Reviewed-by: Alison Maher \<almaher@microsoft.com>
Reviewed-by: Yanling Wang \<yanlingwang@microsoft.com>
Commit-Queue: Celeste Pan \<celestepan@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1588909}

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

CI Results

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

Total 81 tests

Status Summary

Firefox

PASS: 2
FAIL: 6[GitHub] 79[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-24h2-debug, Gecko-windows11-64-24h2-opt]

Chrome

PASS: 2
FAIL: 4

Safari

PASS: 2
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

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