Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9db84d0aa73958ea6a2639a69849bd734c241352
https://github.com/WebKit/WebKit/commit/9db84d0aa73958ea6a2639a69849bd734c241352
Author: Etienne Segonzac <[email protected]>
Date: 2025-05-09 (Fri, 09 May 2025)
Changed paths:
M LayoutTests/overlay-region/split-scrollers-expected.txt
A LayoutTests/overlay-region/sticky-expected.txt
A LayoutTests/overlay-region/sticky.html
M Source/WebCore/page/scrolling/ScrollingTreeStickyNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeStickyNode.h
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.h
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.mm
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
Log Message:
-----------
Sticky elements that are not currently sticking should not get OverlayRegions
https://bugs.webkit.org/show_bug.cgi?id=292685
<rdar://141296473>
Reviewed by Mike Wyrzykowski.
First, fix an issue where an overlay region would never be removed
unless its corresponding layer was destroyed.
We now always start from the set of "fixed layer IDs" to build the
OverlayRegions. Ignoring previous layers with overlay regions.
Then filter out sticky layers that are note currently sticking from this
"fixed layer IDs" set.
* Source/WebCore/page/scrolling/ScrollingTreeStickyNode.h:
* Source/WebCore/page/scrolling/ScrollingTreeStickyNode.cpp:
(WebCore::ScrollingTreeStickyNode::findConstrainingRect const):
(WebCore::ScrollingTreeStickyNode::computeAnchorLayerPosition const):
Extract the code finding the constraining Rect to a new method for
reuse.
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.h:
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.mm:
(WebCore::ScrollingTreeStickyNodeCocoa::isCurrentlySticking const):
Introduce a new method signaling if the ScrollingTreeNode is currently
sticking.
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(addOverlayEventRegions):
(-[WKWebView _updateOverlayRegions:destroyedLayers:]):
Rework the overlay region code to better support updates.
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::removeDestroyedLayerIDs):
(WebKit::RemoteScrollingCoordinatorProxyIOS::connectStateNodeLayers):
Remove the now unused `overlayRegionLayerIDs` set.
Turn the fixed layer IDs set into a map so we can keep track of the
ScrollingNode too.
(WebKit::RemoteScrollingCoordinatorProxyIOS::fixedScrollingNodeLayerIDs const):
Filter the exposed set of fixed scrolling node layer IDs to only contain
fixed layers and sticky layers _currently sticking_.
* LayoutTests/overlay-region/split-scrollers-expected.txt:
One sticky element in this test doesn't get an overlay region anymore.
* LayoutTests/overlay-region/sticky-expected.txt: Added.
* LayoutTests/overlay-region/sticky.html: Added.
Add a new test with:
- one element that is not sticking anymore
- one elements that is sticking
- one element that is not sticking yet
Canonical link: https://commits.webkit.org/294701@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes