Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4bbc96835357a1bdfd09b43ecc6b0fd941e438be
https://github.com/WebKit/WebKit/commit/4bbc96835357a1bdfd09b43ecc6b0fd941e438be
Author: Ryosuke Niwa <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/scrolling/resources/grow-content-iframe.html
A
LayoutTests/http/tests/site-isolation/scrolling/wheel-scroll-full-size-iframe-after-content-grows-expected.txt
A
LayoutTests/http/tests/site-isolation/scrolling/wheel-scroll-full-size-iframe-after-content-grows.html
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/page/EventHandler.cpp
Log Message:
-----------
[Site Isolation] Cannot scroll a cross-site iframe with wheel event listeners
using a trackpad
https://bugs.webkit.org/show_bug.cgi?id=325599
rdar://160993350
Reviewed by Alex Christensen, Anne van Kesteren, and Zak Ridouh.
On office.com, two-finger scrolling did not work in a Word document, which is in
a cross-site iframe covering the whole page. Dragging the scrollbar still
worked.
When a wheel event needs to be handled on the main thread, as happens when the
target has non-passive wheel event listeners, the UI process forwards it to the
main frame's process, which forwards it to the process of the cross-site iframe.
In that process, the iframe's frame is a root frame but not the main frame.
EventHandler::handleWheelEventInternal() only fed wheel events to
ScrollLatchingController and WheelEventDeltaFilter for the main frame, so
neither
was ever updated in that process. ScrollLatchingController's cumulative delta
then
stayed zero, so shouldLatchToScrollableArea() never picked a scroller at gesture
start or on later events, and the latching state was never cleared. As a result,
latchingAllowsScrollingInFrame() returned false, the event was not handled, and
the
UI process didn't scroll either.
Fix this by feeding these objects in any root frame. Without Site Isolation, the
main frame is the only root frame, so there is no behavior change.
Test:
http/tests/site-isolation/scrolling/wheel-scroll-full-size-iframe-after-content-grows.html
*
LayoutTests/http/tests/site-isolation/scrolling/resources/grow-content-iframe.html:
Added.
*
LayoutTests/http/tests/site-isolation/scrolling/wheel-scroll-full-size-iframe-after-content-grows-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/scrolling/wheel-scroll-full-size-iframe-after-content-grows.html:
Added.
* LayoutTests/platform/ios/TestExpectations: Skip the new test since it uses
eventSender wheel events.
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEventInternal):
Canonical link: https://commits.webkit.org/322276@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications