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

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: Fix multicol 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 b61956b3e0c902dbb383f3f465e363cb72f0b1bf..fad220f0d7a33d26a4ad745c361db9fe49ff7626 100644
--- a/third_party/WebKit/Source/platform/geometry/LayoutPoint.h
+++ b/third_party/WebKit/Source/platform/geometry/LayoutPoint.h
@@ -45,6 +45,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)) { }
eae 2016/02/12 01:14:59 This has many of the same problems, I assume it is
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()) { }

Powered by Google App Engine
This is Rietveld 408576698