Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 54432c92fd08412b76ee8e8eec8ee9408b90ba3c
      
https://github.com/WebKit/WebKit/commit/54432c92fd08412b76ee8e8eec8ee9408b90ba3c
  Author: Ryosuke Niwa <[email protected]>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-back-up-in-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-back-up-in-cross-origin-iframe.html
    A 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-in-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-in-cross-origin-iframe.html
    M 
LayoutTests/http/tests/site-isolation/resources/scrollable-selectable-text-frame.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm

  Log Message:
  -----------
  [Site Isolation][iOS] Cannot autoscroll on cross-origin iframe content
https://bugs.webkit.org/show_bug.cgi?id=325229
rdar://186047038

Reviewed by Megan Gardner and Wenson Hsieh.

On iOS, selection autoscroll is driven by UIKit's UITextAutoscrolling, which 
calls into
WebPageProxy::startAutoscrollAtPosition and WebPageProxy::cancelAutoscroll. 
These always sent
their messages to the main frame's process. Under site isolation, when the 
selection is inside
a cross-origin iframe, focusedOrMainFrame() in the main frame's process 
resolves to the main
frame, which has no range selection, so no autoscroll was ever started.

Fix this by sending StartAutoscrollAtPosition and CancelAutoscroll to the 
focused frame's
process, as the other iOS selection messages such as UpdateSelectionWithTouches 
already do,
and by converting the incoming main frame root view position into the focused 
frame's root
view coordinates via mainFrameCoordinatesToRootView before starting the 
autoscroll.

Tests: 
http/tests/site-isolation/ios/autoscroll-selection-back-up-in-cross-origin-iframe.html
       
http/tests/site-isolation/ios/autoscroll-selection-in-cross-origin-iframe.html

* 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-back-up-in-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-back-up-in-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-in-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/autoscroll-selection-in-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/resources/scrollable-selectable-text-frame.html:
 Report scroll
position changes to the parent frame.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::startAutoscrollAtPosition):
(WebKit::WebPageProxy::cancelAutoscroll):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::startAutoscrollAtPosition):

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



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

Reply via email to