Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0ef0f9c6f23b147a1dcea2733f3f66d367e58f6f
https://github.com/WebKit/WebKit/commit/0ef0f9c6f23b147a1dcea2733f3f66d367e58f6f
Author: Tim Nguyen <[email protected]>
Date: 2025-01-22 (Wed, 22 Jan 2025)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2.html
M
LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2-expected.txt
M Source/WebCore/page/FocusController.cpp
Log Message:
-----------
[popover] Tabbing out of a popover causes a hang in certain cases
https://bugs.webkit.org/show_bug.cgi?id=285811
rdar://143145544
Reviewed by Ryosuke Niwa.
In the cases where we can't find a candidate in
`FocusController::findFocusableElementAcrossFocusScope`, we fail to move up the
chain
of scopes, since by spec the owner of the popover scope is the popover itself
[0]. The loop then ends up infinite when this happens.
To fix this, make sure to define outerScope to be the scope of the invoker in
the case of the popover, rather than the scope of the
popover itself, otherwise the owner will keep pointing to the popover itself,
and repeat infinitely.
Extend pre-existing WPT to avoid regressing this, and to ensure nested popover
cases or backwards navigation are handled correctly.
[0]:
https://html.spec.whatwg.org/multipage/interaction.html#associated-focus-navigation-owner
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2.html:
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2-expected.txt:
* Source/WebCore/page/FocusController.cpp:
(WebCore::FocusController::findFocusableElementAcrossFocusScope):
Canonical link: https://commits.webkit.org/289277@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes