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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 218883005: Fix another inappropriate overscroll glow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check for unnecessary glow Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 072e8e7efbf2d6ae30186f8514e2d47b790961b8..0ac2a0480d5fb12befbc7c200847110adb9ab222 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2269,7 +2269,7 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
if (layer_impl == InnerViewportScrollLayer()) {
unused_root_delta.Subtract(applied_delta);
- const float kOverscrollEpsilon = 0.01f;
+ const float kOverscrollEpsilon = move_threshold;
if (std::abs(unused_root_delta.x()) < kOverscrollEpsilon)
unused_root_delta.set_x(0.0f);
if (std::abs(unused_root_delta.y()) < kOverscrollEpsilon)
@@ -2315,7 +2315,8 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
accumulated_root_overscroll_.set_y(0);
accumulated_root_overscroll_ += unused_root_delta;
- bool did_overscroll = !unused_root_delta.IsZero();
+ bool did_overscroll =
+ !unused_root_delta.IsZero() && !(did_scroll_x && did_scroll_y);
if (did_overscroll && input_handler_client_) {
DidOverscrollParams params;
params.accumulated_overscroll = accumulated_root_overscroll_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698