Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 430c80bf335fc83c1fd96985091d75d9aa098a81
      
https://github.com/WebKit/WebKit/commit/430c80bf335fc83c1fd96985091d75d9aa098a81
  Author: Jessica Lee <[email protected]>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    M Source/WebCore/page/FrameView.cpp
    M Source/WebCore/page/FrameView.h
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation-1.mm

  Log Message:
  -----------
  [Site Isolation] _focusTextInputContext:placeCaretAt does not work on 
elements in cross-site iframes
https://bugs.webkit.org/show_bug.cgi?id=326026
rdar://188962256

Reviewed by Ryosuke Niwa.

WebPageProxy::focusTextInputContextAndPlaceCaret sends 
WebPage::FocusTextInputContextAndPlaceCaret to
the main frame process only so elements in a cross-site iframe / process 
weren't resolved and thus focusing
failed. The fix is to send the message to the appropriate iframe process which 
is identified by the context's
document identifier. To accommodate this, we also converted the provided caret 
point from main frame
coordinates to coordinates relative to the iframe.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation-1.mm

* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::rootViewToContentsAcrossIsolatedFrames const):
* Source/WebCore/page/FrameView.h:
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::focusTextInputContextAndPlaceCaret):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation-1.mm:
(TestWebKitAPI::synchronouslyRequestTextInputContextsInRect):
(TestWebKitAPI::synchronouslyFocusTextInputContext):
(TestWebKitAPI::TEST(SiteIsolation, 
FocusTextInputContextInOffsetCrossOriginIframeMovesCaret)):
(TestWebKitAPI::TEST(SiteIsolation, 
FocusTextInputContextInCrossOriginIframeMovesCaret)):

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



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

Reply via email to