summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_impl_unittest.cc
diff options
context:
space:
mode:
authorsunxd <sunxd@chromium.org>2016-02-16 14:08:30 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-16 22:09:43 +0000
commitd1abacf793cbbb9aaf35d82f0964aebe94dcefb8 (patch)
tree43570a56170f0b81a1e70ca06dbf761443faf3c6 /cc/trees/layer_tree_host_impl_unittest.cc
parent11fea2242b3a197993dbd5a1f977f9a31c6b98e4 (diff)
downloadchromium_src-d1abacf793cbbb9aaf35d82f0964aebe94dcefb8.zip
chromium_src-d1abacf793cbbb9aaf35d82f0964aebe94dcefb8.tar.gz
chromium_src-d1abacf793cbbb9aaf35d82f0964aebe94dcefb8.tar.bz2
cc: Move TryScroll from LayerImpl to LayerTreeHostImpl
After the move, FindScrollLayerForDeviceViewportPoint no longer depends on LayerImpl, it iterates completely on scroll tree now. BUG=568830 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1689293002 Cr-Commit-Position: refs/heads/master@{#375675}
Diffstat (limited to 'cc/trees/layer_tree_host_impl_unittest.cc')
-rw-r--r--cc/trees/layer_tree_host_impl_unittest.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index f2da25e..bb65c02 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -860,12 +860,14 @@ TEST_F(LayerTreeHostImplTest, FlingOnlyWhenScrollingTouchpad) {
TEST_F(LayerTreeHostImplTest, NoFlingWhenScrollingOnMain) {
SetupScrollAndContentsLayers(gfx::Size(100, 100));
host_impl_->SetViewportSize(gfx::Size(50, 50));
- DrawFrame();
LayerImpl* root = host_impl_->active_tree()->root_layer();
root->set_main_thread_scrolling_reasons(
MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
+ SetNeedsRebuildPropertyTrees();
+ DrawFrame();
+
// Start scrolling a layer
InputHandler::ScrollStatus status = host_impl_->ScrollBegin(
BeginState(gfx::Point()).get(), InputHandler::GESTURE);
@@ -883,11 +885,12 @@ TEST_F(LayerTreeHostImplTest, NoFlingWhenScrollingOnMain) {
TEST_F(LayerTreeHostImplTest, ShouldScrollOnMainThread) {
SetupScrollAndContentsLayers(gfx::Size(100, 100));
host_impl_->SetViewportSize(gfx::Size(50, 50));
- DrawFrame();
LayerImpl* root = host_impl_->active_tree()->root_layer();
root->set_main_thread_scrolling_reasons(
MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
+ SetNeedsRebuildPropertyTrees();
+ DrawFrame();
InputHandler::ScrollStatus status = host_impl_->ScrollBegin(
BeginState(gfx::Point()).get(), InputHandler::WHEEL);
@@ -909,6 +912,7 @@ TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionBasic) {
LayerImpl* root = host_impl_->active_tree()->root_layer();
root->SetNonFastScrollableRegion(gfx::Rect(0, 0, 50, 50));
+ SetNeedsRebuildPropertyTrees();
DrawFrame();
// All scroll types inside the non-fast scrollable region should fail.
@@ -966,6 +970,7 @@ TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionWithOffset) {
root->SetPosition(gfx::PointF(-25.f, 0.f));
root->SetDrawsContent(true);
+ SetNeedsRebuildPropertyTrees();
DrawFrame();
// This point would fall into the non-fast scrollable region except that we've