⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267469 in webkit


Ignore:
Timestamp:
Sep 23, 2020, 5:17:59 AM (6 years ago)
Author:
cathiechen
Message:

Wheel event phases of FrameView are not handled correctly
https://bugs.webkit.org/show_bug.cgi?id=216870

Reviewed by Simon Fraser.

In AsyncScrollingCoordinator::handleWheelEventPhase, the scrollAnimator of a FrameView should be from FrameView itself, not ScrollableArea.
It doesn't call nodeDidHandleEvent to handle wheel event phases when !asyncFrameOrOverflowScrollingEnabled. Should call it after handleWheelEvent.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::handleWheelEventPhase): When nodeID is FrameView, we should use the scrollAnimator of FrameView instead.

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEvent): If wheelEvent is handled, we should call nodeDidHandleEvent to handle the phases.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r267468 r267469  
     12020-09-23  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Wheel event phases of FrameView are not handled correctly
     4        https://bugs.webkit.org/show_bug.cgi?id=216870
     5
     6        Reviewed by Simon Fraser.
     7
     8        In AsyncScrollingCoordinator::handleWheelEventPhase, the scrollAnimator of a FrameView should be from FrameView itself, not ScrollableArea.
     9        It doesn't call nodeDidHandleEvent to handle wheel event phases when !asyncFrameOrOverflowScrollingEnabled. Should call it after handleWheelEvent.
     10
     11        * page/scrolling/AsyncScrollingCoordinator.cpp:
     12        (WebCore::AsyncScrollingCoordinator::handleWheelEventPhase): When nodeID is FrameView, we should use the scrollAnimator of FrameView instead.
     13        * page/scrolling/ScrollingTree.cpp:
     14        (WebCore::ScrollingTree::handleWheelEvent): If wheelEvent is handled, we should call nodeDidHandleEvent to handle the phases.
     15
    1162020-09-23  Antti Koivisto  <antti@apple.com>
    217
  • trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp

    r267002 r267469  
    8383        return;
    8484
     85    if (nodeID == frameView->scrollingNodeID()) {
     86        frameView->scrollAnimator().handleWheelEventPhase(phase);
     87        return;
     88    }
     89
    8590    if (auto* scrollableArea = frameView->scrollableAreaForScrollingNodeID(nodeID))
    8691        scrollableArea->scrollAnimator().handleWheelEventPhase(phase);
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r267002 r267469  
    108108            return WheelEventHandlingResult::unhandled();
    109109
    110         if (!asyncFrameOrOverflowScrollingEnabled())
    111             return m_rootNode->handleWheelEvent(wheelEvent);
     110        if (!asyncFrameOrOverflowScrollingEnabled()) {
     111            auto result = m_rootNode->handleWheelEvent(wheelEvent);
     112            if (result.wasHandled)
     113                m_gestureState.nodeDidHandleEvent(m_rootNode->scrollingNodeID(), wheelEvent);
     114            return result;
     115        }
    112116
    113117        if (m_gestureState.handleGestureCancel(wheelEvent)) {
Note: See TracChangeset for help on using the changeset viewer.