| Index: cc/layers/scrollbar_layer_unittest.cc
|
| diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
|
| index 65cd0610bde1a8db191421d2deb9484895c7066c..3120dbfe34e8e6d4bf7f5d4c13a6bf9741ef68c6 100644
|
| --- a/cc/layers/scrollbar_layer_unittest.cc
|
| +++ b/cc/layers/scrollbar_layer_unittest.cc
|
| @@ -152,9 +152,9 @@ class ScrollbarLayerTest : public testing::Test {
|
| const bool kIsLeftSideVerticalScrollbar = false;
|
| child2 = SolidColorScrollbarLayer::Create(
|
| scrollbar->Orientation(), thumb_thickness, track_start,
|
| - kIsLeftSideVerticalScrollbar, child1->id(), child1->element_id());
|
| + kIsLeftSideVerticalScrollbar, child1->element_id());
|
| } else {
|
| - child2 = PaintedScrollbarLayer::Create(std::move(scrollbar), child1->id(),
|
| + child2 = PaintedScrollbarLayer::Create(std::move(scrollbar),
|
| child1->element_id());
|
| }
|
| layer_tree_root->AddChild(child1);
|
| @@ -199,7 +199,6 @@ TEST_F(ScrollbarLayerTest, RepaintOverlayWhenResourceDisposed) {
|
| FakePaintedOverlayScrollbar* fake_scrollbar = scrollbar.get();
|
| scoped_refptr<PaintedOverlayScrollbarLayer> scrollbar_layer =
|
| PaintedOverlayScrollbarLayer::Create(std::move(scrollbar),
|
| - layer_tree_root->id(),
|
| layer_tree_root->element_id());
|
|
|
| // Setup.
|
| @@ -296,7 +295,7 @@ TEST_F(ScrollbarLayerTest, ScrollOffsetSynchronization) {
|
| scroll_layer->SetElementId(LayerIdToElementIdForTesting(scroll_layer->id()));
|
| scoped_refptr<Layer> content_layer = Layer::Create();
|
| scoped_refptr<Layer> scrollbar_layer = PaintedScrollbarLayer::Create(
|
| - std::move(scrollbar), scroll_layer->id(), scroll_layer->element_id());
|
| + std::move(scrollbar), scroll_layer->element_id());
|
|
|
| // Choose bounds to give max_scroll_offset = (30, 50).
|
| layer_tree_root->SetBounds(gfx::Size(70, 150));
|
| @@ -364,8 +363,7 @@ TEST_F(ScrollbarLayerTest, UpdatePropertiesOfScrollBarWhenThumbRemoved) {
|
| scoped_refptr<Layer> root_layer = Layer::Create();
|
| scoped_refptr<Layer> content_layer = Layer::Create();
|
| scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer =
|
| - FakePaintedScrollbarLayer::Create(false, true, root_layer->id(),
|
| - root_layer->element_id());
|
| + FakePaintedScrollbarLayer::Create(false, true, root_layer->element_id());
|
|
|
| root_layer->SetScrollClipLayerId(root_clip_layer->id());
|
| // Give the root-clip a size that will result in MaxScrollOffset = (80, 0).
|
| @@ -380,7 +378,7 @@ TEST_F(ScrollbarLayerTest, UpdatePropertiesOfScrollBarWhenThumbRemoved) {
|
|
|
| root_layer->SetScrollOffset(gfx::ScrollOffset(0, 0));
|
| scrollbar_layer->SetBounds(gfx::Size(70, 10));
|
| - scrollbar_layer->SetScrollInfo(root_layer->id(), root_layer->element_id());
|
| + scrollbar_layer->SetScrollElementId(root_layer->element_id());
|
| scrollbar_layer->fake_scrollbar()->set_location(gfx::Point(20, 10));
|
| scrollbar_layer->fake_scrollbar()->set_track_rect(gfx::Rect(30, 10, 50, 10));
|
| scrollbar_layer->fake_scrollbar()->set_thumb_thickness(10);
|
| @@ -404,8 +402,7 @@ TEST_F(ScrollbarLayerTest, ThumbRect) {
|
| scoped_refptr<Layer> root_layer = Layer::Create();
|
| scoped_refptr<Layer> content_layer = Layer::Create();
|
| scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer =
|
| - FakePaintedScrollbarLayer::Create(false, true, root_layer->id(),
|
| - root_layer->element_id());
|
| + FakePaintedScrollbarLayer::Create(false, true, root_layer->element_id());
|
|
|
| root_layer->SetElementId(LayerIdToElementIdForTesting(root_layer->id()));
|
| root_layer->SetScrollClipLayerId(root_clip_layer->id());
|
| @@ -421,7 +418,7 @@ TEST_F(ScrollbarLayerTest, ThumbRect) {
|
|
|
| root_layer->SetScrollOffset(gfx::ScrollOffset(0, 0));
|
| scrollbar_layer->SetBounds(gfx::Size(70, 10));
|
| - scrollbar_layer->SetScrollInfo(root_layer->id(), root_layer->element_id());
|
| + scrollbar_layer->SetScrollElementId(root_layer->element_id());
|
| scrollbar_layer->fake_scrollbar()->set_location(gfx::Point(20, 10));
|
| scrollbar_layer->fake_scrollbar()->set_track_rect(gfx::Rect(30, 10, 50, 10));
|
| scrollbar_layer->fake_scrollbar()->set_thumb_thickness(10);
|
| @@ -484,7 +481,6 @@ TEST_F(ScrollbarLayerTest, ThumbRectForOverlayLeftSideVerticalScrollbar) {
|
| // Create an overlay left side vertical scrollbar.
|
| scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer =
|
| FakePaintedScrollbarLayer::Create(false, true, VERTICAL, true, true,
|
| - root_layer->id(),
|
| root_layer->element_id());
|
| root_layer->SetScrollClipLayerId(root_clip_layer->id());
|
| root_clip_layer->SetBounds(gfx::Size(50, 20));
|
| @@ -496,7 +492,7 @@ TEST_F(ScrollbarLayerTest, ThumbRectForOverlayLeftSideVerticalScrollbar) {
|
|
|
| root_layer->SetScrollOffset(gfx::ScrollOffset(0, 0));
|
| scrollbar_layer->SetBounds(gfx::Size(10, 20));
|
| - scrollbar_layer->SetScrollInfo(root_layer->id(), root_layer->element_id());
|
| + scrollbar_layer->SetScrollElementId(root_layer->element_id());
|
| scrollbar_layer->fake_scrollbar()->set_track_rect(gfx::Rect(0, 0, 10, 20));
|
| scrollbar_layer->fake_scrollbar()->set_thumb_thickness(10);
|
| scrollbar_layer->fake_scrollbar()->set_thumb_length(4);
|
| @@ -606,8 +602,7 @@ TEST_F(ScrollbarLayerTest, LayerDrivenSolidColorDrawQuads) {
|
| const bool kIsLeftSideVerticalScrollbar = false;
|
| child2 = SolidColorScrollbarLayer::Create(
|
| scrollbar->Orientation(), kThumbThickness, kTrackStart,
|
| - kIsLeftSideVerticalScrollbar, scroll_layer->id(),
|
| - scroll_layer->element_id());
|
| + kIsLeftSideVerticalScrollbar, scroll_layer->element_id());
|
| scroll_layer->AddChild(child1);
|
| scroll_layer->InsertChild(child2, 1);
|
| layer_tree_root->AddChild(scroll_layer);
|
| @@ -659,8 +654,7 @@ TEST_F(ScrollbarLayerTest, ScrollbarLayerOpacity) {
|
| const bool kIsLeftSideVerticalScrollbar = false;
|
| scrollbar_layer = SolidColorScrollbarLayer::Create(
|
| scrollbar->Orientation(), kThumbThickness, kTrackStart,
|
| - kIsLeftSideVerticalScrollbar, scroll_layer->id(),
|
| - scroll_layer->element_id());
|
| + kIsLeftSideVerticalScrollbar, scroll_layer->element_id());
|
| scroll_layer->AddChild(child1);
|
| scroll_layer->InsertChild(scrollbar_layer, 1);
|
| layer_tree_root->AddChild(scroll_layer);
|
| @@ -742,8 +736,7 @@ TEST_F(ScrollbarLayerTest, ScrollbarLayerPushProperties) {
|
| const bool kIsLeftSideVerticalScrollbar = false;
|
| scrollbar_layer = SolidColorScrollbarLayer::Create(
|
| scrollbar->Orientation(), kThumbThickness, kTrackStart,
|
| - kIsLeftSideVerticalScrollbar, scroll_layer->id(),
|
| - scroll_layer->element_id());
|
| + kIsLeftSideVerticalScrollbar, scroll_layer->element_id());
|
| scroll_layer->AddChild(child1);
|
| scroll_layer->InsertChild(scrollbar_layer, 1);
|
| layer_tree_root->AddChild(scroll_layer);
|
| @@ -890,12 +883,10 @@ class ScrollbarLayerTestResourceCreationAndRelease : public ScrollbarLayerTest {
|
| const bool kIsLeftSideVerticalScrollbar = false;
|
| scrollbar_layer = SolidColorScrollbarLayer::Create(
|
| scrollbar->Orientation(), kThumbThickness, kTrackStart,
|
| - kIsLeftSideVerticalScrollbar, layer_tree_root->id(),
|
| - layer_tree_root->element_id());
|
| + kIsLeftSideVerticalScrollbar, layer_tree_root->element_id());
|
| } else {
|
| scrollbar_layer = PaintedScrollbarLayer::Create(
|
| - std::move(scrollbar), layer_tree_root->id(),
|
| - layer_tree_root->element_id());
|
| + std::move(scrollbar), layer_tree_root->element_id());
|
| }
|
| layer_tree_root->AddChild(content_layer);
|
| layer_tree_root->AddChild(scrollbar_layer);
|
| @@ -954,7 +945,7 @@ TEST_F(ScrollbarLayerTestResourceCreationAndRelease, TestResourceUpdate) {
|
| scoped_refptr<Layer> layer_tree_root = Layer::Create();
|
| scoped_refptr<Layer> content_layer = Layer::Create();
|
| scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer =
|
| - FakePaintedScrollbarLayer::Create(false, true, layer_tree_root->id(),
|
| + FakePaintedScrollbarLayer::Create(false, true,
|
| layer_tree_root->element_id());
|
|
|
| layer_tree_root->AddChild(content_layer);
|
| @@ -1115,7 +1106,7 @@ class ScaledScrollbarLayerTestResourceCreation : public ScrollbarLayerTest {
|
| scoped_refptr<Layer> layer_tree_root = Layer::Create();
|
| scoped_refptr<Layer> content_layer = Layer::Create();
|
| scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer =
|
| - FakePaintedScrollbarLayer::Create(false, true, layer_tree_root->id(),
|
| + FakePaintedScrollbarLayer::Create(false, true,
|
| layer_tree_root->element_id());
|
|
|
| layer_tree_root->AddChild(content_layer);
|
| @@ -1186,7 +1177,6 @@ class ScaledScrollbarLayerTestScaledRasterization : public ScrollbarLayerTest {
|
| scoped_refptr<Layer> layer_tree_root = Layer::Create();
|
| scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer =
|
| FakePaintedScrollbarLayer::Create(paint_during_update, has_thumb,
|
| - layer_tree_root->id(),
|
| layer_tree_root->element_id());
|
|
|
| layer_tree_root->AddChild(scrollbar_layer);
|
|
|