| 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 c41f9e64ca2ea778fd52382cb9649c672c2c535f..46bbd56335f43d131dcd5d48afc2bfef2d8d0207 100644
|
| --- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
|
| +++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
|
| @@ -475,13 +475,13 @@ PlatformTouchEventBuilder::PlatformTouchEventBuilder(
|
| }
|
|
|
| static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(
|
| - const LayoutPoint& location,
|
| + const DoublePoint& location,
|
| const LayoutItem layoutItem) {
|
| return layoutItem.absoluteToLocal(FloatPoint(location), UseTransforms);
|
| }
|
|
|
| -static IntPoint convertAbsoluteLocationForLayoutObject(
|
| - const LayoutPoint& location,
|
| +static IntPoint convertAbsoluteLocationForLayoutObjectInt(
|
| + const DoublePoint& location,
|
| const LayoutItem layoutItem) {
|
| return roundedIntPoint(
|
| convertAbsoluteLocationForLayoutObjectFloat(location, layoutItem));
|
| @@ -500,15 +500,15 @@ static void updateWebMouseEventFromCoreMouseEvent(
|
| FrameView* view = widget ? toFrameView(widget->parent()) : 0;
|
| // TODO(bokan): If view == nullptr, pointInRootFrame will really be
|
| // pointInRootContent.
|
| - IntPoint pointInRootFrame = IntPoint(event.absoluteLocation().x().toInt(),
|
| - event.absoluteLocation().y().toInt());
|
| + IntPoint pointInRootFrame(event.absoluteLocation().x(),
|
| + event.absoluteLocation().y());
|
| if (view)
|
| pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);
|
| webEvent.globalX = event.screenX();
|
| webEvent.globalY = event.screenY();
|
| webEvent.windowX = pointInRootFrame.x();
|
| webEvent.windowY = pointInRootFrame.y();
|
| - IntPoint localPoint = convertAbsoluteLocationForLayoutObject(
|
| + IntPoint localPoint = convertAbsoluteLocationForLayoutObjectInt(
|
| event.absoluteLocation(), layoutItem);
|
| webEvent.x = localPoint.x();
|
| webEvent.y = localPoint.y();
|
| @@ -618,8 +618,8 @@ WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget,
|
| modifiers |= WebInputEvent::LeftButtonDown;
|
| clickCount = (type == MouseDown || type == MouseUp);
|
|
|
| - IntPoint localPoint = convertAbsoluteLocationForLayoutObject(
|
| - touch->absoluteLocation(), layoutItem);
|
| + IntPoint localPoint = convertAbsoluteLocationForLayoutObjectInt(
|
| + DoublePoint(touch->absoluteLocation()), layoutItem);
|
| x = localPoint.x();
|
| y = localPoint.y();
|
|
|
| @@ -684,7 +684,7 @@ static WebTouchPoint toWebTouchPoint(const Touch* touch,
|
| point.id = touch->identifier();
|
| point.screenPosition = touch->screenLocation();
|
| point.position = convertAbsoluteLocationForLayoutObjectFloat(
|
| - touch->absoluteLocation(), layoutItem);
|
| + DoublePoint(touch->absoluteLocation()), layoutItem);
|
| point.radiusX = touch->radiusX();
|
| point.radiusY = touch->radiusY();
|
| point.rotationAngle = touch->rotationAngle();
|
| @@ -811,7 +811,7 @@ WebGestureEventBuilder::WebGestureEventBuilder(const LayoutItem layoutItem,
|
|
|
| globalX = event.screenX();
|
| globalY = event.screenY();
|
| - IntPoint localPoint = convertAbsoluteLocationForLayoutObject(
|
| + IntPoint localPoint = convertAbsoluteLocationForLayoutObjectInt(
|
| event.absoluteLocation(), layoutItem);
|
| x = localPoint.x();
|
| y = localPoint.y();
|
|
|