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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc

Issue 2269483002: Set the coordinates of the synthetic touch event correctly in SyntheticGestureTargetAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698