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

Unified Diff: cc/trees/layer_tree_host_common_unittest.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_host.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 93a75e7d450ead2f38c6bb075ee2aec9ccd14e5a..f7db3e1b55216a86ea47419b8c8bfff03f28a95a 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -422,9 +422,9 @@
gfx::Size(500, 500),
false);
- scoped_ptr<LayerImpl> scroll_layer_scoped_ptr(
+ scoped_ptr<LayerImpl> scroll_layerScopedPtr(
LayerImpl::Create(host_impl.active_tree(), 2));
- LayerImpl* scroll_layer = scroll_layer_scoped_ptr.get();
+ LayerImpl* scroll_layer = scroll_layerScopedPtr.get();
SetLayerPropertiesForTesting(scroll_layer,
identity_matrix,
identity_matrix,
@@ -432,22 +432,12 @@
gfx::PointF(),
gfx::Size(10, 20),
false);
-
- scoped_ptr<LayerImpl> clip_layer_scoped_ptr(
- LayerImpl::Create(host_impl.active_tree(), 4));
- LayerImpl* clip_layer = clip_layer_scoped_ptr.get();
-
- scroll_layer->SetScrollClipLayer(clip_layer->id());
- clip_layer->SetBounds(
- gfx::Size(scroll_layer->bounds().width() + kMaxScrollOffset.x(),
- scroll_layer->bounds().height() + kMaxScrollOffset.y()));
- scroll_layer->SetScrollClipLayer(clip_layer->id());
+ scroll_layer->SetScrollable(true);
+ scroll_layer->SetMaxScrollOffset(kMaxScrollOffset);
+ scroll_layer->SetScrollOffset(kScrollOffset);
scroll_layer->SetScrollDelta(kScrollDelta);
gfx::Transform impl_transform;
scroll_layer->AddChild(sublayer_scoped_ptr.Pass());
- LayerImpl* scroll_layer_raw_ptr = scroll_layer_scoped_ptr.get();
- clip_layer->AddChild(scroll_layer_scoped_ptr.Pass());
- scroll_layer_raw_ptr->SetScrollOffset(kScrollOffset);
scoped_ptr<LayerImpl> root(LayerImpl::Create(host_impl.active_tree(), 3));
SetLayerPropertiesForTesting(root.get(),
@@ -457,7 +447,7 @@
gfx::PointF(),
gfx::Size(3, 4),
false);
- root->AddChild(clip_layer_scoped_ptr.Pass());
+ root->AddChild(scroll_layerScopedPtr.Pass());
ExecuteCalculateDrawProperties(
root.get(), kDeviceScale, kPageScale, scroll_layer->parent());
@@ -1390,7 +1380,7 @@
const gfx::Transform identity_matrix;
scoped_refptr<Layer> root = Layer::Create();
scoped_refptr<Layer> child = Layer::Create();
- child->SetScrollClipLayer(root.get());
+ child->SetScrollable(true);
root->AddChild(child);
scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
@@ -8642,7 +8632,8 @@
intervening->SetMasksToBounds(true);
clip_parent->SetMasksToBounds(true);
- intervening->SetScrollClipLayer(clip_parent.get());
+ intervening->SetScrollable(true);
+ intervening->SetMaxScrollOffset(gfx::Vector2d(50, 50));
intervening->SetScrollOffset(gfx::Vector2d(3, 3));
render_surface1->SetForceRenderSurface(true);
@@ -9669,7 +9660,7 @@
constraint.set_is_fixed_position(true);
fixed->SetPositionConstraint(constraint);
- scroller->SetScrollClipLayer(container->id());
+ scroller->SetScrollable(true);
gfx::Transform identity_transform;
gfx::Transform container_transform;
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698