Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index d8b021a0ba9c3260278bea282a0dbf8cd8d011b3..12cbe1ef5061aa49cf6b3f858c40814876b94d6e 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -436,21 +436,11 @@ bool LayerTreeHostImpl::HaveTouchEventHandlersAt(gfx::Point viewport_point) { |
gfx::PointF device_viewport_point = |
gfx::ScalePoint(viewport_point, device_scale_factor_); |
- // First find out which layer was hit from the saved list of visible layers |
- // in the most recent frame. |
- LayerImpl* layer_impl = LayerTreeHostCommon::FindLayerThatIsHitByPoint( |
- device_viewport_point, |
- active_tree_->RenderSurfaceLayerList()); |
- |
- // Walk up the hierarchy and look for a layer with a touch event handler |
- // region that the given point hits. |
- for (; layer_impl; layer_impl = layer_impl->parent()) { |
- if (LayerTreeHostCommon::LayerHasTouchEventHandlersAt(device_viewport_point, |
- layer_impl)) |
- return true; |
- } |
- |
- return false; |
+ LayerImpl* layer_impl = |
+ LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion( |
+ device_viewport_point, |
+ active_tree_->RenderSurfaceLayerList()); |
+ return layer_impl != NULL; |
} |
void LayerTreeHostImpl::SetLatencyInfoForInputEvent( |