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

Unified Diff: third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.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
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/LayoutRect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.h
diff --git a/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.h b/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.h
index 279a03dd1b5d8a0079f0b7f62a527801d10bceee..22be968b9a114d1568b05d51611715788194d8c9 100644
--- a/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.h
+++ b/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.h
@@ -49,23 +49,25 @@ namespace blink {
class PLATFORM_EXPORT LayoutRectOutsets {
DISALLOW_NEW();
public:
- LayoutRectOutsets() : m_top(0), m_right(0), m_bottom(0), m_left(0) { }
+ LayoutRectOutsets() { }
LayoutRectOutsets(LayoutUnit top, LayoutUnit right, LayoutUnit bottom, LayoutUnit left)
: m_top(top), m_right(right), m_bottom(bottom), m_left(left) { }
+ LayoutRectOutsets(int top, int right, int bottom, int left)
+ : m_top(LayoutUnit(top)), m_right(LayoutUnit(right)), m_bottom(LayoutUnit(bottom)), m_left(LayoutUnit(left)) { }
LayoutRectOutsets(const IntRectOutsets& outsets)
- : m_top(outsets.top())
- , m_right(outsets.right())
- , m_bottom(outsets.bottom())
- , m_left(outsets.left())
+ : m_top(LayoutUnit(outsets.top()))
+ , m_right(LayoutUnit(outsets.right()))
+ , m_bottom(LayoutUnit(outsets.bottom()))
+ , m_left(LayoutUnit(outsets.left()))
{
}
LayoutRectOutsets(const FloatRectOutsets& outsets)
- : m_top(outsets.top())
- , m_right(outsets.right())
- , m_bottom(outsets.bottom())
- , m_left(outsets.left())
+ : m_top(LayoutUnit(outsets.top()))
+ , m_right(LayoutUnit(outsets.right()))
+ , m_bottom(LayoutUnit(outsets.bottom()))
+ , m_left(LayoutUnit(outsets.left()))
{
}
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/LayoutRect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698