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

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

Issue 1648573002: Transition to explicit constructors in LayoutUnit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove int constructors for size/point... they result in incorrect conversions until LayoutUnit is … Created 4 years, 11 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 b1fcf37d4639c1ab9757850e820751be66f446a4..b61956b3e0c902dbb383f3f465e363cb72f0b1bf 100644
--- a/third_party/WebKit/Source/platform/geometry/LayoutPoint.h
+++ b/third_party/WebKit/Source/platform/geometry/LayoutPoint.h
@@ -61,6 +61,7 @@ public:
void move(const LayoutSize& s) { move(s.width(), s.height()); }
void move(const IntSize& s) { move(s.width(), s.height()); }
void moveBy(const LayoutPoint& offset) { move(offset.x(), offset.y()); }
+ void move(int dx, int dy) { move(LayoutUnit(dx), LayoutUnit(dy)); }
void move(LayoutUnit dx, LayoutUnit dy) { m_x += dx; m_y += dy; }
void scale(float sx, float sy)
{

Powered by Google App Engine
This is Rietveld 408576698