Closed Bug 2086812 Opened 1 month ago Closed 20 days ago

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

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 64091 into mozilla-central (this bug is closed when the sync is complete).

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

Alan Baradlay <zalan@apple.com> wrote:

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

WebKit export from bug: min-<!---->block-<!---->size:<!----> fit-<!---->content is broken inside flex container

<pre>
[Flex] Intrinsic min-block-size on a column flex item is clamped by a smaller max-block-size

<div style="display: flex; flex-direction: column">
<div style="min-block-size: fit-content; max-block-size: 10px">Item</div>
</div>

The item should be as tall as its content (min-block-size wins over max-block-size). Instead it was 10px tall.

In the block axis, min-content, max-content and fit-content mean the automatic size, i.e. what height: auto gives.
useContentBasedMinimumSize read that as the automatic minimum size of min-height: auto and sent these keywords to computeContentBasedMinMainSize,
which clamps the content height by the max. RenderBox::constrainLogicalHeightByMinMax made the same mistake by turning min-content and max-content into auto.

The fix keeps the content-based minimum for min-height: auto only, so the intrinsic keywords resolve to the content height like any other non-auto min-block-size.
RenderBox no longer turns them into auto; a box whose height comes from its aspect ratio resolves them through that ratio instead.

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

Component: web-platform-tests → Layout: Flexbox
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 1418 tests and 12 subtests

Status Summary

Firefox

OK : 375
PASS: 29[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 4655[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 5592[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 5593[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]
FAIL: 1[GitHub] 152[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 224[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] 227[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 228[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

Tests Disabled in Gecko Infrastructure

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