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

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

Issue 2406263003: Make PointerEvent coordinates fractional for touch (Closed)
Patch Set: Fixed zoom issues Created 4 years, 2 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/events/MouseRelatedEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp b/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp
index 30ba23a1eaa78aa5425e45153dafcf60e03fac1b..e6ac9501291888ad35b2eefae831b982fb7bcf0a 100644
--- a/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp
@@ -107,18 +107,20 @@ MouseRelatedEvent::MouseRelatedEvent(
MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType,
const MouseEventInit& initializer)
: UIEventWithKeyState(eventType, initializer),
- m_screenLocation(IntPoint(initializer.screenX(), initializer.screenY())),
+ m_screenLocation(LayoutPoint(
+ FloatPoint(initializer.screenX(), initializer.screenY()))),
m_movementDelta(
IntPoint(initializer.movementX(), initializer.movementY())),
m_positionType(PositionType::Position) {
- initCoordinates(IntPoint(initializer.clientX(), initializer.clientY()));
+ initCoordinates(initializer.clientX(), initializer.clientY());
}
-void MouseRelatedEvent::initCoordinates(const LayoutPoint& clientLocation) {
+void MouseRelatedEvent::initCoordinates(const double clientX,
+ const double clientY) {
// Set up initial values for coordinates.
// Correct values are computed lazily, see computeRelativePosition.
- m_clientLocation = clientLocation;
- m_pageLocation = clientLocation + contentsScrollOffset(view());
+ m_clientLocation = LayoutPoint(FloatPoint(clientX, clientY));
+ m_pageLocation = m_clientLocation + contentsScrollOffset(view());
m_layerLocation = m_pageLocation;
m_offsetLocation = m_pageLocation;

Powered by Google App Engine
This is Rietveld 408576698