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

Unified Diff: Source/platform/geometry/FloatRect.h

Issue 25494003: Move geometry classes from core/platform/graphics to platform/geometry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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: Source/platform/geometry/FloatRect.h
diff --git a/Source/core/platform/graphics/FloatRect.h b/Source/platform/geometry/FloatRect.h
similarity index 96%
rename from Source/core/platform/graphics/FloatRect.h
rename to Source/platform/geometry/FloatRect.h
index e0b631f79dea9ff5653e644e502174d7152b4bcd..fdc2a32c28c7f4c9e5a121616308c151aa5e43bb 100644
--- a/Source/core/platform/graphics/FloatRect.h
+++ b/Source/platform/geometry/FloatRect.h
@@ -27,7 +27,7 @@
#ifndef FloatRect_h
#define FloatRect_h
-#include "core/platform/graphics/FloatPoint.h"
+#include "platform/geometry/FloatPoint.h"
#include "wtf/Vector.h"
#if OS(MACOSX)
@@ -139,13 +139,17 @@ public:
// Note, this doesn't match what IntRect::contains(IntPoint&) does; the int version
// is really checking for containment of 1x1 rect, but that doesn't make sense with floats.
bool contains(float px, float py) const
- { return px >= x() && px <= maxX() && py >= y() && py <= maxY(); }
+ {
+ return px >= x() && px <= maxX() && py >= y() && py <= maxY();
+ }
- void inflateX(float dx) {
+ void inflateX(float dx)
+ {
m_location.setX(m_location.x() - dx);
m_size.setWidth(m_size.width() + dx + dx);
}
- void inflateY(float dy) {
+ void inflateY(float dy)
+ {
m_location.setY(m_location.y() - dy);
m_size.setHeight(m_size.height() + dy + dy);
}
@@ -232,7 +236,7 @@ IntRect enclosedIntRect(const FloatRect&);
IntRect roundedIntRect(const FloatRect&);
// Map rect r from srcRect to an equivalent rect in destRect.
pdr. 2013/10/01 23:21:28 Please update the comment
-FloatRect mapRect(const FloatRect& r, const FloatRect& srcRect, const FloatRect& destRect);
+FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, const FloatRect& destRect);
}

Powered by Google App Engine
This is Rietveld 408576698