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

Unified Diff: cc/layers/scrollbar_layer_impl_base.cc

Issue 2803853007: Ignore rounding error between clip_layer_length_ and scroll_layer_length_ (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « cc/base/math_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/scrollbar_layer_impl_base.cc
diff --git a/cc/layers/scrollbar_layer_impl_base.cc b/cc/layers/scrollbar_layer_impl_base.cc
index da53036fea0a07cd555c932d769ce32092f6aa19..b3d4354211cfcc429a543ddbbf0c1dd8627263c7 100644
--- a/cc/layers/scrollbar_layer_impl_base.cc
+++ b/cc/layers/scrollbar_layer_impl_base.cc
@@ -5,6 +5,7 @@
#include "cc/layers/scrollbar_layer_impl_base.h"
#include <algorithm>
+#include "cc/base/math_util.h"
#include "cc/trees/effect_node.h"
#include "cc/trees/layer_tree_impl.h"
#include "ui/gfx/geometry/rect_conversions.h"
@@ -67,6 +68,8 @@ bool ScrollbarLayerImplBase::CanScrollOrientation() const {
if (!scroll_layer)
return false;
return scroll_layer->user_scrollable(orientation()) &&
+ !MathUtil::IsFloatNearlyTheSame(clip_layer_length_,
bokan 2017/04/10 14:20:56 Thinking about this some more: this limit is kind
+ scroll_layer_length_) &&
clip_layer_length_ < scroll_layer_length_;
}
« no previous file with comments | « cc/base/math_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698