Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eb401eda2a846a5e0d205de597d779328b737326
      
https://github.com/WebKit/WebKit/commit/eb401eda2a846a5e0d205de597d779328b737326
  Author: Tim Nguyen <[email protected]>
  Date:   2026-08-24 (Mon, 24 Aug 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/mouse-events/autoscroll-on-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/mouse-events/autoscroll-on-cross-origin-iframe.html
    A 
LayoutTests/http/tests/site-isolation/resources/tall-selectable-text-frame.html
    M Source/WebCore/page/EventHandler.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation][macOS] Cannot autoscroll on cross-origin <iframe> content
https://bugs.webkit.org/show_bug.cgi?id=322326
rdar://183755347

Reviewed by Abrar Rahman Protyasha.

EventHandler::handleMousePressEvent only set up mouse-event capture
(m_capturingMouseEventsElement) when a mousedown hit a LocalFrame
subframe, never when it hit a RemoteFrame (an out-of-process iframe
under site isolation). Without capture, every subsequent mousemove
during the drag was freshly hit-tested in the main frame's process,
so once the pointer left the iframe's on-screen bounds, events
stopped being forwarded to the iframe's process entirely. This broke
selection-drag autoscroll and made text selection stop extending as
soon as the drag moved outside a cross-origin iframe.

Fix this by capturing to the RemoteFrame's owner element the same way
already done for LocalFrame subframes, so drag events keep routing to
the correct process for the duration of the gesture.

Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
       
http/tests/site-isolation/mouse-events/autoscroll-on-cross-origin-iframe.html

* 
LayoutTests/http/tests/site-isolation/mouse-events/autoscroll-on-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/mouse-events/autoscroll-on-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/resources/tall-selectable-text-frame.html:
 Added.
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, MouseCaptureOutsideSubframeDuringDrag)):

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



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

Reply via email to