Chromium Code Reviews| Index: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| index 64e1c16b9f72172561d84f1da9cb712e9c378fa6..3f86b069143db2eae640a3c85bb11aa27447f682 100644 |
| --- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| +++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| @@ -11,6 +11,7 @@ |
| #include "content/browser/renderer_host/ui_events_helper.h" |
| #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| #include "ui/aura/window.h" |
| +#include "ui/aura/window_event_dispatcher.h" |
| #include "ui/aura/window_tree_host.h" |
| #include "ui/events/event_processor.h" |
| #include "ui/events/event_utils.h" |
| @@ -34,8 +35,6 @@ void SyntheticGestureTargetAura::DispatchWebTouchEventToPlatform( |
| const ui::LatencyInfo& latency_info) { |
| TouchEventWithLatencyInfo touch_with_latency(web_touch, latency_info); |
| for (size_t i = 0; i < touch_with_latency.event.touchesLength; i++) { |
| - touch_with_latency.event.touches[i].position.x *= device_scale_factor_; |
| - touch_with_latency.event.touches[i].position.y *= device_scale_factor_; |
|
bokan
2016/08/25 12:36:51
Why did this get removed in the latest patch?
lanwei
2016/08/25 15:19:57
If we use local coordinates, then we will use even
bokan
2016/08/25 18:53:07
Hmm, in that case, why did we need this in the fir
|
| touch_with_latency.event.touches[i].radiusX *= device_scale_factor_; |
| touch_with_latency.event.touches[i].radiusY *= device_scale_factor_; |
| } |
| @@ -46,6 +45,11 @@ void SyntheticGestureTargetAura::DispatchWebTouchEventToPlatform( |
| aura::Window* window = GetWindow(); |
| aura::WindowTreeHost* host = window->GetHost(); |
| + |
| + // Synthetic touch events will be transformed here before being sent to the |
| + // EventProcessor, so they should not be transformed again later in |
| + // WindowEventDispatcher. |
| + host->dispatcher()->set_transform_events(false); |
| for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), |
| end = events.end(); iter != end; ++iter) { |
| (*iter)->ConvertLocationToTarget(window, host->window()); |