| 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 ff0a6cc91c409377a81421178cd8ecf2ef78e699..93ffd62e8914238d957ae389d876191b70ae4289 100644
|
| --- a/cc/trees/layer_tree_host_common_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_common_unittest.cc
|
| @@ -6865,7 +6865,6 @@ TEST_F(LayerTreeHostCommonTest, StickyPositionMainThreadUpdates) {
|
| sticky_position.scroll_container_relative_containing_block_rect =
|
| gfx::Rect(0, 0, 50, 50);
|
| sticky_pos->SetStickyPositionConstraint(sticky_position);
|
| - sticky_pos->SetElementId(LayerIdToElementIdForTesting(sticky_pos->id()));
|
|
|
| root->SetBounds(gfx::Size(100, 100));
|
| container->SetBounds(gfx::Size(100, 100));
|
| @@ -6905,8 +6904,8 @@ TEST_F(LayerTreeHostCommonTest, StickyPositionMainThreadUpdates) {
|
|
|
| // Now the main thread commits the new position of the sticky element.
|
| scroller->SetScrollOffset(gfx::ScrollOffset(15, 15));
|
| - sticky_pos->SetPosition(gfx::PointF(10, 25));
|
| - sticky_pos->SetOffsetForStickyPositionFromMainThread(gfx::Size(0, 5));
|
| + // Shift the layer by -offset_for_position_sticky.
|
| + sticky_pos->SetPosition(gfx::PointF(10, 25) - gfx::Vector2dF(0, 5));
|
| ExecuteCalculateDrawProperties(root.get());
|
| host()->host_impl()->CreatePendingTree();
|
| host()->CommitAndCreatePendingTree();
|
| @@ -6958,7 +6957,6 @@ TEST_F(LayerTreeHostCommonTest, StickyPositionCompositedContainer) {
|
| sticky_position.scroll_container_relative_containing_block_rect =
|
| gfx::Rect(20, 20, 30, 30);
|
| sticky_pos->SetStickyPositionConstraint(sticky_position);
|
| - sticky_pos->SetElementId(LayerIdToElementIdForTesting(sticky_pos->id()));
|
|
|
| root->SetBounds(gfx::Size(100, 100));
|
| container->SetBounds(gfx::Size(100, 100));
|
| @@ -7000,8 +6998,8 @@ TEST_F(LayerTreeHostCommonTest, StickyPositionCompositedContainer) {
|
|
|
| // Now the main thread commits the new position of the sticky element.
|
| scroller->SetScrollOffset(gfx::ScrollOffset(0, 25));
|
| - sticky_pos->SetPosition(gfx::PointF(0, 15));
|
| - sticky_pos->SetOffsetForStickyPositionFromMainThread(gfx::Size(0, 5));
|
| + // Shift the layer by -offset_for_position_sticky.
|
| + sticky_pos->SetPosition(gfx::PointF(0, 15) - gfx::Vector2dF(0, 5));
|
| ExecuteCalculateDrawProperties(root.get());
|
| host()->host_impl()->CreatePendingTree();
|
| host()->CommitAndCreatePendingTree();
|
|
|