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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 469523003: Add the actual location coordinates to the touch cancel event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change after removing the old gesture Created 6 years, 4 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: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 7b40c71a06e473df88478d3fc1641b00d402875e..bb47856a8969784d36bd25cb7aa0a5d7b73b3e6b 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -140,7 +140,6 @@ void WindowEventDispatcher::DispatchGestureEvent(ui::GestureEvent* event) {
DispatchDetails details = DispatchHeldEvents();
if (details.dispatcher_destroyed)
return;
-
Window* target = GetGestureTarget(event);
if (target) {
event->ConvertLocationToTarget(window(), target);
@@ -437,10 +436,7 @@ void WindowEventDispatcher::PrepareEventForDispatch(ui::Event* event) {
// coordinate system to |window()|'s coordinate system.
return;
}
- if (event->IsMouseEvent() ||
- event->IsScrollEvent() ||
- event->IsTouchEvent() ||
- event->IsGestureEvent()) {
+ if (event->IsLocatedEvent() && event->HasNativeEvent()) {
TransformEventForDeviceScaleFactor(static_cast<ui::LocatedEvent*>(event));
}
}

Powered by Google App Engine
This is Rietveld 408576698