Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1b8e143232bac9493173c5c0c457f203d5df550e
https://github.com/WebKit/WebKit/commit/1b8e143232bac9493173c5c0c457f203d5df550e
Author: Alan Baradlay <[email protected]>
Date: 2026-10-12 (Mon, 12 Oct 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-flex-item-min-width-001-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-flex-item-min-width-001-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-flex-item-min-width-001.html
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:
-----------
[Flex] A table flex item with borders or padding and a non-auto min-width is
too wide
https://bugs.webkit.org/show_bug.cgi?id=327182
<rdar://problem/189768684>
Reviewed by Antti Koivisto.
<div style="display: flex; width: 50px">
<table style="min-width: 0; border: 10px solid; border-spacing:
0"><tr><td style="padding: 0"><div style="width: 100px"></div></td></tr></table>
</div>
The table should be 120px wide, its min-content width. Instead it was 140px,
wider than with min-width: auto.
computeUsedNonAutoMinMainSize keeps a table from shrinking below its
min-content width by flooring the min main size,
a content-box size, with minContentMainAxisContributionForFlexItem. That
returned the min-content contribution with the
table's border and padding included, and the border box then added them a
second time.
Return the content-box size instead, like maxContentMainAxisExtentForFlexItem
does, and rename the function to
minContentMainAxisExtentForFlexItem to match.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-flex-item-min-width-001-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-flex-item-min-width-001-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-flex-item-min-width-001.html:
Added.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::FlexFormattingContext::computeUsedNonAutoMinMainSize):
* Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp:
(WebCore::LayoutIntegration::FlexIntegrationUtils::minContentMainAxisExtentForFlexItem):
Renamed from minContentMainAxisContributionForFlexItem.
(WebCore::LayoutIntegration::FlexIntegrationUtils::flexItemIntrinsicLogicalWidth):
* Source/WebCore/layout/integration/flex/FlexIntegrationUtils.h:
Canonical link: https://commits.webkit.org/323466@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications