Index: ui/events/blink/web_input_event_builders_win.cc |
diff --git a/ui/events/blink/web_input_event_builders_win.cc b/ui/events/blink/web_input_event_builders_win.cc |
index 48d4a2d69de1a85bb44b24785b7c910a0a20ec67..ce4390c1f588d27b34f0294a09092c3230fd507e 100644 |
--- a/ui/events/blink/web_input_event_builders_win.cc |
+++ b/ui/events/blink/web_input_event_builders_win.cc |
@@ -170,18 +170,18 @@ WebMouseEvent WebMouseEventBuilder::Build( |
result.id = ui::PointerEvent::kMousePointerId; |
// set position fields: |
- result.x = static_cast<short>(LOWORD(lparam)); |
- result.y = static_cast<short>(HIWORD(lparam)); |
+ result.position.x = static_cast<short>(LOWORD(lparam)); |
+ result.position.y = static_cast<short>(HIWORD(lparam)); |
- POINT global_point = {result.x, result.y}; |
+ POINT global_point = {result.position.x, result.position.y}; |
ClientToScreen(hwnd, &global_point); |
// We need to convert the global point back to DIP before using it. |
gfx::Point dip_global_point = display::win::ScreenWin::ScreenToDIPPoint( |
gfx::Point(global_point.x, global_point.y)); |
- result.globalX = dip_global_point.x(); |
- result.globalY = dip_global_point.y(); |
+ result.screenPosition.x = dip_global_point.x(); |
+ result.screenPosition.y = dip_global_point.y(); |
// calculate number of clicks: |
@@ -193,9 +193,9 @@ WebMouseEvent WebMouseEventBuilder::Build( |
double current_time = result.timeStampSeconds(); |
bool cancel_previous_click = |
- (abs(last_click_position_x - result.x) > |
+ (abs(last_click_position_x - result.position.x) > |
(::GetSystemMetrics(SM_CXDOUBLECLK) / 2)) || |
- (abs(last_click_position_y - result.y) > |
+ (abs(last_click_position_y - result.position.y) > |
(::GetSystemMetrics(SM_CYDOUBLECLK) / 2)) || |
((current_time - g_last_click_time) * 1000.0 > ::GetDoubleClickTime()); |
@@ -204,8 +204,8 @@ WebMouseEvent WebMouseEventBuilder::Build( |
++g_last_click_count; |
} else { |
g_last_click_count = 1; |
- last_click_position_x = result.x; |
- last_click_position_y = result.y; |
+ last_click_position_x = result.position.x; |
+ last_click_position_y = result.position.y; |
} |
g_last_click_time = current_time; |
last_click_button = result.button; |
@@ -259,8 +259,8 @@ WebMouseWheelEvent WebMouseWheelEventBuilder::Build( |
POINT cursor_position = {0}; |
GetCursorPos(&cursor_position); |
- result.globalX = cursor_position.x; |
- result.globalY = cursor_position.y; |
+ result.screenPosition.x = cursor_position.x; |
+ result.screenPosition.y = cursor_position.y; |
switch (LOWORD(wparam)) { |
case SB_LINEUP: // == SB_LINELEFT |
@@ -288,8 +288,8 @@ WebMouseWheelEvent WebMouseWheelEventBuilder::Build( |
// Non-synthesized event; we can just read data off the event. |
key_state = GET_KEYSTATE_WPARAM(wparam); |
- result.globalX = static_cast<short>(LOWORD(lparam)); |
- result.globalY = static_cast<short>(HIWORD(lparam)); |
+ result.screenPosition.x = static_cast<short>(LOWORD(lparam)); |
+ result.screenPosition.y = static_cast<short>(HIWORD(lparam)); |
// Currently we leave hasPreciseScrollingDeltas false, even for trackpad |
// scrolls that generate WM_MOUSEWHEEL, since we don't have a good way to |
@@ -317,10 +317,10 @@ WebMouseWheelEvent WebMouseWheelEventBuilder::Build( |
result.setModifiers(modifiers); |
// Set coordinates by translating event coordinates from screen to client. |
- POINT client_point = {result.globalX, result.globalY}; |
+ POINT client_point = {result.screenPosition.x, result.screenPosition.y}; |
MapWindowPoints(0, hwnd, &client_point, 1); |
- result.x = client_point.x; |
- result.y = client_point.y; |
+ result.position.x = client_point.x; |
+ result.position.y = client_point.y; |
// Convert wheel delta amount to a number of pixels to scroll. |
// |