summaryrefslogtreecommitdiffstats
path: root/chromium/cc/layers/scrollbar_layer_impl_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/layers/scrollbar_layer_impl_base.cc')
-rw-r--r--chromium/cc/layers/scrollbar_layer_impl_base.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chromium/cc/layers/scrollbar_layer_impl_base.cc b/chromium/cc/layers/scrollbar_layer_impl_base.cc
index 419b0517b81..45540e311a4 100644
--- a/chromium/cc/layers/scrollbar_layer_impl_base.cc
+++ b/chromium/cc/layers/scrollbar_layer_impl_base.cc
@@ -5,6 +5,8 @@
#include "cc/layers/scrollbar_layer_impl_base.h"
#include <algorithm>
+
+#include "base/numerics/ranges.h"
#include "cc/trees/effect_node.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/scroll_node.h"
@@ -213,7 +215,7 @@ gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRectWithThumbThicknessScale(
float maximum = scroll_layer_length() - clip_layer_length();
// With the length known, we can compute the thumb's position.
- float clamped_current_pos = std::min(std::max(current_pos(), 0.f), maximum);
+ float clamped_current_pos = base::ClampToRange(current_pos(), 0.0f, maximum);
int thumb_offset = TrackStart();
if (maximum > 0) {
@@ -282,6 +284,10 @@ bool ScrollbarLayerImplBase::HasFindInPageTickmarks() const {
return false;
}
+bool ScrollbarLayerImplBase::SupportsDragSnapBack() const {
+ return false;
+}
+
gfx::Rect ScrollbarLayerImplBase::BackButtonRect() const {
return gfx::Rect(0, 0);
}