Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 98c5d805e403809b438147744876e5de0112e4d1
https://github.com/WebKit/WebKit/commit/98c5d805e403809b438147744876e5de0112e4d1
Author: Ryosuke Niwa <[email protected]>
Date: 2026-09-27 (Sun, 27 Sep 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/ios/long-press-moves-caret-in-editable-cross-origin-iframe-expected.txt
A
LayoutTests/http/tests/site-isolation/ios/long-press-moves-caret-in-editable-cross-origin-iframe.html
A LayoutTests/http/tests/site-isolation/resources/editable-text-frame.html
M LayoutTests/platform/ios/TestExpectations
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
M Source/WebKit/UIProcess/mac/WKTextSelectionController.swift
M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Log Message:
-----------
[Site Isolation] [iOS] Long press does not bring up a callout bar
https://bugs.webkit.org/show_bug.cgi?id=325399
Reviewed by Wenson Hsieh.
Long pressing in an editable region places the caret through -[WKContentView
selectPositionAtPoint:],
which always sent SelectPositionAtPoint to the main frame's process. With site
isolation enabled, a
cross-site iframe is a RemoteFrame in that process, so the hit test landed on
the iframe element in the
parent document: focus moved to the main frame and the caret was placed next to
the iframe rather than
inside the editable element, so no callout bar was shown.
Route SelectPositionAtPoint into the process containing the target frame via
RemoteUserInputEventData,
as selectWithGesture and selectTextWithGranularityAtPoint already do.
Test:
http/tests/site-isolation/ios/long-press-moves-caret-in-editable-cross-origin-iframe.html
*
LayoutTests/http/tests/site-isolation/ios/long-press-moves-caret-in-editable-cross-origin-iframe-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/ios/long-press-moves-caret-in-editable-cross-origin-iframe.html:
Added.
* LayoutTests/http/tests/site-isolation/resources/editable-text-frame.html:
Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::selectPositionAtPoint): Send to the process containing
the frame and re-dispatch
into the remote frame when the web process reports that the point is over one.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView
_selectPositionAtPoint:stayingWithinFocusedElement:completionHandler:]):
* Source/WebKit/UIProcess/mac/WKTextSelectionController.swift:
(WKTextSelectionController.moveInsertionCursor(to:placeAtWordBoundary:)):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::selectPositionAtPoint): Hit test from the local root frame
and reply with
RemoteUserInputEventData if the point is over a remote frame. Update focus
using the frame identifier.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
Canonical link: https://commits.webkit.org/322004@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications