[webkit-changes] [WebKit/WebKit] d8c15e: [popover] Improve popover-focus-2.html
Rob Buis
noreply at github.com
Sat Apr 29 08:53:05 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d8c15ed26f95a54f6136b94ac284cda4f4a451ec
https://github.com/WebKit/WebKit/commit/d8c15ed26f95a54f6136b94ac284cda4f4a451ec
Author: Rob Buis <rbuis at igalia.com>
Date: 2023-04-29 (Sat, 29 Apr 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2-expected.txt
M Source/WebCore/page/FocusController.cpp
Log Message:
-----------
[popover] Improve popover-focus-2.html
https://bugs.webkit.org/show_bug.cgi?id=255730
Reviewed by Ryosuke Niwa.
This implements the following focus behavior [see 1]:
1. Moves focus from an invoking element to its invoked popover, regardless of where in the DOM that popover lives.
2. Moves focus back to the next focusable element after the invoking element once focus leaves the invoked popover.
3. Skips over an open invoked popover otherwise.
[1] https://html.spec.whatwg.org/#focus-navigation-scope-owner
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2-expected.txt:
* Source/WebCore/page/FocusController.cpp:
(WebCore::isOpenPopoverWithInvoker):
(WebCore::openPopoverInvokerCast):
(WebCore::FocusNavigationScope::firstChildInScope const):
(WebCore::FocusNavigationScope::lastChildInScope const):
(WebCore::FocusNavigationScope::nextSiblingInScope const):
(WebCore::FocusNavigationScope::previousSiblingInScope const):
(WebCore::FocusNavigationScope::FocusNavigationScope):
(WebCore::FocusNavigationScope::owner const):
(WebCore::FocusNavigationScope::scopeOf):
(WebCore::FocusNavigationScope::scopeOwnedByPopoverInvoker):
(WebCore::FocusController::findFocusableElementAcrossFocusScope):
Canonical link: https://commits.webkit.org/263532@main
More information about the webkit-changes
mailing list