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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2832743002: Add ScrollTree::FindNodeFromElementId (Closed)
Patch Set: Created 3 years, 8 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/property_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index da95603c411cd0f2f4c7d71393d1bfdff67f6756..8e1a0a2e827aba4c2c61de12e6e71e46760ae5be 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -459,13 +459,8 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
ScrollNode* scrolling_node = nullptr;
if (scrolling_element_id) {
- auto& scroll_node_index_map =
- target_tree->property_trees()->element_id_to_scroll_node_index;
- auto scrolling_node_it = scroll_node_index_map.find(scrolling_element_id);
- if (scrolling_node_it != scroll_node_index_map.end()) {
- int index = scrolling_node_it->second;
- scrolling_node = target_tree->property_trees()->scroll_tree.Node(index);
- }
+ auto& scroll_tree = target_tree->property_trees()->scroll_tree;
+ scrolling_node = scroll_tree.FindNodeFromElementId(scrolling_element_id);
}
target_tree->SetCurrentlyScrollingNode(scrolling_node);
« no previous file with comments | « no previous file | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698