Skip to content

Commit

Permalink
Merge 254097@main - [GLIB] WheelEvent (phase=ended) has to be relayed…
Browse files Browse the repository at this point in the history
… to the scrollingTree if user scroll is in progress

https://bugs.webkit.org/show_bug.cgi?id=244635

... allow the scrollingTree to finish with an possible kinetic animation
being calculated if that is the case.

Reviewed by Adrian Perez de Castro.

* Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::internalWheelEvent):

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

(cherry picked from commit a1f7dcf)
  • Loading branch information
psaavedra authored and aperezdc committed Sep 5, 2022
1 parent 459c2a1 commit ee50a95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp
Expand Up @@ -133,8 +133,9 @@ void EventDispatcher::internalWheelEvent(PageIdentifier pageID, const WebWheelEv
bool useMainThreadForScrolling = processingSteps.contains(WheelEventProcessingSteps::MainThreadForScrolling);

#if !PLATFORM(COCOA)
// Deliver continuing scroll gestures directly to the scrolling thread.
if (platformWheelEvent.phase() == PlatformWheelEventPhase::Changed && scrollingTree->isUserScrollInProgressAtEventLocation(platformWheelEvent))
// Deliver continuing scroll gestures directly to the scrolling thread until the end.
if ((platformWheelEvent.phase() == PlatformWheelEventPhase::Changed || platformWheelEvent.phase() == PlatformWheelEventPhase::Ended)
&& scrollingTree->isUserScrollInProgressAtEventLocation(platformWheelEvent))
useMainThreadForScrolling = false;
#endif

Expand Down

0 comments on commit ee50a95

Please sign in to comment.