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

Unified Diff: ui/events/blink/web_input_event.cc

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Fixed compile failures. Created 3 years, 9 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: ui/events/blink/web_input_event.cc
diff --git a/ui/events/blink/web_input_event.cc b/ui/events/blink/web_input_event.cc
index a059c383fb88e9e336805c896cf62e02cd0d8741..1f24bd10f1aea0a2a00eae58bc1a4d4029142fbc 100644
--- a/ui/events/blink/web_input_event.cc
+++ b/ui/events/blink/web_input_event.cc
@@ -235,8 +235,8 @@ blink::WebMouseEvent MakeWebMouseEvent(
#endif
// Replace the event's coordinate fields with translated position data from
// |event|.
- webkit_event.x = event.x();
- webkit_event.y = event.y();
+ webkit_event.position.x = event.x();
+ webkit_event.position.y = event.y();
#if defined(OS_WIN)
if (event.native_event().message)
@@ -245,8 +245,8 @@ blink::WebMouseEvent MakeWebMouseEvent(
const gfx::Point screen_point =
GetScreenLocationFromEvent(event, screen_location_callback);
- webkit_event.globalX = screen_point.x();
- webkit_event.globalY = screen_point.y();
+ webkit_event.screenPosition.x = screen_point.x();
+ webkit_event.screenPosition.y = screen_point.y();
return webkit_event;
}
@@ -271,13 +271,13 @@ blink::WebMouseWheelEvent MakeWebMouseWheelEvent(
// Replace the event's coordinate fields with translated position data from
// |event|.
- webkit_event.x = event.x();
- webkit_event.y = event.y();
+ webkit_event.position.x = event.x();
+ webkit_event.position.y = event.y();
const gfx::Point screen_point =
GetScreenLocationFromEvent(event, screen_location_callback);
- webkit_event.globalX = screen_point.x();
- webkit_event.globalY = screen_point.y();
+ webkit_event.screenPosition.x = screen_point.x();
+ webkit_event.screenPosition.y = screen_point.y();
return webkit_event;
}
@@ -302,13 +302,13 @@ blink::WebMouseWheelEvent MakeWebMouseWheelEvent(
// Replace the event's coordinate fields with translated position data from
// |event|.
- webkit_event.x = event.x();
- webkit_event.y = event.y();
+ webkit_event.position.x = event.x();
+ webkit_event.position.y = event.y();
const gfx::Point screen_point =
GetScreenLocationFromEvent(event, screen_location_callback);
- webkit_event.globalX = screen_point.x();
- webkit_event.globalY = screen_point.y();
+ webkit_event.screenPosition.x = screen_point.x();
+ webkit_event.screenPosition.y = screen_point.y();
return webkit_event;
}

Powered by Google App Engine
This is Rietveld 408576698