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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm 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
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..31967688868f4c31043a432a28b6e921715bed48 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
@@ -70,8 +70,8 @@ void SyntheticGestureTargetAura::DispatchWebMouseWheelEventToPlatform(
ui::MouseWheelEvent wheel_event(
gfx::Vector2d(web_wheel.deltaX, web_wheel.deltaY), gfx::Point(),
gfx::Point(), ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
- gfx::PointF location(web_wheel.x * device_scale_factor_,
- web_wheel.y * device_scale_factor_);
+ gfx::PointF location(web_wheel.positionInWidget().x * device_scale_factor_,
+ web_wheel.positionInWidget().y * device_scale_factor_);
wheel_event.set_location_f(location);
wheel_event.set_root_location_f(location);
@@ -151,8 +151,9 @@ void SyntheticGestureTargetAura::DispatchWebMouseEventToPlatform(
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_);
+ gfx::PointF location(
+ web_mouse_event.positionInWidget().x * device_scale_factor_,
+ web_mouse_event.positionInWidget().y * device_scale_factor_);
mouse_event.set_location_f(location);
mouse_event.set_root_location_f(location);
ui::PointerDetails pointer_details = mouse_event.pointer_details();

Powered by Google App Engine
This is Rietveld 408576698