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

Unified Diff: third_party/WebKit/Source/platform/geometry/LayoutPoint.h

Issue 1660863002: Force all LayoutUnit construction to be explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix LayoutRectTest.cpp Created 4 years, 10 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/platform/geometry/LayoutPoint.h
diff --git a/third_party/WebKit/Source/platform/geometry/LayoutPoint.h b/third_party/WebKit/Source/platform/geometry/LayoutPoint.h
index 8d92d9202a0910780fd14cc0cab5ed54da3102c7..e0fe8d379666343b0f3714217956c1fa39bf8219 100644
--- a/third_party/WebKit/Source/platform/geometry/LayoutPoint.h
+++ b/third_party/WebKit/Source/platform/geometry/LayoutPoint.h
@@ -46,6 +46,7 @@ class LayoutPoint {
public:
LayoutPoint() { }
LayoutPoint(LayoutUnit x, LayoutUnit y) : m_x(x), m_y(y) { }
+ LayoutPoint(int x, int y) : m_x(LayoutUnit(x)), m_y(LayoutUnit(y)) { }
LayoutPoint(const IntPoint& point) : m_x(point.x()), m_y(point.y()) { }
explicit LayoutPoint(const FloatPoint& point) : m_x(point.x()), m_y(point.y()) { }
explicit LayoutPoint(const DoublePoint& point) : m_x(point.x()), m_y(point.y()) { }
« no previous file with comments | « third_party/WebKit/Source/platform/LengthFunctions.cpp ('k') | third_party/WebKit/Source/platform/geometry/LayoutRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698