Changeset 285797 in webkit
- Timestamp:
- Nov 14, 2021, 8:06:38 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt (added)
-
LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/scrolling/ScrollingTreeGestureState.cpp (modified) (1 diff)
-
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm (modified) (1 diff)
-
Source/WebCore/platform/mac/ScrollingEffectsController.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r285787 r285797 1 2021-11-14 Simon Fraser <simon.fraser@apple.com> 2 3 Fingers down on the trackpad should stop an animated scroll 4 https://bugs.webkit.org/show_bug.cgi?id=233114 5 6 Reviewed by Wenson Hsieh. 7 8 * fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt: Added. 9 * fast/scrolling/mac/momentum-animator-maybegin-stops.html: Added. 10 1 11 2021-11-13 Simon Fraser <simon.fraser@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r285796 r285797 1 2021-11-14 Simon Fraser <simon.fraser@apple.com> 2 3 Fingers down on the trackpad should stop an animated scroll 4 https://bugs.webkit.org/show_bug.cgi?id=233114 5 6 Reviewed by Wenson Hsieh. 7 8 Fingers down on the trackpad sends a "MayBegin" event; this needs to stop any in-progress 9 animated momentum scroll. 10 11 This failed because ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent() early-returned 12 on the MayBegin event before it got to ScrollingEffectsController. Fix that, and have 13 ScrollingEffectsController::handleWheelEvent() return true to say it was handled. 14 15 This triggered an assertion in ScrollingTreeGestureState, but for "post-main-thread" 16 handling for which the assertion was wrong. 17 18 Test: fast/scrolling/mac/momentum-animator-maybegin-stops.html 19 20 * page/scrolling/ScrollingTreeGestureState.cpp: 21 (WebCore::ScrollingTreeGestureState::nodeDidHandleEvent): 22 * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: 23 (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent): 24 * platform/mac/ScrollingEffectsController.mm: 25 (WebCore::ScrollingEffectsController::handleWheelEvent): 26 1 27 2021-11-14 Said Abou-Hallawa <said@apple.com> 2 28 -
trunk/Source/WebCore/page/scrolling/ScrollingTreeGestureState.cpp
r270389 r285797 67 67 break; 68 68 case PlatformWheelEventPhase::Cancelled: 69 // handleGestureCancel() should have beencalled first.70 ASSERT_NOT_REACHED();69 // We can get here for via handleWheelEventAfterMainThread(), in which case handleGestureCancel() was not called first. 70 handleGestureCancel(event); 71 71 break; 72 72 case PlatformWheelEventPhase::Began: -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
r285526 r285797 107 107 scrollingNode().setUserScrollInProgress(isInUserScroll); 108 108 109 // PlatformWheelEventPhase::MayBegin fires when two fingers touch the trackpad, and is used to flash overlay scrollbars.110 // We know we're scrollable at this point, so handle the event.111 if (wheelEvent.phase() == PlatformWheelEventPhase::MayBegin)112 return true;113 114 109 return m_scrollController.handleWheelEvent(wheelEvent); 115 110 } -
trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm
r285787 r285797 141 141 stopAnimatedScroll(); 142 142 } 143 return false;143 return true; 144 144 } 145 145
Note:
See TracChangeset
for help on using the changeset viewer.