Index: ui/aura/window_event_dispatcher.cc |
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc |
index 350066f7dd31e9e08c9ca72bf5f77377ab547e3e..6b36198ead19f98b77f09f89a341e3afcebfb81a 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); |
@@ -530,6 +529,11 @@ bool WindowEventDispatcher::CanDispatchToConsumer( |
} |
void WindowEventDispatcher::DispatchCancelTouchEvent(ui::TouchEvent* event) { |
+ // We observe that the cancel touch event's location got scale twice, |
+ // because the location we use to create the touch cancel event |
+ // is already scaled, and we scale it again in the PrepareEventForDispatch |
+ // function. Thus, we revert the location back in the below function. |
tdresser
2014/08/15 14:22:04
I think this could be a bit clearer. The key thing
sadrul
2014/08/15 16:10:43
What if you we don't transform the event in Window
tdresser
2014/08/15 16:48:44
Yeah, that sounds reasonable.
lanwei
2014/08/15 17:09:28
This is a very good suggestion, I will give it a t
lanwei
2014/08/27 03:54:03
Done.
|
+ event->UpdateForRootTransform(host_->GetRootTransform()); |
DispatchDetails details = OnEventFromSource(event); |
if (details.dispatcher_destroyed) |
return; |