Index: third_party/WebKit/Source/web/WebInputEventConversion.cpp |
diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
index fc4ec0a67e75313476dc50526a908d1fa0597b36..5d626d7c8c1e9a4eafa77b83e879eae2922965b6 100644 |
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
@@ -109,12 +109,10 @@ void updateWebMouseEventFromCoreMouseEvent(const MouseEvent& event, |
event.absoluteLocation().y()); |
if (view) |
pointInRootFrame = view->contentsToRootFrame(pointInRootFrame); |
- webEvent.globalX = event.screenX(); |
- webEvent.globalY = event.screenY(); |
+ webEvent.setPositionInScreen(event.screenX(), event.screenY()); |
IntPoint localPoint = convertAbsoluteLocationForLayoutObjectInt( |
event.absoluteLocation(), layoutItem); |
- webEvent.x = localPoint.x(); |
- webEvent.y = localPoint.y(); |
+ webEvent.setPositionInWidget(localPoint.x(), localPoint.y()); |
} |
unsigned toWebInputEventModifierFrom(WebMouseEvent::Button button) { |
@@ -198,8 +196,7 @@ WebMouseEventBuilder::WebMouseEventBuilder(const FrameViewBase* frameViewBase, |
WebFloatPoint absoluteRootFrameLocation = positionInRootFrame(); |
IntPoint localPoint = roundedIntPoint( |
layoutItem.absoluteToLocal(absoluteRootFrameLocation, UseTransforms)); |
- x = localPoint.x(); |
- y = localPoint.y(); |
+ setPositionInWidget(localPoint.x(), localPoint.y()); |
return; |
} |
@@ -302,8 +299,7 @@ WebMouseEventBuilder::WebMouseEventBuilder(const FrameViewBase* frameViewBase, |
if (view) |
pointInRootFrame = view->contentsToRootFrame(pointInRootFrame); |
IntPoint screenPoint = roundedIntPoint(touch->screenLocation()); |
- globalX = screenPoint.x(); |
- globalY = screenPoint.y(); |
+ setPositionInScreen(screenPoint.x(), screenPoint.y()); |
button = WebMouseEvent::Button::Left; |
m_modifiers |= WebInputEvent::LeftButtonDown; |
@@ -311,8 +307,7 @@ WebMouseEventBuilder::WebMouseEventBuilder(const FrameViewBase* frameViewBase, |
IntPoint localPoint = convertAbsoluteLocationForLayoutObjectInt( |
DoublePoint(touch->absoluteLocation()), layoutItem); |
- x = localPoint.x(); |
- y = localPoint.y(); |
+ setPositionInWidget(localPoint.x(), localPoint.y()); |
pointerType = WebPointerProperties::PointerType::Touch; |
} |