... on the contrary, the kinetic animation associated to the touch gesture will be inhibited and discarded since none event satisfying the "event.isEndOfNonMomentumScroll()" will be processed by the "ScrollingEffectsController::processWheelEventForKineticScrolling()". The "ScrollingEffectsController::processWheelEventForKineticScrolling()" is called inside of the "scrollingTree->handleWheelEvent(platformWheelEvent, processingSteps);" on the "ScrollingThread::dispatch()" of the "void EventDispatcher::internalWheelEvent()" in Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp Therefore, for the GLIB ports, we need to rely the PlatformWheelEventPhase::Ended events to the scrollingTree is still a user scroll action is on going like we already do this for the PlatformWheelEventPhase::Changed. This is the current behavior: ``` XXX: Source/WebKit/UIProcess/API/wpe/TouchGestureController.cpp - wpe_input_touch_event_type_up - axis ScrollingTree::determineWheelEventProcessing: wheelEvent PlatformWheelEvent 0x7fc7649573b0 at (640,323) deltaX 0.00 deltaY 0.00 phase "ended" momentum phase "none" velocity width=0 height=0 mapped to content point (640,323), in non-fast region 1 ScrollingTree::determineWheelEventProcessing: processingSteps [main thread scrolling, main thread blocking DOM event dispatch] XXX: ScrollingThread::dispatch(): ... if (useMainThreadForScrolling) { /* This will be True */ scrollingTree->willSendEventToMainThread(platformWheelEvent); protectedThis->dispatchWheelEventViaMainThread(pageID, wheelEvent, processingSteps, wheelEventOrigin); /* The event is processed via MainThread. The ScrollingTree will be not involved */ scrollingTree->waitForEventToBeProcessedByMainThread(platformWheelEvent); return; } ... XXX: void EventHandler::defaultWheelEventHandler() XXX: void EventHandler::defaultWheelEventHandler() XXX: EventHandler::handleWheelEventInAppropriateEnclosingBox() ``` And this second trace is the expected behavior (after apply the patch associated to the bug): ``` XXXX: Source/WebKit/UIProcess/API/wpe/TouchGestureController.cpp - wpe_input_touch_event_type_up - axis ScrollingTree::determineWheelEventProcessing: wheelEvent PlatformWheelEvent 0x7fae221833b0 at (537,358) deltaX 0.00 deltaY 0.00 phase "ended" momentum phase "none" velocity width=0 height=0 mapped to content point (537,358), in non-fast region 1 ScrollingTree::determineWheelEventProcessing: processingSteps [main thread scrolling, main thread blocking DOM event dispatch] XXX ScrollingThread::dispatch(): ... scrollingTree->willProcessWheelEvent(); /* Since useMainThreadForScrolling = false; because the changes applied in the patch*/ ... ScrollingTree 0x7fae6315b700 handleWheelEvent PlatformWheelEvent 0x7fae63016f90 at (537,358) deltaX 0.00 deltaY 0.00 phase "ended" momentum phase "none" velocity width=0 height=0 ScrollingTree::handleWheelEvent found node 85 for point (537,358) XXX: Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp - WheelEventHandlingResult ScrollingTreeScrollingNodeDelegateNicosia::handleWheelEvent() --- bool handled = scrollingNode().canHandleWheelEvent(wheelEvent, eventTargeting) && m_scrollController.handleWheelEvent(wheelEvent) XXX: scrollingNode().canHandleWheelEvent(wheelEvent, eventTargeting): 1 XXX: Source/WebCore/platform/ScrollingEffectsController.cpp - bool ScrollingEffectsController::handleWheelEvent() ... XXX: bool ScrollingEffectsController::processWheelEventForKineticScrolling() - event.isEndOfNonMomentumScroll() - 1 XXX: bool ScrollingEffectsController::processWheelEventForKineticScrolling() - event.isTransitioningToMomentumScroll() - 0 XXX: bool ScrollingEffectsController::processWheelEventForKineticScrolling() - event.isEndOfNonMomentumScroll() || event.isTransitioningToMomentumScroll() ... XXX: bool ScrollingEffectsController::processWheelEventForKineticScrolling() - kineticAnimation.appendToScrollHistory(m_scrollHistory.takeFirst()) - m_scrollHistory = 0x7fac709882d0 XXX: ScrollAnimationKinetic::appendToScrollHistory(const PlatformWheelEvent& event) XXX: ScrollAnimationKinetic::appendToScrollHistory(const PlatformWheelEvent& event) - append - event.m_deltaX(): 0.000000 - event.m_deltaY(): 54.000000 XXX: bool ScrollingEffectsController::processWheelEventForKineticScrolling() - kineticAnimation.appendToScrollHistory(m_scrollHistory.takeFirst()) - m_scrollHistory = 0x7fac709882d0 ... (the kinetic events generated during kinetic animation being appended to the Scroll History) XXX: ScrollAnimationKinetic::appendToScrollHistory(const PlatformWheelEvent& event) XXX: ScrollAnimationKinetic::appendToScrollHistory(const PlatformWheelEvent& event) - append - event.m_deltaX(): 0.000000 - event.m_deltaY(): 0.000000 XXX: bool ScrollingEffectsController::processWheelEventForKineticScrolling() - event.isEndOfNonMomentumScroll XXX: bool ScrollAnimationKinetic::startAnimatedScrollWithInitialVelocity - velocity= width=0 height=-3577.46 ``` Related to: [GLIB] twitch.tv forces synchronous scrolling - https://bugs.webkit.org/show_bug.cgi?id=232376 - <rdar://problem/85247010>
Pull request: https://github.com/WebKit/WebKit/pull/3878
Committed 254097@main (a1f7dcfc9842): <https://commits.webkit.org/254097@main> Reviewed commits have been landed. Closing PR #3878 and removing active labels.
<rdar://problem/99488900>