Closed Bug 2083473 Opened 1 month ago Closed 24 days ago

[wpt-sync] Sync PR 63819 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=324007

Categories

(Core :: Layout: Flexbox, 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 63819 into mozilla-central (this bug is closed when the sync is complete).

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

Alan Baradlay <zalan@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=324007

WebKit export from bug: [<!---->Flex]<!----> flex-<!---->wrap:<!----> balance does not pack items that follow an overflowing item

<pre>
[Flex] flex-wrap: balance puts every item after an overflowing item on its own line

 &lt;div style=&quot;display: flex; flex-wrap: balance; width: 100px; column-gap: 10px&quot;&gt;
   &lt;div style=&quot;width: 50px&quot;&gt;&lt;/div&gt;
   &lt;div style=&quot;width: 300px&quot;&gt;&lt;/div&gt;
   &lt;div style=&quot;width: 20px&quot;&gt;&lt;/div&gt;
   &lt;div style=&quot;width: 20px&quot;&gt;&lt;/div&gt;
 &lt;/div&gt;

The last two items should share the third line. Instead each got a line of its own.

Before balancing,
1, the line breaker walks the items once to record how many of them fit on a line starting at each index
2, the walk keeps a single end index across iterations so it never re-measures

but end only moves forward when something fits, so an item wider than the line leaves it behind start.

The next iteration then asks for the length of an empty range producing a length larger than any line,
so the walk stops at once and records that only one item fits.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=324007">https://bugs.webkit.org/show_bug.cgi?id=324007</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/321057@main">https://commits.webkit.org/321057@main</a>
</pre>

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

CI Results

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

Total 51 tests

Status Summary

Firefox

OK : 10
PASS: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 32[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 37[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: 1[GitHub] 37[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 72[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: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

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