| Index: cc/trees/layer_tree_impl.cc
|
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
|
| index d44aa67fefea548b7336ed830cc9d27c9471fd60..5cbadf7c5e65507cbc44b0a1dc1bc278ee791783 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,
|
|
|