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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2479663002: Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Check for layerTreeView while setting handlers. Created 3 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
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 d7559a11a91ee6dac61611d01011bc95558e7ce8..d78c1693eb86fadd921c82a2cca5bc98930c8d71 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -610,8 +610,19 @@ LayerTreeHostImpl::EventListenerTypeForTouchStartAt(
LayerImpl* layer_impl =
active_tree_->FindLayerThatIsHitByPointInTouchHandlerRegion(
device_viewport_point);
- if (layer_impl == NULL)
+ if (layer_impl == NULL) {
+ // At present, TouchHandlerRegions are only set for LayerTrees serving the
+ // document's mainframe, i.e. LayerTrees that have a ViewPort defined. But
+ // subframes can still have touch handlers, so here we err on the side of
+ // caution and report a handler even if we don't know which layer it's on.
+ if ((active_tree_->event_listener_properties(
+ EventListenerClass::kTouchStartOrMove) ==
+ EventListenerProperties::kBlocking) &&
+ !active_tree_->OuterViewportScrollLayer()) {
+ return InputHandler::TouchStartEventListenerType::HANDLER;
+ }
return InputHandler::TouchStartEventListenerType::NO_HANDLER;
+ }
if (!CurrentlyScrollingLayer())
return InputHandler::TouchStartEventListenerType::HANDLER;
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | content/browser/site_per_process_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698