| Index: cc/trees/layer_tree_host_impl_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
|
| index 6d8f424b9fcd693bb3338f8a7958cc8f26f965d6..91fdc55cd1fcfd8742f7f8265ac43cd82ff72737 100644
|
| --- a/cc/trees/layer_tree_host_impl_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc
|
| @@ -339,8 +339,7 @@ class LayerTreeHostImplTest : public testing::Test,
|
| LayerImpl::Create(layer_tree_impl, kPageScaleLayerId);
|
|
|
| inner_scroll->SetScrollClipLayer(inner_clip->id());
|
| - inner_scroll->SetElementId(
|
| - LayerIdToElementIdForTesting(inner_scroll->id()));
|
| + inner_scroll->SetElementId(inner_scroll->id());
|
| inner_scroll->SetBounds(content_size);
|
| inner_scroll->SetPosition(gfx::PointF());
|
|
|
| @@ -353,8 +352,7 @@ class LayerTreeHostImplTest : public testing::Test,
|
| std::unique_ptr<LayerImpl> outer_scroll =
|
| LayerImpl::Create(layer_tree_impl, kOuterViewportScrollLayerId);
|
| outer_scroll->SetScrollClipLayer(outer_clip->id());
|
| - outer_scroll->SetElementId(
|
| - LayerIdToElementIdForTesting(outer_scroll->id()));
|
| + outer_scroll->SetElementId(outer_scroll->id());
|
| outer_scroll->layer_tree_impl()
|
| ->property_trees()
|
| ->scroll_tree.UpdateScrollOffsetBaseForTesting(outer_scroll->id(),
|
| @@ -434,7 +432,7 @@ class LayerTreeHostImplTest : public testing::Test,
|
| std::unique_ptr<LayerImpl> layer =
|
| LayerImpl::Create(host_impl_->active_tree(), id);
|
| layer->SetScrollClipLayer(clip_layer->id());
|
| - layer->SetElementId(LayerIdToElementIdForTesting(layer->id()));
|
| + layer->SetElementId(layer->id());
|
| layer->SetDrawsContent(true);
|
| layer->SetBounds(size);
|
| clip_layer->SetBounds(gfx::Size(size.width() / 2, size.height() / 2));
|
| @@ -728,7 +726,7 @@ TEST_F(LayerTreeHostImplTest, ScrollDeltaRepeatedScrolls) {
|
| root_clip->test_properties()->AddChild(std::move(root_owned));
|
| root->SetBounds(gfx::Size(110, 110));
|
| root->SetScrollClipLayer(root_clip->id());
|
| - root->SetElementId(LayerIdToElementIdForTesting(root->id()));
|
| + root->SetElementId(root->id());
|
| root->layer_tree_impl()
|
| ->property_trees()
|
| ->scroll_tree.UpdateScrollOffsetBaseForTesting(root->id(), scroll_offset);
|
| @@ -771,7 +769,7 @@ TEST_F(LayerTreeHostImplTest, ScrollerSizeOfCCScrollingHistogramRecordingTest) {
|
| child_clip->SetBounds(gfx::Size(100, 100));
|
|
|
| child->SetScrollClipLayer(child_clip->id());
|
| - child->SetElementId(LayerIdToElementIdForTesting(child->id()));
|
| + child->SetElementId(child->id());
|
| child->SetBounds(gfx::Size(100, 400));
|
| child->SetPosition(gfx::PointF());
|
| child->SetDrawsContent(true);
|
| @@ -1094,7 +1092,7 @@ TEST_F(LayerTreeHostImplTest, ScrollWithOverlappingNonScrollableLayer) {
|
| std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 3);
|
| scroll->SetBounds(scroll_content_size);
|
| scroll->SetScrollClipLayer(clip->id());
|
| - scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id()));
|
| + scroll->SetElementId(scroll->id());
|
| scroll->SetDrawsContent(true);
|
|
|
| std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar =
|
| @@ -1166,7 +1164,7 @@ TEST_F(LayerTreeHostImplTest, ScrolledOverlappingDrawnScrollbarLayer) {
|
| std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 3);
|
| scroll->SetBounds(scroll_content_size);
|
| scroll->SetScrollClipLayer(clip->id());
|
| - scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id()));
|
| + scroll->SetElementId(scroll->id());
|
| scroll->SetDrawsContent(true);
|
|
|
| std::unique_ptr<SolidColorScrollbarLayerImpl> drawn_scrollbar =
|
| @@ -1411,7 +1409,7 @@ TEST_F(LayerTreeHostImplTest, ScrollWithUserUnscrollableLayers) {
|
| overflow->SetBounds(overflow_size);
|
| overflow->SetScrollClipLayer(
|
| scroll_layer->test_properties()->parent->test_properties()->parent->id());
|
| - overflow->SetElementId(LayerIdToElementIdForTesting(overflow->id()));
|
| + overflow->SetElementId(overflow->id());
|
| overflow->layer_tree_impl()
|
| ->property_trees()
|
| ->scroll_tree.UpdateScrollOffsetBaseForTesting(overflow->id(),
|
| @@ -3374,7 +3372,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarRegistration) {
|
|
|
| // Check scrollbar registration on a sublayer.
|
| child->SetScrollClipLayer(child_clip->id());
|
| - child->SetElementId(LayerIdToElementIdForTesting(child->id()));
|
| + child->SetElementId(child->id());
|
| ElementId child_scroll_element_id = child->element_id();
|
| child_clip->test_properties()->AddChild(std::move(child));
|
| root_scroll->test_properties()->AddChild(std::move(child_clip));
|
| @@ -3950,7 +3948,7 @@ class MissingTextureAnimatingLayer : public DidDrawCheckLayer {
|
| tile_missing_(tile_missing),
|
| had_incomplete_tile_(had_incomplete_tile) {
|
| if (animating) {
|
| - this->SetElementId(LayerIdToElementIdForTesting(id));
|
| + this->SetElementId(id);
|
| AddAnimatedTransformToElementWithPlayer(this->element_id(), timeline,
|
| 10.0, 3, 0);
|
| }
|
| @@ -4266,7 +4264,7 @@ class LayerTreeHostImplBrowserControlsTest : public LayerTreeHostImplTest {
|
|
|
| root_clip->SetBounds(inner_viewport_size);
|
| root->SetScrollClipLayer(root_clip->id());
|
| - root->SetElementId(LayerIdToElementIdForTesting(root->id()));
|
| + root->SetElementId(root->id());
|
| root->SetBounds(outer_viewport_size);
|
| root->SetPosition(gfx::PointF());
|
| root->SetDrawsContent(false);
|
| @@ -4274,8 +4272,7 @@ class LayerTreeHostImplBrowserControlsTest : public LayerTreeHostImplTest {
|
| root->test_properties()->is_container_for_fixed_position_layers = true;
|
| outer_clip->SetBounds(outer_viewport_size);
|
| outer_scroll->SetScrollClipLayer(outer_clip->id());
|
| - outer_scroll->SetElementId(
|
| - LayerIdToElementIdForTesting(outer_scroll->id()));
|
| + outer_scroll->SetElementId(outer_scroll->id());
|
| outer_scroll->SetBounds(scroll_layer_size);
|
| outer_scroll->SetPosition(gfx::PointF());
|
| outer_scroll->SetDrawsContent(false);
|
| @@ -4626,7 +4623,7 @@ TEST_F(LayerTreeHostImplBrowserControlsTest,
|
|
|
| child_clip->SetBounds(sub_content_layer_size);
|
| child->SetScrollClipLayer(child_clip->id());
|
| - child->SetElementId(LayerIdToElementIdForTesting(child->id()));
|
| + child->SetElementId(child->id());
|
| child->SetBounds(sub_content_size);
|
| child->SetPosition(gfx::PointF());
|
| child->SetDrawsContent(true);
|
| @@ -5175,7 +5172,7 @@ TEST_F(LayerTreeHostImplTest, ScrollNonCompositedRoot) {
|
| std::unique_ptr<LayerImpl> scroll_layer =
|
| LayerImpl::Create(host_impl_->active_tree(), 12);
|
| scroll_layer->SetScrollClipLayer(scroll_clip_layer->id());
|
| - scroll_layer->SetElementId(LayerIdToElementIdForTesting(scroll_layer->id()));
|
| + scroll_layer->SetElementId(scroll_layer->id());
|
| scroll_layer->SetBounds(contents_size);
|
| scroll_layer->SetPosition(gfx::PointF());
|
| scroll_layer->test_properties()->AddChild(std::move(content_layer));
|
| @@ -6807,7 +6804,7 @@ TEST_F(LayerTreeHostImplTest, ScrollFromOuterViewportSibling) {
|
| std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11);
|
| scroll->SetBounds(gfx::Size(400, 400));
|
| scroll->SetScrollClipLayer(clip->id());
|
| - scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id()));
|
| + scroll->SetElementId(scroll->id());
|
| scroll->SetDrawsContent(true);
|
|
|
| scroll_layer = scroll.get();
|
| @@ -6898,7 +6895,7 @@ TEST_F(LayerTreeHostImplTest, ScrollChainingWithReplacedOuterViewport) {
|
| std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11);
|
| scroll->SetBounds(gfx::Size(400, 400));
|
| scroll->SetScrollClipLayer(clip->id());
|
| - scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id()));
|
| + scroll->SetElementId(scroll->id());
|
| scroll->SetDrawsContent(true);
|
|
|
| std::unique_ptr<LayerImpl> clip2 = LayerImpl::Create(layer_tree_impl, 12);
|
| @@ -6909,7 +6906,7 @@ TEST_F(LayerTreeHostImplTest, ScrollChainingWithReplacedOuterViewport) {
|
| std::unique_ptr<LayerImpl> scroll2 = LayerImpl::Create(layer_tree_impl, 13);
|
| scroll2->SetBounds(gfx::Size(500, 500));
|
| scroll2->SetScrollClipLayer(clip2->id());
|
| - scroll2->SetElementId(LayerIdToElementIdForTesting(scroll2->id()));
|
| + scroll2->SetElementId(scroll2->id());
|
| scroll2->SetDrawsContent(true);
|
|
|
| scroll_layer = scroll.get();
|
| @@ -7031,7 +7028,7 @@ TEST_F(LayerTreeHostImplTest, RootScrollerScrollNonDescendant) {
|
| std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11);
|
| scroll->SetBounds(gfx::Size(1200, 1200));
|
| scroll->SetScrollClipLayer(clip->id());
|
| - scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id()));
|
| + scroll->SetElementId(scroll->id());
|
| scroll->SetDrawsContent(true);
|
|
|
| outer_scroll_layer = scroll.get();
|
| @@ -7047,7 +7044,7 @@ TEST_F(LayerTreeHostImplTest, RootScrollerScrollNonDescendant) {
|
| std::unique_ptr<LayerImpl> scroll2 = LayerImpl::Create(layer_tree_impl, 15);
|
| scroll2->SetBounds(gfx::Size(1200, 1200));
|
| scroll2->SetScrollClipLayer(clip2->id());
|
| - scroll2->SetElementId(LayerIdToElementIdForTesting(scroll2->id()));
|
| + scroll2->SetElementId(scroll2->id());
|
| scroll2->SetDrawsContent(true);
|
|
|
| sibling_scroll_layer = scroll2.get();
|
| @@ -8385,8 +8382,7 @@ TEST_F(LayerTreeHostImplTest, FarAwayQuadsDontNeedAA) {
|
|
|
| gfx::ScrollOffset scroll_offset(100000, 0);
|
| scrolling_layer->SetScrollClipLayer(root->id());
|
| - scrolling_layer->SetElementId(
|
| - LayerIdToElementIdForTesting(scrolling_layer->id()));
|
| + scrolling_layer->SetElementId(scrolling_layer->id());
|
| host_impl_->pending_tree()->BuildPropertyTreesForTesting();
|
|
|
| scrolling_layer->layer_tree_impl()
|
| @@ -9838,7 +9834,7 @@ TEST_F(LayerTreeHostImplBrowserControlsTest,
|
| std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11);
|
| scroll->SetBounds(scroll_content_size);
|
| scroll->SetScrollClipLayer(clip->id());
|
| - scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id()));
|
| + scroll->SetElementId(scroll->id());
|
| scroll->SetDrawsContent(true);
|
|
|
| scroll_layer = scroll.get();
|
| @@ -9900,8 +9896,7 @@ class LayerTreeHostImplVirtualViewportTest : public LayerTreeHostImplTest {
|
| LayerImpl::Create(layer_tree_impl, kPageScaleLayerId);
|
|
|
| inner_scroll->SetScrollClipLayer(inner_clip->id());
|
| - inner_scroll->SetElementId(
|
| - LayerIdToElementIdForTesting(inner_scroll->id()));
|
| + inner_scroll->SetElementId(inner_scroll->id());
|
| inner_scroll->SetBounds(outer_viewport);
|
| inner_scroll->SetPosition(gfx::PointF());
|
|
|
| @@ -9914,8 +9909,7 @@ class LayerTreeHostImplVirtualViewportTest : public LayerTreeHostImplTest {
|
| std::unique_ptr<LayerImpl> outer_scroll =
|
| LayerImpl::Create(layer_tree_impl, kOuterViewportScrollLayerId);
|
| outer_scroll->SetScrollClipLayer(outer_clip->id());
|
| - outer_scroll->SetElementId(
|
| - LayerIdToElementIdForTesting(outer_scroll->id()));
|
| + outer_scroll->SetElementId(outer_scroll->id());
|
| outer_scroll->layer_tree_impl()
|
| ->property_trees()
|
| ->scroll_tree.UpdateScrollOffsetBaseForTesting(outer_scroll->id(),
|
| @@ -12178,7 +12172,7 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
| child->SetBounds(child_layer_size);
|
| child->SetDrawsContent(true);
|
| child->SetScrollClipLayer(child_clip_id);
|
| - child->SetElementId(LayerIdToElementIdForTesting(child->id()));
|
| + child->SetElementId(child->id());
|
| ElementId child_element_id = child->element_id();
|
|
|
| if (main_thread_scrolling) {
|
|
|