| 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 3a71b3dbf4ff86530b364494f05c9a4dcdef067f..c7ac012d9633c078d2618666ee8ab1cde185e954 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,22 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
|
| gfx::PointF(),
|
| gfx::Size(10, 20),
|
| false);
|
| - scroll_layer->SetScrollable(true);
|
| - scroll_layer->SetMaxScrollOffset(kMaxScrollOffset);
|
| - scroll_layer->SetScrollOffset(kScrollOffset);
|
| +
|
| + 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->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(),
|
| @@ -447,7 +457,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 +1390,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->SetScrollClipLayerId(root->id());
|
| root->AddChild(child);
|
|
|
| scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| @@ -8632,8 +8642,7 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
|
|
|
| intervening->SetMasksToBounds(true);
|
| clip_parent->SetMasksToBounds(true);
|
| - intervening->SetScrollable(true);
|
| - intervening->SetMaxScrollOffset(gfx::Vector2d(50, 50));
|
| + intervening->SetScrollClipLayerId(clip_parent->id());
|
| intervening->SetScrollOffset(gfx::Vector2d(3, 3));
|
|
|
| render_surface1->SetForceRenderSurface(true);
|
| @@ -9660,7 +9669,7 @@ TEST_F(LayerTreeHostCommonTest, ScrollCompensationWithRounding) {
|
| constraint.set_is_fixed_position(true);
|
| fixed->SetPositionConstraint(constraint);
|
|
|
| - scroller->SetScrollable(true);
|
| + scroller->SetScrollClipLayer(container->id());
|
|
|
| gfx::Transform identity_transform;
|
| gfx::Transform container_transform;
|
|
|