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

Unified Diff: cc/trees/property_tree.cc

Issue 1886973005: cc: Clear the |layer_id_to_scroll_offset_map_| during ScrollTree deserialization . (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add back previous test expectation. Created 4 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index 91dd5c73a27d758af37a5b9b3c838ae5cfe5aa7c..6c0bf015c9cda8bef04b965bd559b0f147231c72 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -1462,6 +1462,9 @@ void ScrollTree::FromProtobuf(const proto::PropertyTree& proto) {
currently_scrolling_node_id_ = data.currently_scrolling_node_id();
+ // TODO(khushalsagar): This should probably be removed if the copy constructor
+ // for ScrollTree copies the |layer_id_to_scroll_offset_map_| as well.
+ layer_id_to_scroll_offset_map_.clear();
for (int i = 0; i < data.layer_id_to_scroll_offset_map_size(); ++i) {
const proto::ScrollOffsetMapEntry entry =
data.layer_id_to_scroll_offset_map(i);
« no previous file with comments | « no previous file | cc/trees/property_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698