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

Unified Diff: ui/events/event_processor.cc

Issue 2681613002: Avoid two targeting phases in aura client-lib and EventProcessor. (Closed)
Patch Set: comments Created 3 years, 10 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
« ui/aura/mus/window_tree_client.cc ('K') | « ui/aura/mus/window_tree_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_processor.cc
diff --git a/ui/events/event_processor.cc b/ui/events/event_processor.cc
index 61d2e72138a8dc51beb04f960b19197d715c750d..b01501024b6ecf44eba7c93b8c6b31969b4f4a18 100644
--- a/ui/events/event_processor.cc
+++ b/ui/events/event_processor.cc
@@ -26,8 +26,10 @@ EventDispatchDetails EventProcessor::OnEventFromSource(Event* event) {
}
OnEventProcessingStarted(event_to_dispatch);
- EventTarget* target = NULL;
- if (!event_to_dispatch->handled())
+ EventTarget* target = nullptr;
+ if (event->target())
+ target = event->target();
+ else if (!event_to_dispatch->handled())
target = targeter->FindTargetForEvent(root, event_to_dispatch);
sadrul 2017/02/08 00:24:38 We should move some code from above into here too.
EventDispatchDetails details;
« ui/aura/mus/window_tree_client.cc ('K') | « ui/aura/mus/window_tree_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698