Changes event-root to deliver-events-to-parent
Again, this is a bit of experimentation, hence no documentation.
R=erg@chromium.org
Review URL: https://codereview.chromium.org/909913004
diff --git a/services/view_manager/connection_manager.cc b/services/view_manager/connection_manager.cc
index d8388a4..ce2bb9c 100644
--- a/services/view_manager/connection_manager.cc
+++ b/services/view_manager/connection_manager.cc
@@ -449,11 +449,6 @@
const ViewId view_id(ViewIdFromTransportId(transport_view_id));
ViewManagerServiceImpl* connection = GetConnectionWithRoot(view_id);
- // We only allow the connection that created a view to set properties on it.
- // If the connection set 'event-root', then the connection wants the event and
- // not any views that are embedded in it.
- if (connection && GetView(view_id)->properties().count("event-root") > 0)
- connection = nullptr;
if (!connection)
connection = GetConnection(view_id.connection_id);
if (connection) {
diff --git a/services/window_manager/view_targeter.cc b/services/window_manager/view_targeter.cc
index b699277..212f0d3 100644
--- a/services/window_manager/view_targeter.cc
+++ b/services/window_manager/view_targeter.cc
@@ -42,8 +42,6 @@
return target;
}
}
- if (view->view()->shared_properties().count("event-root"))
- return view;
return EventTargeter::FindTargetForLocatedEvent(view, event);
}
@@ -58,6 +56,11 @@
// we have a check here about
// WindowDelegate::ShouldDescendIntoChildForEventHandling().
+ // TODO(sky): decide if we really want this. If we do, it should be a public
+ // constant and documented.
+ if (view->view()->shared_properties().count("deliver-events-to-parent"))
+ return false;
+
return true;
}