Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6298c5394bb0710a0d44acd76d16e9225df00697
https://github.com/WebKit/WebKit/commit/6298c5394bb0710a0d44acd76d16e9225df00697
Author: Alan Baradlay <[email protected]>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
M Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp
M Source/WebCore/layout/integration/flex/FlexIntegrationUtils.h
Log Message:
-----------
[css-values-5 calc-size()] Add support for an auto basis on the minimum size
of a flex item
https://bugs.webkit.org/show_bug.cgi?id=324509
<rdar://problem/187741189>
Reviewed by Antti Koivisto.
<div style="display: flex; width: 0">
<div style="min-width: calc-size(auto, size + 20px)"><div style="width:
80px"></div></div>
</div>
`auto` on a flex item's minimum size is its content-based minimum, 80px, so the
item is 100px wide.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::minMaxMainSizesForFlexItem):
(WebCore::FlexFormattingContext::minMaxMainSizesForFlexItem):
Runs the calculation over the content-based minimum, which is what an auto
basis stands for on a
minimum main size.
* Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp:
(WebCore::LayoutIntegration::FlexIntegrationUtils::resolveCalcSizeMainAxisExtentForFlexItem):
Substitutes a main axis extent for `size`, converting it by the item's own main
axis border and
padding the way box-sizing asks.
* Source/WebCore/layout/integration/flex/FlexIntegrationUtils.h:
* LayoutTests/TestExpectations:
Canonical link: https://commits.webkit.org/322518@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications