[webkit-changes] [WebKit/WebKit] 135ae5: Get subscrollers working with macOS UI-side compos...
Simon Fraser
noreply at github.com
Thu Dec 1 16:34:53 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 135ae5c3f9a058abed14a56fa91afdbe8c69951f
https://github.com/WebKit/WebKit/commit/135ae5c3f9a058abed14a56fa91afdbe8c69951f
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2022-12-01 (Thu, 01 Dec 2022)
Changed paths:
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h
M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm
M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h
M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm
M Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp
M Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp
Log Message:
-----------
Get subscrollers working with macOS UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=248540
rdar://102820156
Reviewed by Tim Horton.
Get basic subscroller scrolling (overflow and iframes) working with UI-side compositing on macOS.
This required the following changes:
Implement `RemoteScrollingTreeMac::scrollingNodeForPoint()` to find the correct scrolling
tree node by hit-testing through CALayers. We need to adjust the point to take the current
scroll position into account. Taking scroll origin into account for RTL content isn't necessary
here.
Fix `ScrollingTreeOverflowScrollingNodeRemoteMac` and `ScrollingTreeFrameScrollingNodeRemoteMac`
`handleWheelEvent` implementations to return the result of handling the event in the base class,
rather than whatever `m_scrollerPair` does (it's unclear if we should have a `m_scrollerPair` here
at all).
Implement wheel event delta filtering, as EventDispatcher does, via a `WheelEventDeltaFilter`
on `RemoteScrollingCoordinatorProxyMac`. This is necessary to avoid small X deltas preventing
scrolls in Y, which is very common with trackpad interaction.
Call `m_scrollingTree->willProcessWheelEvent()` in `RemoteScrollingCoordinatorProxy::handleWheelEvent()`
so that scroll latching works correctly.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::filteredWheelEvent):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm:
(WebKit::RemoteScrollingCoordinatorProxyMac::RemoteScrollingCoordinatorProxyMac):
(WebKit::RemoteScrollingCoordinatorProxyMac::filteredWheelEvent):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::scrollingNodeIDForLayer):
(WebKit::isScrolledBy):
(WebKit::layerEventRegionContainsPoint):
(WebKit::RemoteScrollingTreeMac::scrollingNodeForPoint):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleWheelEvent):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:
(WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::handleWheelEvent):
Canonical link: https://commits.webkit.org/257259@main
More information about the webkit-changes
mailing list