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

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

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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.h
diff --git a/third_party/WebKit/Source/core/events/MouseRelatedEvent.h b/third_party/WebKit/Source/core/events/MouseRelatedEvent.h
index a18cbf6ea2017bb1130594756d412e300623ee40..6a9f83c353034a26792cbe15728e71bd512d23c7 100644
--- a/third_party/WebKit/Source/core/events/MouseRelatedEvent.h
+++ b/third_party/WebKit/Source/core/events/MouseRelatedEvent.h
@@ -45,10 +45,10 @@ public:
int screenX() const { return m_screenLocation.x(); }
int screenY() const { return m_screenLocation.y(); }
const IntPoint& screenLocation() const { return m_screenLocation; }
- int clientX() const { return m_clientLocation.x(); }
- int clientY() const { return m_clientLocation.y(); }
- int movementX() const { return m_movementDelta.x(); }
- int movementY() const { return m_movementDelta.y(); }
+ int clientX() const { return m_clientLocation.x().toInt(); }
+ int clientY() const { return m_clientLocation.y().toInt(); }
+ int movementX() const { return m_movementDelta.x().toInt(); }
+ int movementY() const { return m_movementDelta.y().toInt(); }
const LayoutPoint& clientLocation() const { return m_clientLocation; }
int layerX();
int layerY();

Powered by Google App Engine
This is Rietveld 408576698