Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8c0e1251aa624c0326327b52ea959da26dffc474
https://github.com/WebKit/WebKit/commit/8c0e1251aa624c0326327b52ea959da26dffc474
Author: Zak Ridouh <[email protected]>
Date: 2026-10-03 (Sat, 03 Oct 2026)
Changed paths:
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation-1.mm
Log Message:
-----------
[Site Isolation][iOS] Text selection gestures do not work in cross-site
iframes
<https://bugs.webkit.org/show_bug.cgi?id=325601>
<rdar://problem/188669133>
Reviewed by Ryosuke Niwa, Wenson Hsieh, and Megan Gardner.
Placing the caret at a word boundary or selecting with two touches in a
cross-site iframe only worked when that
iframe was focused; otherwise the focused or main frame's process selected
around the iframe element instead of
inside it. Hit-test the point and forward these into the iframe under it, as
selectPositionAtPoint already does.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation-1.mm
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
(-[WKContentView
selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectWithTwoTouches): The first touch picks the target
frame; move the second
touch by the same offset.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithTwoTouches):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::mainFrameRootViewToRootView): Deleted. Points now arrive in the target
local root's coordinates.
This also applied a focused same-origin iframe's offset twice.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation-1.mm:
(TestWebKitAPI::TEST(SiteIsolation,
SelectPositionAtBoundaryInUnfocusedCrossOriginIframe)):
(TestWebKitAPI::TEST(SiteIsolation,
SelectWithTwoTouchesInUnfocusedCrossOriginIframe)):
Canonical link: https://commits.webkit.org/322607@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications