Title: [240794] releases/WebKitGTK/webkit-2.22/Source/WebCore
- Revision
- 240794
- Author
- mcatanz...@igalia.com
- Date
- 2019-01-31 09:28:34 -0800 (Thu, 31 Jan 2019)
Log Message
Merge r240789 - [GTK] Momentum scrolling stops abruptly before websites end
https://bugs.webkit.org/show_bug.cgi?id=193350
Patch by Alexander Mikhaylenko <exalm7...@gmail.com> on 2019-01-31
Reviewed by Carlos Garcia Campos.
Don't immediately set velocity to 0 when position reaches upper or bottom limit.
Instead, set it to the overshot distance, so that position exactly matches upper
or lower limit on the next frame, and then clamp velocity to 0 using the existing
mechanism.
* platform/ScrollAnimationKinetic.cpp:
(WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (240793 => 240794)
--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog 2019-01-31 17:27:38 UTC (rev 240793)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog 2019-01-31 17:28:34 UTC (rev 240794)
@@ -1,3 +1,18 @@
+2019-01-31 Alexander Mikhaylenko <exalm7...@gmail.com>
+
+ [GTK] Momentum scrolling stops abruptly before websites end
+ https://bugs.webkit.org/show_bug.cgi?id=193350
+
+ Reviewed by Carlos Garcia Campos.
+
+ Don't immediately set velocity to 0 when position reaches upper or bottom limit.
+ Instead, set it to the overshot distance, so that position exactly matches upper
+ or lower limit on the next frame, and then clamp velocity to 0 using the existing
+ mechanism.
+
+ * platform/ScrollAnimationKinetic.cpp:
+ (WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
+
2018-12-06 Carlos Eduardo Ramalho <cadubent...@gmail.com>
REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds
Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/ScrollAnimationKinetic.cpp (240793 => 240794)
--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/ScrollAnimationKinetic.cpp 2019-01-31 17:27:38 UTC (rev 240793)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/ScrollAnimationKinetic.cpp 2019-01-31 17:28:34 UTC (rev 240794)
@@ -89,12 +89,14 @@
m_velocity = -decelFriction * m_coef2 * exponentialPart;
if (m_position < m_lower) {
+ m_velocity = m_lower - m_position;
m_position = m_lower;
- m_velocity = 0;
} else if (m_position > m_upper) {
+ m_velocity = m_upper - m_position;
m_position = m_upper;
- m_velocity = 0;
- } else if (fabs(m_velocity) < 1 || (lastTime && fabs(m_position - lastPosition) < 1)) {
+ }
+
+ if (fabs(m_velocity) < 1 || (lastTime && fabs(m_position - lastPosition) < 1)) {
m_position = round(m_position);
m_velocity = 0;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes