Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 373d0328adcf7b2d3cdde3e8af721be38f8341e7
https://github.com/WebKit/WebKit/commit/373d0328adcf7b2d3cdde3e8af721be38f8341e7
Author: Simon Fraser <[email protected]>
Date: 2023-03-11 (Sat, 11 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.cpp
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
Log Message:
-----------
[UI-side compositing] Lock CALayer tree for scrolling thread hit-testing
https://bugs.webkit.org/show_bug.cgi?id=253011
rdar://105987016
Reviewed by Tim Horton.
Off-main-thread scrolling in the UI process on macOS traverses the layer tree
to find scrolling tree nodes, and consult event regions. If this tree is being
mutated on the main thread at the same time, we can crash.
So lock around the layer tree commit on the main thread in
RemoteLayerTreeDrawingAreaProxy::commitLayerTree(),
and in RemoteLayerTreeEventDispatcher::determineWheelEventProcessing() on the
scrolling thread, using
a lock owned by RemoteScrollingTreeMac.
This is similar to what ThreadedScrollingTree does with web process scrolling.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::willCommitLayerAndScrollingTrees):
(WebKit::RemoteScrollingCoordinatorProxy::didCommitLayerAndScrollingTrees):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
(WebKit::RemoteLayerTreeHitTestLocker::RemoteLayerTreeHitTestLocker):
(WebKit::RemoteLayerTreeHitTestLocker::~RemoteLayerTreeHitTestLocker):
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.cpp:
(WebKit::RemoteLayerTreeEventDispatcher::determineWheelEventProcessing):
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm:
(WebKit::RemoteScrollingCoordinatorProxyMac::willCommitLayerAndScrollingTrees):
(WebKit::RemoteScrollingCoordinatorProxyMac::didCommitLayerAndScrollingTrees):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::lockLayersForHitTesting):
(WebKit::RemoteScrollingTreeMac::unlockLayersForHitTesting):
(WebKit::RemoteScrollingTreeMac::scrollingNodeForPoint):
(WebKit::RemoteScrollingTreeMac::eventListenerRegionTypesForPoint const):
Canonical link: https://commits.webkit.org/261543@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes