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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1639363002: Move have_wheel_event_handlers to WebLayerTreeView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove blank line Created 4 years, 11 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
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/renderer/gpu/render_widget_compositor.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 753d171ab5bdaee4a4255c9cbbdfb258fec075c6..9bcd7456ed502cc6dd48279caaab17d9b6b0f327 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -85,6 +85,7 @@ LayerTreeImpl::LayerTreeImpl(
next_activation_forces_redraw_(false),
has_ever_been_drawn_(false),
render_surface_layer_list_id_(0),
+ have_wheel_event_handlers_(false),
top_controls_shrink_blink_size_(false),
top_controls_height_(0),
top_controls_shown_ratio_(top_controls_shown_ratio) {}
@@ -354,6 +355,7 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->set_source_frame_number(source_frame_number());
target_tree->set_background_color(background_color());
target_tree->set_has_transparent_background(has_transparent_background());
+ target_tree->set_have_wheel_event_handlers(have_wheel_event_handlers());
if (ViewportSizeInvalid())
target_tree->SetViewportSizeInvalid();
@@ -1699,7 +1701,7 @@ struct HitTestVisibleScrollableOrTouchableFunctor {
return layer->IsDrawnRenderSurfaceLayerListMember() ||
ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) ||
!layer->touch_event_handler_region().IsEmpty() ||
- layer->have_wheel_event_handlers();
+ layer->layer_tree_impl()->have_wheel_event_handlers();
}
};
@@ -1745,29 +1747,6 @@ static bool LayerHasTouchEventHandlersAt(const gfx::PointF& screen_space_point,
return true;
}
-struct FindWheelEventLayerFunctor {
- bool operator()(LayerImpl* layer) const {
- return layer->have_wheel_event_handlers();
- }
-};
-
-LayerImpl* LayerTreeImpl::FindLayerWithWheelHandlerThatIsHitByPoint(
- const gfx::PointF& screen_space_point) {
- if (!root_layer())
- return NULL;
- bool update_lcd_text = false;
- if (!UpdateDrawProperties(update_lcd_text))
- return NULL;
- bool use_property_trees =
- settings().use_property_trees || settings().verify_property_trees;
- FindWheelEventLayerFunctor func;
- FindClosestMatchingLayerDataForRecursion data_for_recursion;
- FindClosestMatchingLayer(
- screen_space_point, root_layer(), func, property_trees_.transform_tree,
- property_trees_.clip_tree, use_property_trees, &data_for_recursion);
- return data_for_recursion.closest_match;
-}
-
struct FindTouchEventLayerFunctor {
bool operator()(LayerImpl* layer) const {
return LayerHasTouchEventHandlersAt(screen_space_point, layer,
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698