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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 2836073003: Fix an interactive ui test (Closed)
Patch Set: Remove touch drag from the test Created 3 years, 8 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
« no previous file with comments | « ui/aura/test/ui_controls_factory_ozone.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 559c9524748a85e10b0cb0fc40780d28baeb5aef..6dca4671f0cb9701f2e0185cffb3501d06a9e476 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -309,11 +309,16 @@ ui::EventDispatchDetails WindowEventDispatcher::ProcessGestures(
if (!target)
return details;
+ WindowEventDispatcher* dispatcher = this;
for (const auto& event : gestures) {
- event->ConvertLocationToTarget(window(), target);
- details = DispatchEvent(target, event.get());
+ event->ConvertLocationToTarget(dispatcher->window(), target);
+ details = dispatcher->DispatchEvent(target, event.get());
if (details.dispatcher_destroyed || details.target_destroyed)
break;
+ // If the target window has moved off to a different WindowTreeHost, then
+ // reroute them to the right place.
+ if (!dispatcher->window()->Contains(target))
+ dispatcher = target->GetHost()->dispatcher();
sadrul 2017/04/27 02:33:31 We should no longer need this change. If you want
weidongg 2017/04/27 03:07:32 Sure, I could leave this file untouched, as Window
}
return details;
}
« no previous file with comments | « ui/aura/test/ui_controls_factory_ozone.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698