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

Unified Diff: third_party/WebKit/Source/core/input/MouseEventManager.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/core/input/MouseEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index d6af4c624f760dfddd6bdcde4c30b852e694082c..3417da2a7dd93f0a13ac553cb74f8845ecdec7aa 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -529,7 +529,8 @@ IntPoint MouseEventManager::lastKnownMousePosition() {
void MouseEventManager::setLastKnownMousePosition(const WebMouseEvent& event) {
m_isMousePositionUnknown = false;
m_lastKnownMousePosition = flooredIntPoint(event.positionInRootFrame());
- m_lastKnownMouseGlobalPosition = IntPoint(event.globalX, event.globalY);
+ m_lastKnownMouseGlobalPosition =
+ IntPoint(event.positionInScreen().x, event.positionInScreen().y);
}
void MouseEventManager::dispatchFakeMouseMoveEventSoon() {
@@ -906,8 +907,9 @@ WebInputEventResult MouseEventManager::dispatchDragEvent(
IntPoint movement = flooredIntPoint(event.movementInRootFrame());
DragEvent* me = DragEvent::create(
eventType, true, cancelable, m_frame->document()->domWindow(), 0,
- event.globalX, event.globalY, position.x(), position.y(), movement.x(),
- movement.y(), static_cast<WebInputEvent::Modifiers>(event.modifiers()), 0,
+ event.positionInScreen().x, event.positionInScreen().y, position.x(),
+ position.y(), movement.x(), movement.y(),
+ static_cast<WebInputEvent::Modifiers>(event.modifiers()), 0,
MouseEvent::webInputEventModifiersToButtons(event.modifiers()), nullptr,
TimeTicks::FromSeconds(event.timeStampSeconds()), dataTransfer,
event.fromTouch() ? MouseEvent::FromTouch
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlerTest.cpp ('k') | third_party/WebKit/Source/platform/WebMouseEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698