Index: content/browser/renderer_host/input/web_input_event_builders_win.cc |
diff --git a/content/browser/renderer_host/input/web_input_event_builders_win.cc b/content/browser/renderer_host/input/web_input_event_builders_win.cc |
index 831f4034b279f2187ac12f9473dba6ed56c025e9..30034ee0119c1585e79ab80bfbefce4bd5649bf1 100644 |
--- a/content/browser/renderer_host/input/web_input_event_builders_win.cc |
+++ b/content/browser/renderer_host/input/web_input_event_builders_win.cc |
@@ -251,24 +251,15 @@ WebMouseEvent WebMouseEventBuilder::Build(HWND hwnd, |
result.windowX = result.x; |
result.windowY = result.y; |
- // The mouse coordinates received here are device independent (DIPs). We need |
- // to convert them to physical coordinates before calling Windows APIs like |
- // ClientToScreen, etc. |
- gfx::Point scaled_screen_point(result.x, result.y); |
- scaled_screen_point = gfx::win::DIPToScreenPoint(scaled_screen_point); |
- |
- POINT global_point = { scaled_screen_point.x(), scaled_screen_point.y() }; |
+ POINT global_point = { result.x, result.y }; |
ClientToScreen(hwnd, &global_point); |
- scaled_screen_point.set_x(global_point.x); |
- scaled_screen_point.set_y(global_point.y); |
- |
- // We need to convert the point back to DIP before using it. |
- gfx::Point dip_screen_point = gfx::win::ScreenToDIPPoint( |
- scaled_screen_point); |
+ // We need to convert the global point back to DIP before using it. |
+ gfx::Point dip_global_point = gfx::win::ScreenToDIPPoint( |
+ gfx::Point(global_point.x, global_point.y)); |
- result.globalX = dip_screen_point.x(); |
- result.globalY = dip_screen_point.y(); |
+ result.globalX = dip_global_point.x(); |
+ result.globalY = dip_global_point.y(); |
// calculate number of clicks: |