Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 94d5b98165664247be64bbed481802defda28dd3
      
https://github.com/WebKit/WebKit/commit/94d5b98165664247be64bbed481802defda28dd3
  Author: Megan Gardner <[email protected]>
  Date:   2026-04-23 (Thu, 23 Apr 2026)

  Changed paths:
    M Source/WebCore/page/FocusController.cpp
    M Source/WebCore/page/FocusController.h
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FocusWebView.mm

  Log Message:
  -----------
  iFrames (remote or otherwise) without any focusable elements cause focus 
advancment to fail.
https://bugs.webkit.org/show_bug.cgi?id=313065
rdar://175375806

Reviewed by Ryosuke Niwa.

It was always known that we did not continue searching in sibling
subframes if we ended up in a subframe without any focusable elements.

I created a test to highlight this issue, and updated the callback to
continue searching in sibling frames. It also seems that this didn't even
work without site-isolation on, so I also updated the code to cover that
case as well.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FocusWebView.mm

* Source/WebCore/page/FocusController.cpp:
(WebCore::FocusController::findFocusableElementContinuingFromFrame):
(WebCore::FocusController::findFocusableElementContinuingFromOwnerElement):
(WebCore::FocusController::findFocusableElementDescendingIntoSubframes):
(WebCore::FocusController::findFocusableElementAcrossFocusScope):
* Source/WebCore/page/FocusController.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FocusWebView.mm:
(TestWebKitAPI::MultipleFramesSomeUnfocusable)):

Canonical link: https://commits.webkit.org/311922@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to