cc: Move SyncedScrollOffset to scroll tree

Now updating scrolling information on impl side can be independent of layer impl.
There are still some left-over changes corresponding to NoteLayerPropertiesChanged.

SyncedScrollOffset of scrollable layers are now stored in property trees instead of
layer impl. The main thread property tree has one copy while pending and active share
one.

BUG=568830
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1736073002

Cr-Commit-Position: refs/heads/master@{#379116}
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index fae38ae1..d2c1f55c 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -10056,7 +10056,8 @@
 
   // Property tree root
   ScrollTree scroll_tree = host()->property_trees()->scroll_tree;
-  ScrollTree expected_scroll_tree;
+  PropertyTrees property_trees;
+  ScrollTree expected_scroll_tree = property_trees.scroll_tree;
   ScrollNode* property_tree_root = expected_scroll_tree.Node(0);
   property_tree_root->id = kRootPropertyTreeNodeId;
   property_tree_root->parent_id = kInvalidPropertyTreeNodeId;
@@ -10139,6 +10140,12 @@
   scroll_parent5.data.transform_id = parent5->transform_tree_index();
   expected_scroll_tree.Insert(scroll_parent5, 1);
 
+  expected_scroll_tree.synced_scroll_offset(parent2->id())
+      ->PushFromMainThread(gfx::ScrollOffset(0, 0));
+  expected_scroll_tree.synced_scroll_offset(child7->id())
+      ->PushFromMainThread(gfx::ScrollOffset(0, 0));
+  expected_scroll_tree.synced_scroll_offset(grand_child11->id())
+      ->PushFromMainThread(gfx::ScrollOffset(0, 0));
   expected_scroll_tree.set_needs_update(false);
 
   EXPECT_EQ(expected_scroll_tree, scroll_tree);