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

Unified Diff: cc/trees/layer_tree_host_impl.h

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_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 4f627938f2af7321d77daad126c5a45afe4f44d5..704eb1ab922b23afb610e540cb5b9dc5cacdc366 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -440,10 +440,12 @@ class CC_EXPORT LayerTreeHostImpl
virtual void CreatePendingTree();
virtual void ActivateSyncTree();
- // Shortcuts to layers on the active tree.
+ // Shortcuts to layers/nodes on the active tree.
LayerImpl* InnerViewportScrollLayer() const;
LayerImpl* OuterViewportScrollLayer() const;
- LayerImpl* CurrentlyScrollingLayer() const;
+ ScrollNode* OuterViewportScrollNode() const;
+ ScrollNode* CurrentlyScrollingNode();
+ const ScrollNode* CurrentlyScrollingNode() const;
bool scroll_affects_scroll_handler() const {
return scroll_affects_scroll_handler_;
@@ -655,7 +657,7 @@ class CC_EXPORT LayerTreeHostImpl
InputHandler::ScrollStatus ScrollBeginImpl(
ScrollState* scroll_state,
- LayerImpl* scrolling_layer_impl,
+ ScrollNode* scrolling_node,
InputHandler::ScrollInputType type);
bool IsInitialScrollHitTestReliable(LayerImpl* layer, const gfx::PointF&);
void DistributeScrollDelta(ScrollState* scroll_state);
@@ -674,7 +676,7 @@ class CC_EXPORT LayerTreeHostImpl
// the frame should be drawn.
DrawResult CalculateRenderPasses(FrameData* frame);
- void ClearCurrentlyScrollingLayer();
+ void ClearCurrentlyScrollingNode();
LayerImpl* FindScrollLayerForDeviceViewportPoint(
const gfx::PointF& device_viewport_point,
@@ -772,7 +774,7 @@ class CC_EXPORT LayerTreeHostImpl
gfx::Vector2dF accumulated_root_overscroll_;
bool pinch_gesture_active_;
- bool pinch_gesture_end_should_clear_scrolling_layer_;
+ bool pinch_gesture_end_should_clear_scrolling_node_;
std::unique_ptr<BrowserControlsOffsetManager>
browser_controls_offset_manager_;

Powered by Google App Engine
This is Rietveld 408576698