Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: cc/trees/layer_tree_host_unittest_damage.cc

Issue 2827163005: Remove scroll layer ids from scrollbar layers (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 content_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20)); 346 content_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20));
347 content_layer_->SetBounds(gfx::Size(100, 200)); 347 content_layer_->SetBounds(gfx::Size(100, 200));
348 content_layer_->SetIsDrawable(true); 348 content_layer_->SetIsDrawable(true);
349 scroll_clip_layer->SetBounds( 349 scroll_clip_layer->SetBounds(
350 gfx::Size(content_layer_->bounds().width() - 30, 350 gfx::Size(content_layer_->bounds().width() - 30,
351 content_layer_->bounds().height() - 50)); 351 content_layer_->bounds().height() - 50));
352 scroll_clip_layer->AddChild(content_layer_); 352 scroll_clip_layer->AddChild(content_layer_);
353 root_layer->AddChild(scroll_clip_layer); 353 root_layer->AddChild(scroll_clip_layer);
354 354
355 scoped_refptr<Layer> scrollbar_layer = FakePaintedScrollbarLayer::Create( 355 scoped_refptr<Layer> scrollbar_layer = FakePaintedScrollbarLayer::Create(
356 false, true, content_layer_->id(), content_layer_->element_id()); 356 false, true, content_layer_->element_id());
357 scrollbar_layer->SetPosition(gfx::PointF(300.f, 300.f)); 357 scrollbar_layer->SetPosition(gfx::PointF(300.f, 300.f));
358 scrollbar_layer->SetBounds(gfx::Size(10, 100)); 358 scrollbar_layer->SetBounds(gfx::Size(10, 100));
359 root_layer->AddChild(scrollbar_layer); 359 root_layer->AddChild(scrollbar_layer);
360 360
361 gfx::RectF content_rect(content_layer_->position(), 361 gfx::RectF content_rect(content_layer_->position(),
362 gfx::SizeF(content_layer_->bounds())); 362 gfx::SizeF(content_layer_->bounds()));
363 gfx::RectF scrollbar_rect(scrollbar_layer->position(), 363 gfx::RectF scrollbar_rect(scrollbar_layer->position(),
364 gfx::SizeF(scrollbar_layer->bounds())); 364 gfx::SizeF(scrollbar_layer->bounds()));
365 EXPECT_FALSE(content_rect.Intersects(scrollbar_rect)); 365 EXPECT_FALSE(content_rect.Intersects(scrollbar_rect));
366 366
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 528
529 void AfterTest() override { EXPECT_EQ(3, num_draws_); } 529 void AfterTest() override { EXPECT_EQ(3, num_draws_); }
530 530
531 int num_draws_; 531 int num_draws_;
532 }; 532 };
533 533
534 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage); 534 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage);
535 535
536 } // namespace 536 } // namespace
537 } // namespace cc 537 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698