Closed Bug 1745328 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 31988 - [FlexNG] Adjust row flexbox info for item expansion

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Alison Maher <almaher@microsoft.com> wrote:

[FlexNG] Adjust row flexbox info for item expansion

When a flex-item expands due to fragmentation, we need to adjust the
intrinsic-block-size and subsequent offsets.

In CL:3290486, the original block-size of each item was stored on
NGFlexItem and reduced as the item is fragmented. We can use this same
strategy for row containers to tell when an item expanded as a
result of fragmentation (i.e. when the stored block size becomes
negative).

For rows, though, the item expansion applies to the next line rather
than items in the same line. Thus, utilize the next line's
|item_offset_adjustment| to keep track of the max item expansion
in the current row. This is then accumulated between rows.

A general expansion related bug was also fixed by this CL (see the extra
tests added for single-line column fragmentation). The bug was that
if an item breaks before, and it had a top margin, that margin
would get included in the |item_offset_adjustment|, which is incorrect.
ConsumeRemainingFragmentainerSpace() was updated to calculate the
correct amount the item expanded by.

The following wpt test is now passing as a result of this CL:
virtual/layout_ng_flex_frag/fast/multicol/flexbox/flexbox.html

Bug: 660611
Change-Id: I4f4ae8cf32a3d501e7dc293ed4c9fa45f2380cd9

Reviewed-on: https://chromium-review.googlesource.com/3328370
WPT-Export-Revision: 32eb2b263bffaec85fc913b01024001b03b39b82

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

CI Results

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

Total 13 tests

Status Summary

Firefox

PASS: 2
FAIL: 11

Chrome

PASS: 6
FAIL: 7

Safari

PASS: 6
FAIL: 7

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

/css/css-break/flexbox/multi-line-row-flex-fragmentation-009.html: FAIL
/css/css-break/flexbox/single-line-row-flex-fragmentation-009.html: FAIL
/css/css-break/flexbox/single-line-row-flex-fragmentation-011.html: FAIL

New Tests That Don't Pass

/css/css-break/flexbox/multi-line-row-flex-fragmentation-009.html: FAIL (Chrome: PASS, Safari: 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-012.html: FAIL (Chrome: FAIL, Safari: PASS)
/css/css-break/flexbox/multi-line-row-flex-fragmentation-013.html: FAIL (Chrome: PASS, Safari: FAIL)
/css/css-break/flexbox/multi-line-row-flex-fragmentation-014.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-016.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-break/flexbox/single-line-column-flex-fragmentation-030.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-break/flexbox/single-line-column-flex-fragmentation-031.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-break/flexbox/single-line-row-flex-fragmentation-009.html: FAIL (Chrome: PASS, Safari: PASS)
/css/css-break/flexbox/single-line-row-flex-fragmentation-011.html: FAIL (Chrome: PASS, Safari: PASS)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/52ecd63d39d2 [wpt PR 31988] - [FlexNG] Adjust row flexbox info for item expansion, a=testonly https://hg.mozilla.org/integration/autoland/rev/24335168a9c2 [wpt PR 31988] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.