[webkit-changes] [WebKit/WebKit] 61a548: Handle focusability for plugin elements which has ...
Ahmad Saleem
noreply at github.com
Tue Jul 25 02:02:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 61a5480546df3e43c1b258c65d12e9396b1b5f0b
https://github.com/WebKit/WebKit/commit/61a5480546df3e43c1b258c65d12e9396b1b5f0b
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2023-07-25 (Tue, 25 Jul 2023)
Changed paths:
A LayoutTests/fast/dom/focus-navigation-in-plugin-expected.txt
A LayoutTests/fast/dom/focus-navigation-in-plugin.html
A LayoutTests/fast/dom/resources/plugin-focus-subframe.html
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/html/HTMLFrameOwnerElement.h
M Source/WebCore/html/HTMLPlugInElement.cpp
Log Message:
-----------
Handle focusability for plugin elements which has browsing context
https://bugs.webkit.org/show_bug.cgi?id=259420
Reviewed by Ryosuke Niwa.
This patch aligns WebKit with Blink / Chromium.
Merge: https://chromium.googlesource.com/chromium/src.git/+/a2c82afad86cf4f85f91df76f858434b15fe6b13
If `object` or `embed` has HTML/SVG contents,
focus navigation within documents under these
elements should work. This has been working fine
for `iframe`'s.
The FocusController code checks for FrameOwnerElement,
which is parent of `iframe`, `object`, and `embed` if
it is isKeyboardFocusable() and has contentFrame().
HTMLPluginElement::isKeyboardFocsuable() didn't handle
the cases with HTML/SVG contents, only considered plugins.
* Source/WebCore/html/HTMLPlugInElement.cpp:
(HTMLPlugInElement::isKeyboardFocusable): As above for focusability
* Source/WebCore/html/HTMLFrameOwnerElement.h: Move 'isKeyboardFocusable' from private to protected
* LayoutTests/fast/dom/focus-navigation-in-plugin.html: Add Test Case
* LayoutTests/fast/dom/resources/plugin-focus-subframe.html: Add Test Case resource
* LayoutTests/fast/dom/focus-navigation-in-plugin-expected.txt: Add Test Case Expectation
* LayoutTests/platform/ios/TestExpectations: Added test to skip on iOS since it does not support 'keyDown'
Canonical link: https://commits.webkit.org/266286@main
More information about the webkit-changes
mailing list