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

Unified Diff: third_party/WebKit/Source/core/events/MouseEvent.cpp

Issue 2406263003: Make PointerEvent coordinates fractional for touch (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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/events/MouseEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MouseEvent.cpp b/third_party/WebKit/Source/core/events/MouseEvent.cpp
index 95a5fa5f6dddf18fa88217c3569e0cc05ff53f0a..1879fb075c3311a9dbb1d631a70183db6f5b861e 100644
--- a/third_party/WebKit/Source/core/events/MouseEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MouseEvent.cpp
@@ -104,8 +104,8 @@ MouseEvent* MouseEvent::create(const AtomicString& eventType,
if (underlyingEvent && underlyingEvent->isMouseEvent()) {
syntheticType = PlatformMouseEvent::RealOrIndistinguishable;
MouseEvent* mouseEvent = toMouseEvent(underlyingEvent);
- screenX = mouseEvent->screenLocation().x();
- screenY = mouseEvent->screenLocation().y();
+ screenX = mouseEvent->screenX();
+ screenY = mouseEvent->screenY();
}
double timestamp = underlyingEvent ? underlyingEvent->platformTimeStamp()
@@ -119,7 +119,7 @@ MouseEvent* MouseEvent::create(const AtomicString& eventType,
createdEvent->setUnderlyingEvent(underlyingEvent);
if (syntheticType == PlatformMouseEvent::RealOrIndistinguishable) {
MouseEvent* mouseEvent = toMouseEvent(createdEvent->underlyingEvent());
- createdEvent->initCoordinates(mouseEvent->clientLocation());
+ createdEvent->initCoordinates(mouseEvent->clientX(), mouseEvent->clientY());
}
return createdEvent;
@@ -258,7 +258,7 @@ void MouseEvent::initMouseEventInternal(
m_relatedTarget = relatedTarget;
m_modifiers = modifiers;
- initCoordinates(IntPoint(clientX, clientY));
+ initCoordinates(clientX, clientY);
// FIXME: SyntheticEventType is not set to RealOrIndistinguishable here.
}

Powered by Google App Engine
This is Rietveld 408576698