| 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 700bca43eafee460b8ea28a1e991e8f267a59c77..afe8a91e5aa043e1fceb33f6740c76047b7d06ac 100644
|
| --- a/cc/trees/layer_tree_host_common_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_common_unittest.cc
|
| @@ -422,9 +422,9 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
|
| gfx::Size(500, 500),
|
| false);
|
|
|
| - scoped_ptr<LayerImpl> scroll_layerScopedPtr(
|
| + scoped_ptr<LayerImpl> scroll_layer_scoped_ptr(
|
| LayerImpl::Create(host_impl.active_tree(), 2));
|
| - LayerImpl* scroll_layer = scroll_layerScopedPtr.get();
|
| + LayerImpl* scroll_layer = scroll_layer_scoped_ptr.get();
|
| SetLayerPropertiesForTesting(scroll_layer,
|
| identity_matrix,
|
| identity_matrix,
|
| @@ -432,12 +432,20 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
|
| gfx::PointF(),
|
| gfx::Size(10, 20),
|
| false);
|
| - scroll_layer->SetScrollable(true);
|
| - scroll_layer->SetMaxScrollOffset(kMaxScrollOffset);
|
| +
|
| + scoped_ptr<LayerImpl> clip_layer_scoped_ptr(
|
| + LayerImpl::Create(host_impl.active_tree(), 4));
|
| + LayerImpl* clip_layer = clip_layer_scoped_ptr.get();
|
| +
|
| + scroll_layer->SetScrollable(clip_layer->id());
|
| + clip_layer->SetBounds(
|
| + gfx::Size(scroll_layer->bounds().width() + kMaxScrollOffset.x(),
|
| + scroll_layer->bounds().height() + kMaxScrollOffset.y()));
|
| scroll_layer->SetScrollOffset(kScrollOffset);
|
| scroll_layer->SetScrollDelta(kScrollDelta);
|
| gfx::Transform impl_transform;
|
| scroll_layer->AddChild(sublayer_scoped_ptr.Pass());
|
| + clip_layer->AddChild(scroll_layer_scoped_ptr.Pass());
|
|
|
| scoped_ptr<LayerImpl> root(LayerImpl::Create(host_impl.active_tree(), 3));
|
| SetLayerPropertiesForTesting(root.get(),
|
| @@ -447,7 +455,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
|
| gfx::PointF(),
|
| gfx::Size(3, 4),
|
| false);
|
| - root->AddChild(scroll_layerScopedPtr.Pass());
|
| + root->AddChild(clip_layer_scoped_ptr.Pass());
|
|
|
| ExecuteCalculateDrawProperties(
|
| root.get(), kDeviceScale, kPageScale, scroll_layer->parent());
|
| @@ -1380,7 +1388,7 @@ TEST_F(LayerTreeHostCommonTest, TransformAboveRootLayer) {
|
| const gfx::Transform identity_matrix;
|
| scoped_refptr<Layer> root = Layer::Create();
|
| scoped_refptr<Layer> child = Layer::Create();
|
| - child->SetScrollable(true);
|
| + child->SetScrollable(root.get());
|
| root->AddChild(child);
|
|
|
| scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| @@ -8533,6 +8541,7 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
|
| scoped_refptr<Layer> root = Layer::Create();
|
| scoped_refptr<Layer> clip_parent = Layer::Create();
|
| scoped_refptr<Layer> render_surface1 = Layer::Create();
|
| + scoped_refptr<Layer> clip_intervening = Layer::Create();
|
| scoped_refptr<Layer> intervening = Layer::Create();
|
| scoped_refptr<Layer> render_surface2 = Layer::Create();
|
| scoped_refptr<LayerWithForcedDrawsContent> clip_child =
|
| @@ -8540,7 +8549,8 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
|
|
|
| root->AddChild(clip_parent);
|
| clip_parent->AddChild(render_surface1);
|
| - render_surface1->AddChild(intervening);
|
| + render_surface1->AddChild(clip_intervening);
|
| + clip_intervening->AddChild(intervening);
|
| intervening->AddChild(render_surface2);
|
| render_surface2->AddChild(clip_child);
|
|
|
| @@ -8548,8 +8558,8 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
|
|
|
| intervening->SetMasksToBounds(true);
|
| clip_parent->SetMasksToBounds(true);
|
| - intervening->SetScrollable(true);
|
| - intervening->SetMaxScrollOffset(gfx::Vector2d(50, 50));
|
| + intervening->SetScrollable(clip_intervening.get());
|
| + clip_intervening->SetBounds(gfx::Size(5, 5));
|
| intervening->SetScrollOffset(gfx::Vector2d(3, 3));
|
|
|
| render_surface1->SetForceRenderSurface(true);
|
| @@ -8585,7 +8595,7 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
|
| identity_transform,
|
| gfx::PointF(),
|
| gfx::PointF(1.f, 1.f),
|
| - gfx::Size(5, 5),
|
| + gfx::Size(55, 55),
|
| false);
|
| SetLayerPropertiesForTesting(render_surface2.get(),
|
| identity_transform,
|
|
|