Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp

Issue 1601303003: Fix smooth scroll overshooting when mouse held down in scrollbar track. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
index a5a12bb6c5e853ee301455486704641a8d9955b3..09b47a04bfe38886ffff7d98e3cc63b9f50c1f73 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
@@ -73,13 +73,13 @@ bool ScrollbarThemeOverlay::usesOverlayScrollbars() const
return true;
}
-int ScrollbarThemeOverlay::thumbPosition(const ScrollbarThemeClient& scrollbar)
+int ScrollbarThemeOverlay::thumbPosition(const ScrollbarThemeClient& scrollbar, float scrollPosition)
{
if (!scrollbar.totalSize())
return 0;
int trackLen = trackLength(scrollbar);
- float proportion = static_cast<float>(scrollbar.currentPos()) / scrollbar.totalSize();
+ float proportion = static_cast<float>(scrollPosition) / scrollbar.totalSize();
return round(proportion * trackLen);
}

Powered by Google App Engine
This is Rietveld 408576698