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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2495123002: Make all scrollable layers visible to hit testing. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/scroll_node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 1aad8e4acf9d0c2508c00c8a2f560735be0f0d1c..edfd5b0aeeea09e74d7d92ef3d91362070fd3ba4 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1887,16 +1887,15 @@ static void FindClosestMatchingLayer(const gfx::PointF& screen_space_point,
}
}
-static bool ScrollsOrScrollbarAnyDrawnRenderSurfaceLayerListMember(
- LayerImpl* layer) {
- return layer->scrolls_drawn_descendant() ||
+static bool IsScrollableOrDrawnScrollbarLayer(LayerImpl* layer) {
+ return layer->scrollable() ||
(layer->ToScrollbarLayer() &&
layer->is_drawn_render_surface_layer_list_member());
}
struct FindScrollingLayerOrScrollbarLayerFunctor {
bool operator()(LayerImpl* layer) const {
- return ScrollsOrScrollbarAnyDrawnRenderSurfaceLayerListMember(layer);
+ return IsScrollableOrDrawnScrollbarLayer(layer);
}
};
@@ -1913,7 +1912,7 @@ LayerTreeImpl::FindFirstScrollingLayerOrScrollbarLayerThatIsHitByPoint(
struct HitTestVisibleScrollableOrTouchableFunctor {
bool operator()(LayerImpl* layer) const {
return layer->is_drawn_render_surface_layer_list_member() ||
- ScrollsOrScrollbarAnyDrawnRenderSurfaceLayerListMember(layer) ||
+ IsScrollableOrDrawnScrollbarLayer(layer) ||
!layer->touch_event_handler_region().IsEmpty();
}
};
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/scroll_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698