Closed Bug 1733091 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30900 - [css-flex] Obey stretch size in replaced items' content size suggestion

Categories

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

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

David Grogan <dgrogan@chromium.org> wrote:

[css-flex] Obey stretch size in replaced items' content size suggestion

Content size suggestion is just min-content size. The min-content size
of a replaced element is supposed to account for preferred size in the
opposite axis. We were not doing that for content size suggestion when
the opposize axis preferred size came from a flexbox's fixed cross size.

In the example below, Blink now gives the image content size suggestion
100px because 100 = 300*150/50. Before this patch Blink gave it a
content size suggestion equal to its natural width 300px.

\<div style="display: flex; height: 50px;">
\<img src="support/300x150-green.png">
\</div>

Firefox matches Blink's behavior before this patch. We may have compat
issues.

Bug: 1246126
Change-Id: I1d42c7151b9a0da7e001ca89ea1d7fb9187ae235
Reviewed-on: https://chromium-review.googlesource.com/3173922
WPT-Export-Revision: f348043891e693828cef9d1a339a55e307f2942e

Component: web-platform-tests → Layout: Flexbox
Product: Testing → Core
See Also: → 1735589
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59bc8e0e3f7a
[wpt PR 30900] - [css-flex] Obey stretch size in replaced items' content size suggestion, a=testonly
https://hg.mozilla.org/integration/autoland/rev/0035083b5dda
[wpt PR 30900] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.