Closed Bug 1750882 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 32443 - [FlexNG] Support break-inside:avoid for flex rows

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Alison Maher <almaher@microsoft.com> wrote:

[FlexNG] Support break-inside:avoid for flex rows

This CL allows flex rows to respond to unappealing breaks in items
due to break-inside:avoid.

If the current row for an item has container-separation, and
an item inside has break-inside:avoid set, we should move the entire
row into the next fragmentainer.

However, flex rows don't produce layout results (although we
potentially could go this route if we end up needing to), so in order
to break before a row, add flex rows as early breaks inside the
builder (if there is container separation).

Flex row early breaks are distinguished by their line number,
similar to line boxes. This allows the container to abort layout
and break before the row, instead.

Because flex rows produce no layout result, we will break before the
first item in a row to distinguish such cases.

Previous to this change, we considered some items in a flex row to
have container-separation. This, however, is incorrect. Flex items
in a row can never break before on their own. To fix this, update
item container-separation in a flex row to always be false.

As a result, multi-line-row-flex-fragmentation-010.html and
multi-line-row-flex-fragmentation-015.html were updated to reflect
the new breaking behavior (i.e. no one item in a row can break
before without causing the entire row to break before).

Bug: 660611
Change-Id: I9e55907b7aa62b0bcdb89111805c9e7de7f3af6f

Reviewed-on: https://chromium-review.googlesource.com/3399793
WPT-Export-Revision: 724b4688ac65a6941483b9375d9fd55df135ce2c

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

CI Results

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

Total 7 tests

Status Summary

Firefox

PASS: 2
FAIL: 5

Chrome

FAIL: 7

Safari

PASS: 2
FAIL: 5

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-break/flexbox/multi-line-row-flex-fragmentation-010.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-break/flexbox/multi-line-row-flex-fragmentation-015.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-break/flexbox/multi-line-row-flex-fragmentation-018.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-break/flexbox/multi-line-row-flex-fragmentation-019.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-break/flexbox/multi-line-row-flex-fragmentation-020.html: FAIL (Chrome: FAIL, Safari: FAIL)

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