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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11534024: Check whether a touch point hits touch event handler regions in root layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed extra qualification Created 8 years 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/layer_tree_host_common.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index f6b753915070bb426cf9fcb728db7a9f9d36ec29..f5ca6aa86132aadfe72eb4af65a1733f35aa7522 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -357,10 +357,13 @@ bool LayerTreeHostImpl::haveTouchEventHandlersAt(const gfx::Point& viewportPoint
// First find out which layer was hit from the saved list of visible layers
// in the most recent frame.
- LayerImpl* layerImplHitByPointInTouchHandlerRegion = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(deviceViewportPoint, m_renderSurfaceLayerList);
+ LayerImpl* layerImpl = LayerTreeHostCommon::findLayerThatIsHitByPoint(deviceViewportPoint, m_renderSurfaceLayerList);
- if (layerImplHitByPointInTouchHandlerRegion)
- return true;
+ // Walk up the hierarchy and look for a layer with a touch event handler region that the given point hits.
+ for (; layerImpl; layerImpl = layerImpl->parent()) {
+ if (LayerTreeHostCommon::layerHasTouchEventHandlersAt(deviceViewportPoint,layerImpl))
+ return true;
+ }
return false;
}
« no previous file with comments | « cc/layer_tree_host_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698