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

Unified Diff: content/renderer/render_widget_fullscreen_pepper.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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | content/shell/test_runner/event_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget_fullscreen_pepper.cc
diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc
index a13689de43f7c3fc7dabf1c8fb08d6dbb6ec4c28..686866c40ef5e06da8c83c9b3fd7bc1bcd906be4 100644
--- a/content/renderer/render_widget_fullscreen_pepper.cc
+++ b/content/renderer/render_widget_fullscreen_pepper.cc
@@ -100,10 +100,8 @@ WebMouseEvent WebMouseEventFromGestureEvent(const WebGestureEvent& gesture) {
mouse.clickCount = (mouse.type() == WebInputEvent::MouseDown ||
mouse.type() == WebInputEvent::MouseUp);
- mouse.x = gesture.x;
- mouse.y = gesture.y;
- mouse.globalX = gesture.globalX;
- mouse.globalY = gesture.globalY;
+ mouse.setPositionInWidget(gesture.x, gesture.y);
+ mouse.setPositionInScreen(gesture.globalX, gesture.globalY);
return mouse;
}
@@ -176,10 +174,9 @@ class PepperWidget : public WebWidget {
WebMouseEvent mouse(WebInputEvent::MouseMove,
gesture_event->modifiers(),
gesture_event->timeStampSeconds());
- mouse.x = gesture_event->x;
- mouse.y = gesture_event->y;
- mouse.globalX = gesture_event->globalX;
- mouse.globalY = gesture_event->globalY;
+ mouse.setPositionInWidget(gesture_event->x, gesture_event->y);
+ mouse.setPositionInScreen(gesture_event->globalX,
+ gesture_event->globalY);
mouse.movementX = 0;
mouse.movementY = 0;
result |= widget_->plugin()->HandleInputEvent(mouse, &cursor);
« no previous file with comments | « content/renderer/render_widget.cc ('k') | content/shell/test_runner/event_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698