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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 20990009: Handle root layer fling Java-side in android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix findbugs Created 7 years, 5 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 052797af0691b402f6f20d6c0eba35ae2b2cc0f2..f5661a8842adf928cc86b6b07e81ea09613563ff 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2117,10 +2117,17 @@ void LayerTreeHostImpl::ScrollEnd() {
}
InputHandler::ScrollStatus LayerTreeHostImpl::FlingScrollBegin() {
- if (active_tree_->CurrentlyScrollingLayer())
- return ScrollStarted;
+ if (!active_tree_->CurrentlyScrollingLayer())
+ return ScrollIgnored;
- return ScrollIgnored;
+ if (settings_.ignore_root_layer_flings &&
+ active_tree_->CurrentlyScrollingLayer() ==
+ active_tree_->RootScrollLayer()) {
+ ClearCurrentlyScrollingLayer();
+ return ScrollIgnored;
+ }
+
+ return ScrollStarted;
}
void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) {

Powered by Google App Engine
This is Rietveld 408576698