Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Fixed compile failures. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..08af856aefc2e6c20c97536e95a6d90d4b4fcbec 100644
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
@@ -109,12 +109,12 @@ void updateWebMouseEventFromCoreMouseEvent(const MouseEvent& event,
event.absoluteLocation().y());
if (view)
pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);
- webEvent.globalX = event.screenX();
- webEvent.globalY = event.screenY();
+ webEvent.screenPosition.x = event.screenX();
+ webEvent.screenPosition.y = event.screenY();
IntPoint localPoint = convertAbsoluteLocationForLayoutObjectInt(
event.absoluteLocation(), layoutItem);
- webEvent.x = localPoint.x();
- webEvent.y = localPoint.y();
+ webEvent.position.x = localPoint.x();
+ webEvent.position.y = localPoint.y();
}
unsigned toWebInputEventModifierFrom(WebMouseEvent::Button button) {
@@ -198,8 +198,8 @@ WebMouseEventBuilder::WebMouseEventBuilder(const FrameViewBase* frameViewBase,
WebFloatPoint absoluteRootFrameLocation = positionInRootFrame();
IntPoint localPoint = roundedIntPoint(
layoutItem.absoluteToLocal(absoluteRootFrameLocation, UseTransforms));
- x = localPoint.x();
- y = localPoint.y();
+ position.x = localPoint.x();
+ position.y = localPoint.y();
return;
}
@@ -302,8 +302,8 @@ WebMouseEventBuilder::WebMouseEventBuilder(const FrameViewBase* frameViewBase,
if (view)
pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);
IntPoint screenPoint = roundedIntPoint(touch->screenLocation());
- globalX = screenPoint.x();
- globalY = screenPoint.y();
+ screenPosition.x = screenPoint.x();
+ screenPosition.y = screenPoint.y();
button = WebMouseEvent::Button::Left;
m_modifiers |= WebInputEvent::LeftButtonDown;
@@ -311,8 +311,8 @@ WebMouseEventBuilder::WebMouseEventBuilder(const FrameViewBase* frameViewBase,
IntPoint localPoint = convertAbsoluteLocationForLayoutObjectInt(
DoublePoint(touch->absoluteLocation()), layoutItem);
- x = localPoint.x();
- y = localPoint.y();
+ position.x = localPoint.x();
+ position.y = localPoint.y();
pointerType = WebPointerProperties::PointerType::Touch;
}

Powered by Google App Engine
This is Rietveld 408576698