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

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

Issue 2786693002: Add PointerDetails to ui::MouseEvent's constructors (Closed)
Patch Set: mouse constructor 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 | « no previous file | content/common/input/synthetic_web_input_event_builders.cc » ('j') | ui/events/event.h » ('J')
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 8ca01e06a3e1aa555a78b1c56e30888f6008877b..cc9d0ce5179a908a4fb5873da6388331333ac04d 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
@@ -149,16 +149,15 @@ void SyntheticGestureTargetAura::DispatchWebMouseEventToPlatform(
ui::EventType event_type =
WebMouseEventTypeToEventType(web_mouse_event.type());
int flags = WebEventModifiersToEventFlags(web_mouse_event.modifiers());
- ui::MouseEvent mouse_event(event_type, gfx::Point(), gfx::Point(),
- ui::EventTimeForNow(), flags, flags);
gfx::PointF location(web_mouse_event.x * device_scale_factor_,
web_mouse_event.y * device_scale_factor_);
+ ui::PointerDetails pointer_details(
+ WebMousePointerTypeToEventPointerType(web_mouse_event.pointerType));
+ ui::MouseEvent mouse_event(event_type, gfx::Point(), gfx::Point(),
+ ui::EventTimeForNow(), flags, flags,
+ pointer_details);
mouse_event.set_location_f(location);
mouse_event.set_root_location_f(location);
- ui::PointerDetails pointer_details = mouse_event.pointer_details();
- pointer_details.pointer_type =
- WebMousePointerTypeToEventPointerType(web_mouse_event.pointerType);
- mouse_event.set_pointer_details(pointer_details);
aura::Window* window = GetWindow();
mouse_event.ConvertLocationToTarget(window, window->GetRootWindow());
« no previous file with comments | « no previous file | content/common/input/synthetic_web_input_event_builders.cc » ('j') | ui/events/event.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698