[webkit-changes] [WebKit/WebKit] 5aa94a: Reset algorithm is incorrect for select element wi...
Ahmad Saleem
noreply at github.com
Fri Dec 23 16:46:08 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5aa94a8e95f6432c20524bae9b665148b454e6c9
https://github.com/WebKit/WebKit/commit/5aa94a8e95f6432c20524bae9b665148b454e6c9
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2022-12-23 (Fri, 23 Dec 2022)
Changed paths:
A LayoutTests/fast/forms/select-ask-for-reset-expected.txt
A LayoutTests/fast/forms/select-ask-for-reset.html
M Source/WebCore/html/HTMLSelectElement.cpp
Log Message:
-----------
Reset algorithm is incorrect for select element with first option disabled
Reset algorithm is incorrect for select element with first option disabled
https://bugs.webkit.org/show_bug.cgi?id=249849
Reviewed by Tim Nguyen.
This patch is to align WebKit with Blink / Chromium, Gecko / Firefox and Web-Specification.
Web-Spec - https://www.w3.org/TR/html5/forms.html#ask-for-a-reset
Partial Merge - https://chromium.googlesource.com/chromium/src.git/+/5b2038755e5c1e046642373d6b3add2452b8eb2e
As per the spec, the user agent must set the selectedness of the first option element in the list
of options in tree order that is not disabled, if any, to true.
* Source/WebCore/html/HTMLSelectElement.cpp:
(HTMLSelectElement::reset): Update 'if' to also disallow selecting disabled option
* LayoutTests/fast/forms/select-ask-for-reset.html: Add Test Case
* LayoutTests/fast/forms/select-ask-for-reset-expected.txt: Add Test Case Expectation
Canonical link: https://commits.webkit.org/258313@main
More information about the webkit-changes
mailing list