Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eaf441730ca22a6be652383ec243651e10b67395
https://github.com/WebKit/WebKit/commit/eaf441730ca22a6be652383ec243651e10b67395
Author: Jintian Wang <[email protected]>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
A LayoutTests/overlay-region/root-overflow-hidden-expected.txt
A LayoutTests/overlay-region/root-overflow-hidden.html
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
Log Message:
-----------
Look to Scroll gets activated even when a modal covers the viewport, making
the close button very hard to tap
https://bugs.webkit.org/show_bug.cgi?id=325775
rdar://188334319
Reviewed by Etienne Segonzac.
While a modal is open, the original page on sets `overflow: hidden` on the root
element. The scroll view itself stays scroll-enabled.
selectOverlayRegionScrollViewIfNeeded() selected the main scroll view for Look
to Scroll based on its content size, so looking near the top of the modal, where
its close button is, scrolled the page behind it.
This change makes it such that only the main scroll view is selected when
hasScrollableOrZoomedMainFrame(), the same check that gates touch
scrolling:
bool scrollingEnabled = scrollingCoordinator->hasScrollableOrZoomedMainFrame()
|| ...
Because scrollability now affects the selection, also re-run it when a node's
ScrollableAreaParams change, so the modal's layers being added or removed will
be tracked.
Test: overlay-region/root-overflow-hidden.html
* LayoutTests/overlay-region/root-overflow-hidden-expected.txt: Added.
* LayoutTests/overlay-region/root-overflow-hidden.html: Added.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::needsOverlayRegionScrollViewSelection
const):
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::selectOverlayRegionScrollViewIfNeeded):
(WebKit::RemoteScrollingCoordinatorProxyIOS::connectStateNodeLayers):
Canonical link: https://commits.webkit.org/322501@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications