Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9325e4f9d7148ecf6e83e37f87b03b15623c5a16
https://github.com/WebKit/WebKit/commit/9325e4f9d7148ecf6e83e37f87b03b15623c5a16
Author: Brent Fulgham <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-orthogonal-percentage-child-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-orthogonal-percentage-child.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-row-percentage-height-child-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-row-percentage-height-child.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-shrink-to-fit-ancestor-relayout-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-shrink-to-fit-ancestor-relayout.html
M Source/WebCore/rendering/RenderBlock.cpp
Log Message:
-----------
REGRESSION (321748@main): a child with height: 100% inside an aspect-ratio
row flex item resolves to auto
https://bugs.webkit.org/show_bug.cgi?id=325832
rdar://188727654
Reviewed by Alan Baradlay.
362ed3e5e593 (321748@main) made the aspect-ratio bail-out apply to any
shrink-to-fit box with invalid content logical widths. Every row flex item
is shrink-to-fit, so a flex item with an aspect ratio lost the percentage
height of its children even during the real layout, where the flex container
has already set its overriding inline size. The Yahoo Sports player
container regressed this way, as it did before with 313727@main and its
revert in 314405@main.
Therefore skip the sizesLogicalWidthToFitContent() arm of the bail-out for a
flex item whose main axis is its inline axis and that has an
overridingBorderBoxLogicalWidth. Whenever such an item's intrinsic widths
are measured, including when a shrink-to-fit ancestor queries the flex
container, FlexItemDefiniteCrossSizeScope clears that override first, so the
stale-width cases that 321748@main protects are still covered. An orthogonal
flex item keeps its cross size as the inline override during intrinsic
passes while logicalWidth() is still stale, so it stays under the bail-out.
The isRenderGrid() arm is unchanged.
Tests:
imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-row-percentage-height-child.html
imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-orthogonal-percentage-child.html
imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-shrink-to-fit-ancestor-relayout.html
flex-aspect-ratio-row-percentage-height-child.html is the reduction of the
bug: a height: 100% child of an aspect-ratio row flex item was 0px tall.
flex-aspect-ratio-orthogonal-percentage-child.html checks that an orthogonal
aspect-ratio flex item, which stays under the bail-out, still sizes a
block-size: 100% child correctly across relayouts.
flex-aspect-ratio-shrink-to-fit-ancestor-relayout.html puts the flex
container inside float, inline-block, table-cell and inline-grid ancestors,
whose intrinsic-width queries run between layouts, and checks that repeated
relayouts do not grow the aspect-ratio box.
Canonical link: https://commits.webkit.org/322341@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications