[webkit-changes] [WebKit/WebKit] b9e0d1: `option` and `optgroup` shouldn't be focusable in ...
Ahmad Saleem
noreply at github.com
Wed May 31 14:40:25 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b9e0d14b62e69a753f91941a5beeb540c56c1858
https://github.com/WebKit/WebKit/commit/b9e0d14b62e69a753f91941a5beeb540c56c1858
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M LayoutTests/fast/events/resources/tabindex-focus-blur-all-frame1.html
M LayoutTests/fast/events/resources/tabindex-focus-blur-all-frame2.html
M LayoutTests/fast/events/resources/tabindex-focus-blur-all-iframe1.html
M LayoutTests/fast/events/resources/tabindex-focus-blur-all-iframe2.html
A LayoutTests/fast/forms/select/listbox-focusable-items-expected.txt
A LayoutTests/fast/forms/select/listbox-focusable-items.html
A LayoutTests/fast/forms/select/menulist-focusable-items-expected.txt
A LayoutTests/fast/forms/select/menulist-focusable-items.html
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/html/HTMLOptGroupElement.cpp
M Source/WebCore/html/HTMLOptionElement.cpp
Log Message:
-----------
`option` and `optgroup` shouldn't be focusable in a menulist
https://bugs.webkit.org/show_bug.cgi?id=249627
rdar://problem/103717395
Reviewed by Tim Nguyen.
This patch aligns WebKit with Blink / Chromium and Gecko / Firefox.
Merge: https://chromium.googlesource.com/chromium/blink/+/db4eb7807f1591c3beebe2e40a3c57d9e57a3c85
This patch modifies WebKit behavior to match other browsers,
where `option` and `optgroup` elements are not focusable at all
when in menulist within `select` element irrespective of 'tabindex'
attribute and simplify code as well.
* Source/WebCore/html/HTMLOptionElement.cpp:
(HTMLOptionElement::isFocusable): return 'false' when in menulist
* Source/WebCore/html/HTMLOptGroupElement.cpp:
(HTMLOptGroupElement::isFocusable): Ditto
* LayoutTests/fast/forms/select/menulist-focusable-items.html: Add Test Case
* LayoutTests/fast/forms/select/menulist-focusable-items-expected.txt: Add Test Case Expectation
* LayoutTests/fast/forms/select/listbox-focusable-items.html: Add Test Case
* LayoutTests/fast/forms/select/listbox-focusable-items-expected.txt: Add Test Case Expectation
* LayoutTests/fast/events/resources/tabindex-focus-blur-all-iframe1.html: Rebaselined
* LayoutTests/fast/events/resources/tabindex-focus-blur-all-iframe2.html: Rebaselined
* LayoutTests/fast/events/resources/tabindex-focus-blur-all-frame1.html: Rebaselined
* LayoutTests/fast/events/resources/tabindex-focus-blur-all-frame2.html: Rebaselined
* LayoutTests/platform/ios/TestExpectations: Add 'ios' Expectation for 'fast/forms/select/listbox-focusable-items.html'
Canonical link: https://commits.webkit.org/264755@main
More information about the webkit-changes
mailing list