Skip to content

OverlayRegions should handle OverflowScrollProxyNodes correctly#46676

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
etiennesegonzac:rdar-141299377
Jun 13, 2025
Merged

OverlayRegions should handle OverflowScrollProxyNodes correctly#46676
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
etiennesegonzac:rdar-141299377

Conversation

@etiennesegonzac
Copy link
Contributor

@etiennesegonzac etiennesegonzac commented Jun 12, 2025

211c2ae

OverlayRegions should handle OverflowScrollProxyNodes correctly
https://bugs.webkit.org/show_bug.cgi?id=294408
<rdar://141299377>

Reviewed by Simon Fraser.

When configuring a ScrollView for OverlayRegions, associate the layers
for any overflow related node (scrolling proxy).

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(configureScrollViewWithOverlayRegionsIDs):
Call the new `_associateRelatedLayersForOverlayRegions`.
(-[WKWebView _selectOverlayRegionScrollView:]):
(-[WKWebView _resetOverlayRegions]):
(-[WKWebView _updateOverlayRegions:destroyedLayers:]):
Update method signatures for the new `OverlayRegionCandidatesMap`.

* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::overlayRegionCandidates const):
(WebKit:: const): Deleted.
The `overlayRegionCandidates` method now returns a Map with the associated
layers for overflow related nodes.

* Source/WebKit/UIProcess/ios/WKBaseScrollView.h:
* Source/WebKit/UIProcess/ios/WKBaseScrollView.mm:
(-[WKBaseScrollView _associateRelatedLayersForOverlayRegions:with:]):
Add a stub for the new method in Additions.

* Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:
(dumpUIView):
Add an associated layers count to the dump format.
* LayoutTests/overlay-region/full-page-overflow-expected.txt:
* LayoutTests/overlay-region/full-page-overflow-scrolling-expected.txt:
* LayoutTests/overlay-region/snapping-expected.txt:
Update tests expectations with associated layers.
* LayoutTests/overlay-region/overflow-with-proxy-expected.txt: Added.
* LayoutTests/overlay-region/overflow-with-proxy.html: Added.
Add a new test.

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

86af715

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@etiennesegonzac etiennesegonzac requested a review from cdumez as a code owner June 12, 2025 21:58
@etiennesegonzac etiennesegonzac self-assigned this Jun 12, 2025
@etiennesegonzac etiennesegonzac added the Scrolling Bugs related to main thread and off-main thread scrolling label Jun 12, 2025
Copy link
Contributor

@smfr smfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we write some tests?

@etiennesegonzac etiennesegonzac requested a review from smfr June 13, 2025 13:15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto&

@etiennesegonzac etiennesegonzac added the merge-queue Applied to send a pull request to merge-queue label Jun 13, 2025
https://bugs.webkit.org/show_bug.cgi?id=294408
<rdar://141299377>

Reviewed by Simon Fraser.

When configuring a ScrollView for OverlayRegions, associate the layers
for any overflow related node (scrolling proxy).

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(configureScrollViewWithOverlayRegionsIDs):
Call the new `_associateRelatedLayersForOverlayRegions`.
(-[WKWebView _selectOverlayRegionScrollView:]):
(-[WKWebView _resetOverlayRegions]):
(-[WKWebView _updateOverlayRegions:destroyedLayers:]):
Update method signatures for the new `OverlayRegionCandidatesMap`.

* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::overlayRegionCandidates const):
(WebKit:: const): Deleted.
The `overlayRegionCandidates` method now returns a Map with the associated
layers for overflow related nodes.

* Source/WebKit/UIProcess/ios/WKBaseScrollView.h:
* Source/WebKit/UIProcess/ios/WKBaseScrollView.mm:
(-[WKBaseScrollView _associateRelatedLayersForOverlayRegions:with:]):
Add a stub for the new method in Additions.

* Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:
(dumpUIView):
Add an associated layers count to the dump format.
* LayoutTests/overlay-region/full-page-overflow-expected.txt:
* LayoutTests/overlay-region/full-page-overflow-scrolling-expected.txt:
* LayoutTests/overlay-region/snapping-expected.txt:
Update tests expectations with associated layers.
* LayoutTests/overlay-region/overflow-with-proxy-expected.txt: Added.
* LayoutTests/overlay-region/overflow-with-proxy.html: Added.
Add a new test.

Canonical link: https://commits.webkit.org/296201@main
@webkit-commit-queue
Copy link
Collaborator

Committed 296201@main (211c2ae): https://commits.webkit.org/296201@main

Reviewed commits have been landed. Closing PR #46676 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 211c2ae into WebKit:main Jun 13, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scrolling Bugs related to main thread and off-main thread scrolling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants