[webkit-changes] [WebKit/WebKit] febbe1: Fix problems on changing 'multiple' state SELECT e...
Ahmad Saleem
noreply at github.com
Wed Mar 8 11:18:02 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: febbe13cd11cd845645ec472954d2048e3289cda
https://github.com/WebKit/WebKit/commit/febbe13cd11cd845645ec472954d2048e3289cda
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M LayoutTests/fast/dom/HTMLSelectElement/change-multiple-preserve-selection-expected.txt
M LayoutTests/fast/dom/HTMLSelectElement/change-multiple-preserve-selection.html
M LayoutTests/fast/forms/select-ask-for-reset-expected.txt
M LayoutTests/fast/forms/select-ask-for-reset.html
M Source/WebCore/html/HTMLSelectElement.cpp
M Source/WebCore/html/HTMLSelectElement.h
M Source/WebCore/html/HTMLSelectElement.idl
M Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp
M Source/WebKitLegacy/mac/DOM/DOMHTMLSelectElement.mm
Log Message:
-----------
Fix problems on changing 'multiple' state SELECT element to 'single' state
https://bugs.webkit.org/show_bug.cgi?id=252969
rdar://problem/106264081
Reviewed by Aditya Keerthi.
This patch is to align WebKit with Blink / Chromium and Gecko / Firefox.
Merge - https://chromium.googlesource.com/chromium/src.git/+/ed6cd6b785c97d4a678c262bbf5e62bf46e5a2e8
This patch fixes two problems.
* Setting 'multiple' IDL attribute to false and removing 'multiple' content
attribute had different behavior.
They should be identical. This patch removes HTMLSelectElement::setMultiple(), and
add [Reflect] to 'multiple' IDL attribute.
* If multiple SELECT without selected OPTIONs is changed to single, we should run
reset().
All other browsers agree with this behavior.
* Source/WebCore/html/HTMLSelectElement.cpp:
(HTMLSelectElement::setMultiple): Deleted
(HTMLSelectElement::parseMultipleAttribute): Update for 'reset'
* Source/WebCore/html/HTMLSelectElement.h: Remove 'setMultiple'
* Source/WebCore/html/HTMLSelectElement.idl: Update 'multiple' to have [Reflect]
* Source/WebKitLegacy/mac/DOM/DOMHTMLSelectElement.mm: Update return instead of 'setMultiple'
* Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
(webkit_dom_html_select_element_set_multiple): Ditto
* LayoutTests/fast/forms/select-ask-for-reset.html: Sync up-to-date from Chromium Source
* LayoutTests/fast/forms/select-ask-for-reset-expected.txt: Rebaselined
* LayoutTests/fast/dom/HTMLSelectElement/change-multiple-preserve-selection.html: Rebaselined
* LayoutTests/fast/dom/HTMLSelectElement/change-multiple-preserve-selection-expected.txt: Rebaselined
Canonical link: https://commits.webkit.org/261380@main
More information about the webkit-changes
mailing list