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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2243973002: Fix scroll chaining in CC for non-default RootScroller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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') | cc/trees/layer_tree_host_impl_unittest.cc » ('J')
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 1cd732acbdd6b9d5356aeb6168ea7a8ff877ed09..bf88c1237283369de6b6ff31178f30bd069b5bf5 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3015,12 +3015,19 @@ void LayerTreeHostImpl::DistributeScrollDelta(ScrollState* scroll_state) {
if (scroll_node) {
for (; scroll_tree.parent(scroll_node);
scroll_node = scroll_tree.parent(scroll_node)) {
- // Skip the outer viewport scroll layer so that we try to scroll the
- // viewport only once. i.e. The inner viewport layer represents the
- // viewport.
- if (!scroll_node->scrollable ||
- scroll_node->is_outer_viewport_scroll_layer)
+ if (scroll_node->is_outer_viewport_scroll_layer) {
+ // Don't chain scrolls past the outer viewport scroll layer. Once we
+ // reach that, we should scroll the viewport, which is represented by
+ // the inner viewport scroll layer.
+ ScrollNode* inner_scroll_node =
tdresser 2016/08/15 13:37:41 Maybe inner_viewport_scroll_node?
bokan 2016/08/20 22:13:58 Done.
+ scroll_tree.Node(InnerViewportScrollLayer()->scroll_tree_index());
+ current_scroll_chain.push_front(inner_scroll_node);
+ break;
+ }
+
+ if (!scroll_node->scrollable)
continue;
+
current_scroll_chain.push_front(scroll_node);
}
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | cc/trees/layer_tree_host_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698