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

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

Issue 1647313003: Continue converting to explicit LayoutUnit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicitContstructors
Patch Set: Add TODO 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/LayoutUnit.h ('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/LayoutRect.h
diff --git a/third_party/WebKit/Source/platform/geometry/LayoutRect.h b/third_party/WebKit/Source/platform/geometry/LayoutRect.h
index f1418a96655e54fdcba275a4c4c02abf90cf5d6c..c82730ded045328604f869710bde7eaad5127aad 100644
--- a/third_party/WebKit/Source/platform/geometry/LayoutRect.h
+++ b/third_party/WebKit/Source/platform/geometry/LayoutRect.h
@@ -121,23 +121,23 @@ public:
{
LayoutUnit delta = edge - x();
setX(edge);
- setWidth((width() - delta).clampToZero());
+ setWidth((width() - delta).clampNegativeToZero());
}
void shiftMaxXEdgeTo(LayoutUnit edge)
{
LayoutUnit delta = edge - maxX();
- setWidth((width() + delta).clampToZero());
+ setWidth((width() + delta).clampNegativeToZero());
}
void shiftYEdgeTo(LayoutUnit edge)
{
LayoutUnit delta = edge - y();
setY(edge);
- setHeight((height() - delta).clampToZero());
+ setHeight((height() - delta).clampNegativeToZero());
}
void shiftMaxYEdgeTo(LayoutUnit edge)
{
LayoutUnit delta = edge - maxY();
- setHeight((height() + delta).clampToZero());
+ setHeight((height() + delta).clampNegativeToZero());
}
LayoutPoint minXMinYCorner() const { return m_location; } // typically topLeft
« no previous file with comments | « third_party/WebKit/Source/platform/LayoutUnit.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698