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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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 994ca0144d36c2cc0ae155f6199deaf143d4eb27..a8ddf4b8f731c76c4f61d4c4c005b1070dd9f131 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) {
@@ -199,8 +197,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;
}
@@ -315,8 +312,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;
@@ -324,8 +320,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;
}
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698