Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 073cacee7c2bc1d1806521ac730ccfaf92eaea20
https://github.com/WebKit/WebKit/commit/073cacee7c2bc1d1806521ac730ccfaf92eaea20
Author: Alan Baradlay <[email protected]>
Date: 2026-03-26 (Thu, 26 Mar 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/checkbox-percentage-width-in-flex-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/checkbox-percentage-width-in-flex.html
M Source/WebCore/rendering/RenderTheme.cpp
Log Message:
-----------
airindiaexpress.com: the checkbox is overlapping with the text
https://bugs.webkit.org/show_bug.cgi?id=310812
<rdar://172741572>
Reviewed by Antti Koivisto.
When a checkbox or radio button has a percentage width (e.g. width: 100%) inside
a flex container, the theme's adjustStyle sets min-width to the resolved
percentage
value. This prevents flex shrink from working, causing siblings to get zero
width.
In RenderTheme::minimumControlSize(), for checkboxes and radios with auto
min-width,
the code copies the computed width to min-width. When the width is a percentage
that
was passed through by controlSize() (since it only overrides auto/keyword
widths),
the percentage ends up as the min-width, preventing flex shrink.
The fix only copies width to min-width when the width is a fixed value (i.e., an
intrinsic size set by the theme), not when it is a percentage or other
non-fixed value.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/checkbox-percentage-width-in-flex-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/checkbox-percentage-width-in-flex.html:
Added.
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::RenderTheme::minimumControlSize const):
Canonical link: https://commits.webkit.org/310015@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications