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

Unified Diff: cc/trees/tree_synchronizer.cc

Issue 135183016: Revert of Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « cc/trees/layer_tree_impl.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/tree_synchronizer.cc
diff --git a/cc/trees/tree_synchronizer.cc b/cc/trees/tree_synchronizer.cc
index 1c1c7e164ad00244f0faa253432ccde7fc497202..27f9dab38d868f9d5a82a661b7d21481fa2360f8 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -25,13 +25,6 @@
if (!layer_impl)
return;
- layer_impl->ClearScrollbars();
- if (ScrollbarLayerImplBase* scrollbar_layer =
- layer_impl->ToScrollbarLayer()) {
- scrollbar_layer->ClearClipLayer();
- scrollbar_layer->ClearScrollLayer();
- }
-
OwnedLayerImplList& children = layer_impl->children();
for (OwnedLayerImplList::iterator it = children.begin();
it != children.end();
@@ -118,6 +111,11 @@
new_layers, old_layers, layer->mask_layer(), tree_impl));
layer_impl->SetReplicaLayer(SynchronizeTreesRecursiveInternal(
new_layers, old_layers, layer->replica_layer(), tree_impl));
+
+ // Remove all dangling pointers. The pointers will be setup later in
+ // UpdateScrollbarLayerPointersRecursive phase
+ layer_impl->SetHorizontalScrollbarLayer(NULL);
+ layer_impl->SetVerticalScrollbarLayer(NULL);
return layer_impl.Pass();
}
@@ -162,9 +160,17 @@
iter != new_layers->end()
? static_cast<ScrollbarLayerImplBase*>(iter->second)
: NULL;
+ iter = new_layers->find(scrollbar_layer->ScrollLayerId());
+ LayerImpl* scroll_layer_impl =
+ iter != new_layers->end() ? iter->second : NULL;
+
DCHECK(scrollbar_layer_impl);
-
- scrollbar_layer->PushScrollClipPropertiesTo(scrollbar_layer_impl);
+ DCHECK(scroll_layer_impl);
+
+ if (scrollbar_layer->orientation() == HORIZONTAL)
+ scroll_layer_impl->SetHorizontalScrollbarLayer(scrollbar_layer_impl);
+ else
+ scroll_layer_impl->SetVerticalScrollbarLayer(scrollbar_layer_impl);
}
void UpdateScrollbarLayerPointersRecursive(const RawPtrLayerImplMap* new_layers,
@@ -199,8 +205,6 @@
if (push_layer)
layer->PushPropertiesTo(layer_impl);
- else if (layer->ToScrollbarLayer())
- layer->ToScrollbarLayer()->PushScrollClipPropertiesTo(layer_impl);
size_t num_dependents_need_push_properties = 0;
if (recurse_on_children_and_dependents) {
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698