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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 183013010: Don't send touchcancel on touch scroll start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win compile warning 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 | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | 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 f34432f62f9371ec8b80f123263486189494b34c..e3f31f54a849abae7f8cb7c1a8feb596de427570 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2217,6 +2217,7 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
gfx::Vector2dF unused_root_delta;
bool did_scroll_x = false;
bool did_scroll_y = false;
+ bool did_scroll_top_controls = false;
// TODO(wjmaclean) Should we guard against CurrentlyScrollingLayer() == 0
// here?
bool consume_by_top_controls =
@@ -2242,8 +2243,10 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
applied_delta = pending_delta - excess_delta;
pending_delta = excess_delta;
// Force updating of vertical adjust values if needed.
- if (applied_delta.y() != 0)
+ if (applied_delta.y() != 0) {
+ did_scroll_top_controls = true;
layer_impl->ScrollbarParametersDidChange();
+ }
}
// Track root layer deltas for reporting overscroll.
unused_root_delta = pending_delta;
@@ -2307,8 +2310,8 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
break;
}
- bool did_scroll = did_scroll_x || did_scroll_y;
- if (did_scroll) {
+ bool did_scroll_content = did_scroll_x || did_scroll_y;
+ if (did_scroll_content) {
client_->SetNeedsCommitOnImplThread();
SetNeedsRedraw();
client_->RenewTreePriority();
@@ -2330,7 +2333,7 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
input_handler_client_->DidOverscroll(params);
}
- return did_scroll;
+ return did_scroll_content || did_scroll_top_controls;
}
// This implements scrolling by page as described here:
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698