Changeset 263838 in webkit
- Timestamp:
- Jul 2, 2020, 2:19:12 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp (modified) (1 diff)
-
page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp (modified) (1 diff)
-
platform/generic/ScrollAnimatorGeneric.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r263836 r263838 1 2020-07-02 Alexander Mikhaylenko <alexm@gnome.org> 2 3 [GTK] Kinetic scrolling is still triggered if you wait before lifting fingers 4 https://bugs.webkit.org/show_bug.cgi?id=213789 5 6 Reviewed by Carlos Garcia Campos. 7 8 The intended behavior for kinetic scrolling is that it's possible to not trigger it by 9 stopping moving fingers before lifting them, as opposed to doing a fling/swipe. However, 10 right now it's broken and trying to do this triggers kinetic scrolling as well. 11 12 Currently, the last scroll event with (0, 0) deltas isn't added to the scroll history for 13 kinetic scrolling. However, this is wrong, because the last event, or rather the timespan 14 between it and the previous scroll event, actually determines the kinetic scrolling velocity: 15 if this event follows the previous one quickly, the velocity is large, but if there was a long 16 pause, the velocity would be close to 0. 17 18 See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1902 and 19 https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1903 for the equivalent GTK fixes. 20 21 * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: 22 (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent): 23 * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: 24 (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent): 25 * platform/generic/ScrollAnimatorGeneric.cpp: 26 (WebCore::ScrollAnimatorGeneric::handleWheelEvent): 27 1 28 2020-07-02 Philippe Normand <pnormand@igalia.com> 2 29 -
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp
r262294 r263838 128 128 scrollBy({ -wheelEvent.deltaX(), -wheelEvent.deltaY() }); 129 129 130 #if ENABLE(KINETIC_SCROLLING) 131 m_kineticAnimation->appendToScrollHistory(wheelEvent); 132 #endif 133 } 130 } 131 132 #if ENABLE(KINETIC_SCROLLING) 133 m_kineticAnimation->appendToScrollHistory(wheelEvent); 134 #endif 134 135 135 136 #if ENABLE(KINETIC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp
r262294 r263838 112 112 auto updateScope = compositionLayer.createUpdateScope(); 113 113 scrollBy({ -wheelEvent.deltaX(), -wheelEvent.deltaY() }); 114 } 114 115 115 116 #if ENABLE(KINETIC_SCROLLING) 116 m_kineticAnimation->appendToScrollHistory(wheelEvent);117 m_kineticAnimation->appendToScrollHistory(wheelEvent); 117 118 #endif 118 }119 119 120 120 #if ENABLE(KINETIC_SCROLLING) -
trunk/Source/WebCore/platform/generic/ScrollAnimatorGeneric.cpp
r259112 r263838 113 113 114 114 #if ENABLE(KINETIC_SCROLLING) 115 m_kineticAnimation->appendToScrollHistory(event); 116 115 117 if (event.isEndOfNonMomentumScroll()) { 116 // We don't need to add the event to the history as its delta will be (0, 0).117 118 m_kineticAnimation->start(m_currentPosition, m_kineticAnimation->computeVelocity(), m_scrollableArea.horizontalScrollbar(), m_scrollableArea.verticalScrollbar()); 118 119 return true; … … 123 124 return true; 124 125 } 125 126 m_kineticAnimation->appendToScrollHistory(event);127 126 #endif 128 127
Note:
See TracChangeset
for help on using the changeset viewer.