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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 1675963002: Move MaxScrollOffset to property_trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply comments. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host_unittest_scroll.cc
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index 0c499773a00927a95844abfd7824773d0c17095f..a5eb0986f446272230b311e02cb31189e11e09d3 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -1035,6 +1035,8 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
// Set max_scroll_offset = (100, 100).
scroll_layer->SetBounds(
gfx::Size(root->bounds().width() + 100, root->bounds().height() + 100));
+ impl->active_tree()->property_trees()->needs_rebuild = true;
+ impl->active_tree()->BuildPropertyTreesForTesting();
InputHandler::ScrollStatus status = scroll_layer->TryScroll(
gfx::PointF(0.0f, 1.0f), InputHandler::GESTURE);
@@ -1045,6 +1047,8 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
// Set max_scroll_offset = (0, 0).
scroll_layer->SetBounds(root->bounds());
+ impl->active_tree()->property_trees()->needs_rebuild = true;
+ impl->active_tree()->BuildPropertyTreesForTesting();
status = scroll_layer->TryScroll(
gfx::PointF(0.0f, 1.0f), InputHandler::GESTURE);
EXPECT_EQ(InputHandler::SCROLL_IGNORED, status.thread);
@@ -1053,6 +1057,8 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
// Set max_scroll_offset = (-100, -100).
scroll_layer->SetBounds(gfx::Size());
+ impl->active_tree()->property_trees()->needs_rebuild = true;
+ impl->active_tree()->BuildPropertyTreesForTesting();
status = scroll_layer->TryScroll(
gfx::PointF(0.0f, 1.0f), InputHandler::GESTURE);
EXPECT_EQ(InputHandler::SCROLL_IGNORED, status.thread);

Powered by Google App Engine
This is Rietveld 408576698