Closed Bug 1841924 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 40895 - [css-flex] Fix arithmetic underflow causing ~infinite flexbox width

Categories

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

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

David Grogan <dgrogan@chromium.org> wrote:

[css-flex] Fix arithmetic underflow causing ~infinite flexbox width

Turns out ((wtf_size_t)0 - 1) is a very big number.

We were adding gap*(num_items - 1) to the intrinsic with of flex
containers, but only when the container has a child that isn't a flex
item, like an abspos child. When the container had 0 children we
weren't running any of this logic at all as an optimization.

Fixed: 1459336
Change-Id: Ia060c6745de228598af9ec8c214ba79b5b575edc
Reviewed-on: https://chromium-review.googlesource.com/4668132
WPT-Export-Revision: ec67ec4c8450cf719b82f18c58d0bf3336e15ed3

Component: web-platform-tests → Layout: Flexbox
Product: Testing → Core
Test result changes from PR not available.
Test result changes from PR not available.
Test result changes from PR not available.
Test result changes from PR not available.
Test result changes from PR not available.
Test result changes from PR not available.
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f796158bdb2b
[wpt PR 40895] - [css-flex] Fix arithmetic underflow causing ~infinite flexbox width, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.