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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 15029006: Make it possible for the scroll offset delegate to intercept fling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reactivate the patch! 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 f97eea0f51f09f4ade0b5dc3043f1523d1bb9620..aeb77e47ea25771d9761bdf5e4816c4fd4f8b134 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2072,10 +2072,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