Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 957846bf1e66357d4974bce4c1185d677a2d242e
https://github.com/WebKit/WebKit/commit/957846bf1e66357d4974bce4c1185d677a2d242e
Author: Alan Baradlay <[email protected]>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/rendering/RenderFlexibleBox.cpp
Log Message:
-----------
Fix
imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-053.html
https://bugs.webkit.org/show_bug.cgi?id=313359
Reviewed by Antti Koivisto.
The CSSWG updated the automatic minimum size algorithm in March 2025
(csswg-drafts PR #11690) to make non-replaced elements consult the
transferred size through aspect-ratio:
For replaced elements:
Use the smaller of the content size suggestion
and the transferred size suggestion.
For non-replaced elements:
Use the larger of the content size suggestion
and the transferred size suggestion.
Previously, only replaced elements (e.g. images) could compute their content
size through the aspect-ratio. Non-replaced elements used min-content
only, which is 0 for an empty div - causing it to collapse even with
an explicit aspect-ratio and definite cross size.
The fix widens canComputeSizeThroughAspectRatio to include non-replaced
elements and computes max(transferred, min-content) for them. Replaced
elements still use only the transferred size (their min-content IS the
transferred size).
* LayoutTests/TestExpectations:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeFlexItemMinMaxSizes):
Canonical link: https://commits.webkit.org/312085@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications