Changeset 220638 in webkit
- Timestamp:
- Aug 13, 2017 11:23:27 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r220632 r220638 1 2017-08-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] stop kinetic scrolling when a zero movement is reached 4 https://bugs.webkit.org/show_bug.cgi?id=175468 5 6 Reviewed by Michael Catanzaro. 7 8 This is GTK+ change by Christian Hergert. 9 https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=4f63d839550f7a9038b391e7d3e1e6fc8bdfafa6 10 11 When the kinetic scrolling reduces its speed, there can be multiple frames where the movement is zero pixels, 12 followed by a 1 pixel movement later on. This causes a "jitter" right at the end of the scroll which makes it 13 feel less quality than other platforms. Instead, we should just clamp it as soon as we get a zero movement. 14 15 * platform/ScrollAnimationKinetic.cpp: 16 (WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll): 17 1 18 2017-08-13 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/WebCore/platform/ScrollAnimationKinetic.cpp
r217971 r220638 82 82 bool ScrollAnimationKinetic::PerAxisData::animateScroll(Seconds timeDelta) 83 83 { 84 auto lastPosition = m_position; 85 auto lastTime = m_elapsedTime; 84 86 m_elapsedTime += timeDelta; 85 87 … … 94 96 m_position = m_upper; 95 97 m_velocity = 0; 96 } else if (fabs(m_velocity) < 1 ) {98 } else if (fabs(m_velocity) < 1 || (lastTime && fabs(m_position - lastPosition) < 1)) { 97 99 m_position = round(m_position); 98 100 m_velocity = 0;
Note: See TracChangeset
for help on using the changeset viewer.