Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b5a5a49ff418e2a7a454fdc9a56459ce9c42345c
https://github.com/WebKit/WebKit/commit/b5a5a49ff418e2a7a454fdc9a56459ce9c42345c
Author: Anne van Kesteren <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/selectedcontent-attribute-change-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-attribute-change-reset-expected.txt
M LayoutTests/platform/gtk/fast/forms/basic-selects-expected.txt
M LayoutTests/platform/ios-18/fast/forms/basic-selects-expected.txt
M LayoutTests/platform/ios/fast/forms/basic-selects-expected.txt
M LayoutTests/platform/mac-sequoia-wk2/fast/forms/basic-selects-expected.txt
M LayoutTests/platform/mac-wk2/fast/forms/basic-selects-expected.txt
M LayoutTests/platform/mac/fast/forms/basic-selects-expected.txt
M LayoutTests/platform/wpe/fast/forms/basic-selects-expected.txt
M Source/WebCore/html/HTMLOptGroupElement.cpp
M Source/WebCore/html/HTMLOptGroupElement.h
M Source/WebCore/html/HTMLOptionElement.cpp
M Source/WebCore/html/HTMLOptionElement.h
M Source/WebCore/html/HTMLSelectElement.cpp
M Source/WebCore/html/HTMLSelectElement.h
Log Message:
-----------
Reset a <select>'s selectedness when its size or an option's disabledness
changes
https://bugs.webkit.org/show_bug.cgi?id=325639
Reviewed by Ryosuke Niwa and Tim Nguyen.
https://github.com/whatwg/html/pull/12263 made changing the size or multiple
attribute of <select>, or the disabled attribute of <option> or <optgroup>,
reset
the selectedness of the <select>, updating <selectedcontent> when that changes
the selected option.
A <select> no longer selects its first option when all of its options are
disabled, as the specification requires nothing to be selected then. The parser
also no longer selects an option inside a disabled <optgroup> by default, a
mistake from 310930@main. Chromium and Gecko already behave this way.
Removing the multiple attribute when no option is selected no longer resets the
options to their default selectedness and dirtiness. It selects the first
enabled option instead.
Enabling an <optgroup> now selects its first option when nothing is selected.
It used to recalculate the selection before updating its own disabledness.
Canonical link: https://commits.webkit.org/322349@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications