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

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

Issue 2734583002: Do not ignore SolidColorScrollbarLayer's scroll_layer_id ctor argument (Closed)
Patch Set: Created 3 years, 9 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 scroll_clip_layer->SetBounds( 347 scroll_clip_layer->SetBounds(
348 gfx::Size(content_layer_->bounds().width() - 30, 348 gfx::Size(content_layer_->bounds().width() - 30,
349 content_layer_->bounds().height() - 50)); 349 content_layer_->bounds().height() - 50));
350 scroll_clip_layer->AddChild(content_layer_); 350 scroll_clip_layer->AddChild(content_layer_);
351 root_layer->AddChild(scroll_clip_layer); 351 root_layer->AddChild(scroll_clip_layer);
352 352
353 scoped_refptr<Layer> scrollbar_layer = 353 scoped_refptr<Layer> scrollbar_layer =
354 FakePaintedScrollbarLayer::Create(false, true, content_layer_->id()); 354 FakePaintedScrollbarLayer::Create(false, true, content_layer_->id());
355 scrollbar_layer->SetPosition(gfx::PointF(300.f, 300.f)); 355 scrollbar_layer->SetPosition(gfx::PointF(300.f, 300.f));
356 scrollbar_layer->SetBounds(gfx::Size(10, 100)); 356 scrollbar_layer->SetBounds(gfx::Size(10, 100));
357 scrollbar_layer->ToScrollbarLayer()->SetScrollLayer(content_layer_->id());
358 root_layer->AddChild(scrollbar_layer); 357 root_layer->AddChild(scrollbar_layer);
359 358
360 gfx::RectF content_rect(content_layer_->position(), 359 gfx::RectF content_rect(content_layer_->position(),
361 gfx::SizeF(content_layer_->bounds())); 360 gfx::SizeF(content_layer_->bounds()));
362 gfx::RectF scrollbar_rect(scrollbar_layer->position(), 361 gfx::RectF scrollbar_rect(scrollbar_layer->position(),
363 gfx::SizeF(scrollbar_layer->bounds())); 362 gfx::SizeF(scrollbar_layer->bounds()));
364 EXPECT_FALSE(content_rect.Intersects(scrollbar_rect)); 363 EXPECT_FALSE(content_rect.Intersects(scrollbar_rect));
365 364
366 LayerTreeHostDamageTest::SetupTree(); 365 LayerTreeHostDamageTest::SetupTree();
367 client_.set_bounds(root_layer->bounds()); 366 client_.set_bounds(root_layer->bounds());
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 525
527 void AfterTest() override { EXPECT_EQ(3, num_draws_); } 526 void AfterTest() override { EXPECT_EQ(3, num_draws_); }
528 527
529 int num_draws_; 528 int num_draws_;
530 }; 529 };
531 530
532 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage); 531 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage);
533 532
534 } // namespace 533 } // namespace
535 } // namespace cc 534 } // namespace cc
OLDNEW
« cc/layers/solid_color_scrollbar_layer.cc ('K') | « cc/layers/solid_color_scrollbar_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698