Index: content/common/input/synthetic_web_input_event_builders.cc |
diff --git a/content/common/input/synthetic_web_input_event_builders.cc b/content/common/input/synthetic_web_input_event_builders.cc |
index cd8126838d737bbdfbe4cfde3c21a0c0b5243637..bf8c8668f9303b0dbc00a89038737f3da506ab59 100644 |
--- a/content/common/input/synthetic_web_input_event_builders.cc |
+++ b/content/common/input/synthetic_web_input_event_builders.cc |
@@ -35,8 +35,7 @@ WebMouseEvent SyntheticWebMouseEventBuilder::Build( |
DCHECK(WebInputEvent::isMouseEventType(type)); |
WebMouseEvent result(type, modifiers, |
ui::EventTimeStampToSeconds(ui::EventTimeForNow())); |
- result.x = window_x; |
- result.y = window_y; |
+ result.setPositionInWidget(window_x, window_y); |
result.setModifiers(modifiers); |
result.pointerType = pointer_type; |
result.id = ui::PointerEvent::kMousePointerId; |
@@ -71,10 +70,8 @@ WebMouseWheelEvent SyntheticWebMouseWheelEventBuilder::Build(float x, |
bool precise) { |
WebMouseWheelEvent result(WebInputEvent::MouseWheel, modifiers, |
ui::EventTimeStampToSeconds(ui::EventTimeForNow())); |
- result.globalX = global_x; |
- result.globalY = global_y; |
- result.x = x; |
- result.y = y; |
+ result.setPositionInScreen(global_x, global_y); |
+ result.setPositionInWidget(x, y); |
result.deltaX = dx; |
result.deltaY = dy; |
if (dx) |