Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8c08746561302a45e45bd839afa799e25c75897b
https://github.com/WebKit/WebKit/commit/8c08746561302a45e45bd839afa799e25c75897b
Author: Anne van Kesteren <[email protected]>
Date: 2026-09-29 (Tue, 29 Sep 2026)
Changed paths:
A
LayoutTests/fast/forms/select/base/select-list-box-slots-options-expected.txt
A LayoutTests/fast/forms/select/base/select-list-box-slots-options.html
A
LayoutTests/fast/forms/select/base/select-option-base-appearance-styles-expected.txt
A
LayoutTests/fast/forms/select/base/select-option-base-appearance-styles.html
A
LayoutTests/platform/ios/fast/forms/select/base/select-option-base-appearance-styles-expected.txt
M Source/WebCore/css/selectMultipleAndListBox.css
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ShadowRoot.h
M Source/WebCore/dom/SlotAssignment.h
M Source/WebCore/html/HTMLButtonElement.cpp
M Source/WebCore/html/HTMLButtonElement.h
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLInputElement.h
M Source/WebCore/html/HTMLMeterElement.cpp
M Source/WebCore/html/HTMLMeterElement.h
M Source/WebCore/html/HTMLProgressElement.cpp
M Source/WebCore/html/HTMLProgressElement.h
M Source/WebCore/html/HTMLSelectElement.cpp
M Source/WebCore/html/HTMLSelectElement.h
M Source/WebCore/html/HTMLTextAreaElement.cpp
M Source/WebCore/html/HTMLTextAreaElement.h
M Source/WebCore/html/shadow/SelectPopoverElement.cpp
M Source/WebCore/html/shadow/SelectPopoverElement.h
M Source/WebCore/rendering/RenderTheme.cpp
M Source/WebCore/style/MatchedDeclarationsCache.cpp
M Source/WebCore/style/StyleAdjuster.cpp
M Source/WebCore/style/StyleSubstitutionResolver.cpp
M Source/WebCore/style/computed/StyleComputedStyleBase+GettersInlines.h
M Source/WebCore/style/computed/StyleComputedStyleBase+SettersInlines.h
M Source/WebCore/style/computed/StyleComputedStyleBase.h
M Source/WebCore/style/computed/data/StyleInheritedRareData.cpp
M Source/WebCore/style/computed/data/StyleInheritedRareData.h
Log Message:
-----------
Options of a native select pick up the styles of a base appearance one
https://bugs.webkit.org/show_bug.cgi?id=325153
Reviewed by Elika Etemad.
-internal-auto-base() only looked at an element's own appearance, which is none
for an
option, so the option rules in selectMultipleAndListBox.css could not revert
and applied
to every list box and multi-select dropdown box. A native <select multiple>
reported base
appearance padding, alignment and borders for its options.
This is not intended by the specification and also not what Chromium and Gecko
do. Now
there is an inherited bit which -internal-auto-base() can use. Form controls
and the
picker have an appearance of their own and keep deciding for themselves, so a
select or
other control nested inside an option stays native.
MatchedDeclarationsCache only compares inherited data for a full match, and a
partial
match copies the non-inherited properties that now depend on the bit. Skip
entries whose
parent differs in it rather than not caching these styles at all.
A list box also slotted its options through the picker it does not have, which
made the
picker their ancestor. Give it a slot of its own instead. Only the preferred
size decides
which slot the options go to, so slotting does not depend on style; where a
select is not
rendered as that box type, it is rendered natively, which does not use the
slots. Changing
size or multiple reassigns them through a new
didChangeSlotNamesOfShadowHostChildren().
The slot is only created when HTMLEnhancedSelectMultipleAndListBoxEnabled is on.
The dropdown box rules in html.css have the same problem and are left for a
follow-up.
On iOS every native select is a dropdown box, so the native cases still pick up
the
html.css rules. They should start passing once the html.css rules are fixed.
Filed https://github.com/whatwg/html/issues/12996 to get this better defined.
Tests: fast/forms/select/base/select-list-box-slots-options.html
fast/forms/select/base/select-option-base-appearance-styles.html
Canonical link: https://commits.webkit.org/322153@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications