Closed Bug 2089341 Opened 14 days ago Closed 6 days ago

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

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Alan Baradlay <zalan@apple.com> wrote:

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

WebKit export from bug: [<!---->replaced]<!----> min-<!---->width is not honored over max-<!---->width when sizing a shrink-<!---->to-<!---->fit container around a replaced element

<pre>
[replaced] min-width is not honored over max-width when sizing a shrink-to-fit container around a replaced element

When a box's used min-width is larger than its max-width, min-width wins: per CSS 2.1
10.4, max-width is floored to min-width (equivalently, the used width is
max(min-width, min(width, max-width))).

RenderReplaced got this right for the used width (see
computeReplacedLogicalWidthRespectingMinMaxWidth(), which clamps as
max(min, min(width, max))), but not for the min/max-content contributions computed in
computeIntrinsicLogicalWidthContributions(). There, the explicit fixed min/max-width
constraints were applied in the wrong order - min-width first, then max-width - so a
smaller max-width clamped the contribution back down and won. As a result a shrink-to-fit
ancestor (e.g. an inline-block) sized to max-width instead of min-width.

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

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Attached file Notable wpt changes —

CI Results

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

Total 812 tests

Status Summary

Firefox

OK : 1[GitHub] 236[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-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 1[GitHub] 8[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 5684[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 6193[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] 6195[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 580[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 634[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 636[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]
TIMEOUT: 3
ERROR : 3

Chrome

OK : 1
PASS : 1

Safari

OK : 1
PASS : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

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

Attachment

General

Created:
Updated:
Size: