Changeset 285942 in webkit
- Timestamp:
- Nov 17, 2021, 11:14:37 AM (5 years ago)
- Location:
- branches/safari-613.1.9.0-branch
- 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
-
branches/safari-613.1.9.0-branch/LayoutTests/ChangeLog
r285787 r285942 1 2021-11-17 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r285797. rdar://problem/85512520 4 5 Fingers down on the trackpad should stop an animated scroll 6 https://bugs.webkit.org/show_bug.cgi?id=233114 7 8 Reviewed by Wenson Hsieh. 9 Source/WebCore: 10 11 Fingers down on the trackpad sends a "MayBegin" event; this needs to stop any in-progress 12 animated momentum scroll. 13 14 This failed because ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent() early-returned 15 on the MayBegin event before it got to ScrollingEffectsController. Fix that, and have 16 ScrollingEffectsController::handleWheelEvent() return true to say it was handled. 17 18 This triggered an assertion in ScrollingTreeGestureState, but for "post-main-thread" 19 handling for which the assertion was wrong. 20 21 Test: fast/scrolling/mac/momentum-animator-maybegin-stops.html 22 23 * page/scrolling/ScrollingTreeGestureState.cpp: 24 (WebCore::ScrollingTreeGestureState::nodeDidHandleEvent): 25 * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: 26 (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent): 27 * platform/mac/ScrollingEffectsController.mm: 28 (WebCore::ScrollingEffectsController::handleWheelEvent): 29 30 LayoutTests: 31 32 * fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt: Added. 33 * fast/scrolling/mac/momentum-animator-maybegin-stops.html: Added. 34 35 36 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285797 268f45cc-cd09-0410-ab3c-d52691b4dbfc 37 38 2021-11-14 Simon Fraser <simon.fraser@apple.com> 39 40 Fingers down on the trackpad should stop an animated scroll 41 https://bugs.webkit.org/show_bug.cgi?id=233114 42 43 Reviewed by Wenson Hsieh. 44 45 * fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt: Added. 46 * fast/scrolling/mac/momentum-animator-maybegin-stops.html: Added. 47 1 48 2021-11-13 Simon Fraser <simon.fraser@apple.com> 2 49 -
branches/safari-613.1.9.0-branch/Source/WebCore/ChangeLog
r285941 r285942 1 2021-11-17 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r285797. rdar://problem/85512520 4 5 Fingers down on the trackpad should stop an animated scroll 6 https://bugs.webkit.org/show_bug.cgi?id=233114 7 8 Reviewed by Wenson Hsieh. 9 Source/WebCore: 10 11 Fingers down on the trackpad sends a "MayBegin" event; this needs to stop any in-progress 12 animated momentum scroll. 13 14 This failed because ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent() early-returned 15 on the MayBegin event before it got to ScrollingEffectsController. Fix that, and have 16 ScrollingEffectsController::handleWheelEvent() return true to say it was handled. 17 18 This triggered an assertion in ScrollingTreeGestureState, but for "post-main-thread" 19 handling for which the assertion was wrong. 20 21 Test: fast/scrolling/mac/momentum-animator-maybegin-stops.html 22 23 * page/scrolling/ScrollingTreeGestureState.cpp: 24 (WebCore::ScrollingTreeGestureState::nodeDidHandleEvent): 25 * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: 26 (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent): 27 * platform/mac/ScrollingEffectsController.mm: 28 (WebCore::ScrollingEffectsController::handleWheelEvent): 29 30 LayoutTests: 31 32 * fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt: Added. 33 * fast/scrolling/mac/momentum-animator-maybegin-stops.html: Added. 34 35 36 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285797 268f45cc-cd09-0410-ab3c-d52691b4dbfc 37 38 2021-11-14 Simon Fraser <simon.fraser@apple.com> 39 40 Fingers down on the trackpad should stop an animated scroll 41 https://bugs.webkit.org/show_bug.cgi?id=233114 42 43 Reviewed by Wenson Hsieh. 44 45 Fingers down on the trackpad sends a "MayBegin" event; this needs to stop any in-progress 46 animated momentum scroll. 47 48 This failed because ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent() early-returned 49 on the MayBegin event before it got to ScrollingEffectsController. Fix that, and have 50 ScrollingEffectsController::handleWheelEvent() return true to say it was handled. 51 52 This triggered an assertion in ScrollingTreeGestureState, but for "post-main-thread" 53 handling for which the assertion was wrong. 54 55 Test: fast/scrolling/mac/momentum-animator-maybegin-stops.html 56 57 * page/scrolling/ScrollingTreeGestureState.cpp: 58 (WebCore::ScrollingTreeGestureState::nodeDidHandleEvent): 59 * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: 60 (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent): 61 * platform/mac/ScrollingEffectsController.mm: 62 (WebCore::ScrollingEffectsController::handleWheelEvent): 63 1 64 2021-11-17 Alan Coon <alancoon@apple.com> 2 65 -
branches/safari-613.1.9.0-branch/Source/WebCore/page/scrolling/ScrollingTreeGestureState.cpp
r270389 r285942 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: -
branches/safari-613.1.9.0-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
r285526 r285942 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 } -
branches/safari-613.1.9.0-branch/Source/WebCore/platform/mac/ScrollingEffectsController.mm
r285787 r285942 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.