Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 815e52db702d462eca13cb99c5869d1787460d5b
https://github.com/WebKit/WebKit/commit/815e52db702d462eca13cb99c5869d1787460d5b
Author: Simon Fraser <[email protected]>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M Source/WebCore/page/FrameView.cpp
M Source/WebCore/page/scrolling/ScrollingCoordinator.h
M Source/WebCore/page/scrolling/ThreadedScrollingCoordinator.cpp
M Source/WebCore/page/scrolling/ThreadedScrollingCoordinator.h
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
M Source/WebKit/Shared/WebWheelEventCoalescer.cpp
M Source/WebKit/Shared/WebWheelEventCoalescer.h
M
Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
M Source/WebKit/UIProcess/DrawingAreaProxy.h
M
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Log Message:
-----------
[UI-side compositing] Wheel events sent to the web process need to sometimes
trigger scrolling
https://bugs.webkit.org/show_bug.cgi?id=249613
rdar://103534392
Reviewed by Brent Fulgham.
`ScrollingTree::handleWheelEvent()` returns a `WheelEventHandlingResult` which
contains a
set of `WheelEventProcessingSteps` which say what processing remains for the
event (e.g.
main thread scrolling, DOM event dispatch). When the UI process ScrollingTree
handles
an event, we need to send the `WheelEventProcessingSteps` to the web process so
that the
remaining steps are handled there.
So have `RemoteScrollingCoordinatorProxy::handleWheelEvent()` return a
WheelEventHandlingResult,
and associate the WheelEventProcessingSteps with a WebWheelEvent which will get
sent by WebPageProxy
to the web process.
Unfortunately WebWheelEventCoalescer gets a little messy, since it deals with
both WebWheelEvent
(used for coalesced events with no corresponding native event) and its subclass
NativeWebWheelEvent,
but essentially we can only coalesce events that have the same
WheelEventProcessingSteps.
WebPageProxy::sendWheelEvent() also needs to know if it should send events to
WebKit::EventDispatcher
(the non-UI-side compositing code path) or WebPage, so add a way for it to ask
the DrawingAreaProxy
which route to take.
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::handleWheelEventForScrolling):
* Source/WebCore/page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::handleWheelEventForScrolling):
* Source/WebCore/page/scrolling/ThreadedScrollingCoordinator.cpp:
(WebCore::ThreadedScrollingCoordinator::handleWheelEventForScrolling):
* Source/WebCore/page/scrolling/ThreadedScrollingCoordinator.h:
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::handleWheelEventForScrolling):
* Source/WebKit/Shared/WebWheelEventCoalescer.cpp:
(WebKit::operator<<):
(WebKit::WebWheelEventCoalescer::canCoalesce):
(WebKit::WebWheelEventCoalescer::coalesce):
(WebKit::WebWheelEventCoalescer::nextEventToDispatch):
(WebKit::WebWheelEventCoalescer::shouldDispatchEvent):
(WebKit::WebWheelEventCoalescer::takeOldestEventBeingProcessed):
* Source/WebKit/Shared/WebWheelEventCoalescer.h:
(WebKit::WebWheelEventAndSteps::WebWheelEventAndSteps):
*
Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
* Source/WebKit/UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::shouldSendWheelEventsToEventDispatcher const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleWheelEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::handleWheelEvent): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
Canonical link: https://commits.webkit.org/258145@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes