[webkit-changes] [WebKit/WebKit] acc0a6: [UI-side compositing] Prepare for the event handli...

Simon Fraser noreply at github.com
Sat Feb 25 16:21:16 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: acc0a64d65110f80170a0a3a89e3432983da85d5
      https://github.com/WebKit/WebKit/commit/acc0a64d65110f80170a0a3a89e3432983da85d5
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-02-25 (Sat, 25 Feb 2023)

  Changed paths:
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h

  Log Message:
  -----------
  [UI-side compositing] Prepare for the event handling asynchrony introduced by a scrolling thread in the UI process
https://bugs.webkit.org/show_bug.cgi?id=252947
rdar://105927794

Reviewed by Alan Baradlay.

Once we dispatch wheel events to a scrolling thread in the UI process, we can no longer
have RemoteScrollingCoordinatorProxy::handleWheelEvent() return a WheelEventHandlingResult
synchronously. So we have to split the wheel event handling code up a little more, introducing
continueWheelEventHandling() which is called once the scrolling thread is done with the event.

Fix RemoteScrollingCoordinatorProxy::handleWheelEvent() to call continueWheelEventHandling();
this code will go away once we start sending events to RemoteLayerTreeEventDispatcher.

Rejigger WebPageProxy::handleWheelEvent() to move a bit of code into continueWheelEventHandling(),
and call that directly for the non-UI-side compositing code path.

continueWheelEventHandling() needs to receive a native wheel event in order to send it to
wheelEventCoalescer, so RemoteLayerTreeEventDispatcher needs a small queue of events to
keep around the event to send back.

* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
(WebKit::RemoteScrollingCoordinatorProxy::continueWheelEventHandling):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.cpp:
(WebKit::RemoteLayerTreeEventDispatcher::willHandleWheelEvent):
(WebKit::RemoteLayerTreeEventDispatcher::handleWheelEvent):
(WebKit::RemoteLayerTreeEventDispatcher::wheelEventWasHandledByScrollingThread):
(WebKit::RemoteLayerTreeEventDispatcher::displayLink const):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::continueWheelEventHandling):
* Source/WebKit/UIProcess/WebPageProxy.h:

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




More information about the webkit-changes mailing list