Index: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp |
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp |
index 4ba3e53da101f32a45c2c2a4af026516f7da1673..e33d72715be566b361d3220b8026f4dfbb7532ab 100644 |
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp |
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp |
@@ -207,14 +207,14 @@ bool ScrollbarTheme::shouldSnapBackToDragOrigin(const ScrollbarThemeClient& scro |
return Platform::current()->scrollbarBehavior()->shouldSnapBackToDragOrigin(mousePosition, trackRect(scrollbar), scrollbar.orientation() == HorizontalScrollbar); |
} |
-int ScrollbarTheme::thumbPosition(const ScrollbarThemeClient& scrollbar) |
+int ScrollbarTheme::thumbPosition(const ScrollbarThemeClient& scrollbar, float scrollPosition) |
{ |
if (scrollbar.enabled()) { |
float size = scrollbar.totalSize() - scrollbar.visibleSize(); |
// Avoid doing a floating point divide by zero and return 1 when usedTotalSize == visibleSize. |
if (!size) |
return 0; |
- float pos = std::max(0.0f, scrollbar.currentPos()) * (trackLength(scrollbar) - thumbLength(scrollbar)) / size; |
+ float pos = std::max(0.0f, scrollPosition) * (trackLength(scrollbar) - thumbLength(scrollbar)) / size; |
return (pos < 1 && pos > 0) ? 1 : pos; |
} |
return 0; |