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

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_mac.mm

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Truncated to int on input, git cl format 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: content/browser/renderer_host/input/web_input_event_builders_mac.mm
diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac.mm b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
index d18a5ceba9e635b9560eb8f370d0a73ea172b107..1b2704227a1432d3fed6ca1c292b4a645ddff53e 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_mac.mm
+++ b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
@@ -507,10 +507,10 @@ blink::WebGestureEvent WebGestureEventBuilder::Build(NSEvent* event,
blink::WebMouseEvent temp;
SetWebEventLocationFromEventInView(&temp, event, view);
- result.x = temp.x;
- result.y = temp.y;
- result.globalX = temp.globalX;
- result.globalY = temp.globalY;
+ result.x = temp.positionInWidget().x;
dtapuska 2017/03/31 14:04:18 We should probably fix WebGestureEvent next eh?
mustaq 2017/03/31 15:50:31 Added a TODO in WebGestureEvent.h .
+ result.y = temp.positionInWidget().y;
+ result.globalX = temp.positionInScreen().x;
+ result.globalY = temp.positionInScreen().y;
result.setModifiers(ModifiersFromEvent(event));
result.setTimeStampSeconds([event timestamp]);

Powered by Google App Engine
This is Rietveld 408576698