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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 2720183003: Track the currently scrolling ScrollNode instead of the scrolling layer (Closed)
Patch Set: Ali did forsee a use-after-free with no stable id Created 3 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 151eb260d54e9ea70c261fd9c6ffd53f3946aa5c..37cc9033003048f8f40a2965d28823a8015027b6 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -698,12 +698,12 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
BeginState(scroll_point).get(), InputHandler::TOUCHSCREEN);
EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD, status.thread);
impl->ScrollBy(UpdateState(gfx::Point(), scroll_amount_).get());
- LayerImpl* scrolling_layer = impl->CurrentlyScrollingLayer();
- CHECK(scrolling_layer);
+ auto* scrolling_node = impl->CurrentlyScrollingNode();
+ CHECK(scrolling_node);
impl->ScrollEnd(EndState().get());
- CHECK(!impl->CurrentlyScrollingLayer());
- EXPECT_EQ(scrolling_layer->id(),
- impl->active_tree()->LastScrolledLayerId());
+ CHECK(!impl->CurrentlyScrollingNode());
+ EXPECT_EQ(scrolling_node->id,
+ impl->active_tree()->LastScrolledScrollNodeIndex());
// Check the scroll is applied as a delta.
EXPECT_VECTOR_EQ(initial_offset_,

Powered by Google App Engine
This is Rietveld 408576698