Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 24d831f77f5eafcbb6b21b3c3078babf88a1f4c6
https://github.com/WebKit/WebKit/commit/24d831f77f5eafcbb6b21b3c3078babf88a1f4c6
Author: Anne van Kesteren <[email protected]>
Date: 2026-09-15 (Tue, 15 Sep 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/fast/forms/select/optgroup-option-shadow-tree-expected.txt
M LayoutTests/fast/forms/select/optgroup-option-shadow-tree.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend-not-first-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend-not-first-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend-not-first.html
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/w3c-import.log
M Source/WebCore/css/CSSPseudoSelectors.json
M Source/WebCore/css/html.css
M Source/WebCore/html/HTMLElement.cpp
M Source/WebCore/html/HTMLElement.h
M Source/WebCore/html/HTMLLegendElement.cpp
M Source/WebCore/html/HTMLLegendElement.h
M Source/WebCore/html/HTMLOptGroupElement.cpp
M Source/WebCore/html/HTMLOptGroupElement.h
M Source/WebCore/html/HTMLOptionElement.cpp
M Source/WebCore/html/HTMLOptionElement.h
Log Message:
-----------
Make <option> and <optgroup> share a text content algorithm
https://bugs.webkit.org/show_bug.cgi?id=324223
Reviewed by Tim Nguyen.
Implements https://github.com/whatwg/html/pull/12232, which replaces
"collect option text" with "get HTML-aware text content", now shared
between <option> and <optgroup>.
Getting an <optgroup>'s label now only considers a <legend> that is the
optgroup's first element child, falling back to the label attribute and
then the empty string.
The label element has to look like a <legend>, which is the entire
reason it exists, so it now shares their user agent style rule through
an -internal-optgroup-label user agent part rather than carrying two
inline padding properties that had drifted from that rule.
fast/forms/select/optgroup-option-shadow-tree.html expected the label
element to exist only for a label attribute, so update it, and cover a
<legend> that is not the first element child while there.
The reference tests are not always passing due to the slight shift of the
picker icon as noted in TestExpectations.
Test:
imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-appearance-optgroup-legend-not-first.html
Upstream: https://github.com/web-platform-tests/wpt/pull/61109
Canonical link: https://commits.webkit.org/321227@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications