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

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: Update test 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
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 480fe3bd0a02fc1e01c29b85dff4709990a58527..ad4d53d11ce045adf0c59042d6ab72dc32a4dc7e 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2210,6 +2210,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 =
@@ -2235,8 +2236,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;
@@ -2300,8 +2303,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();
@@ -2323,7 +2326,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:

Powered by Google App Engine
This is Rietveld 408576698