| Index: Source/platform/geometry/LayoutRect.cpp
|
| diff --git a/Source/core/platform/graphics/LayoutRect.cpp b/Source/platform/geometry/LayoutRect.cpp
|
| similarity index 87%
|
| rename from Source/core/platform/graphics/LayoutRect.cpp
|
| rename to Source/platform/geometry/LayoutRect.cpp
|
| index 217c49a1e384132301a6913277e5a8e642a657be..37aa2ca38b71cf33436f4911cc2756e0061e8e56 100644
|
| --- a/Source/core/platform/graphics/LayoutRect.cpp
|
| +++ b/Source/platform/geometry/LayoutRect.cpp
|
| @@ -29,14 +29,11 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "core/platform/graphics/LayoutRect.h"
|
| +#include "platform/geometry/LayoutRect.h"
|
|
|
| -#include <algorithm>
|
| -#include "core/platform/graphics/FloatRect.h"
|
| #include "platform/LayoutUnit.h"
|
| -
|
| -using std::max;
|
| -using std::min;
|
| +#include "platform/geometry/FloatRect.h"
|
| +#include <algorithm>
|
|
|
| namespace WebCore {
|
|
|
| @@ -62,8 +59,8 @@ bool LayoutRect::contains(const LayoutRect& other) const
|
|
|
| void LayoutRect::intersect(const LayoutRect& other)
|
| {
|
| - LayoutPoint newLocation(max(x(), other.x()), max(y(), other.y()));
|
| - LayoutPoint newMaxPoint(min(maxX(), other.maxX()), min(maxY(), other.maxY()));
|
| + LayoutPoint newLocation(std::max(x(), other.x()), std::max(y(), other.y()));
|
| + LayoutPoint newMaxPoint(std::min(maxX(), other.maxX()), std::min(maxY(), other.maxY()));
|
|
|
| // Return a clean empty rectangle for non-intersecting cases.
|
| if (newLocation.x() >= newMaxPoint.x() || newLocation.y() >= newMaxPoint.y()) {
|
| @@ -85,8 +82,8 @@ void LayoutRect::unite(const LayoutRect& other)
|
| return;
|
| }
|
|
|
| - LayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
|
| - LayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
|
| + LayoutPoint newLocation(std::min(x(), other.x()), std::min(y(), other.y()));
|
| + LayoutPoint newMaxPoint(std::max(maxX(), other.maxX()), std::max(maxY(), other.maxY()));
|
|
|
| m_location = newLocation;
|
| m_size = newMaxPoint - newLocation;
|
| @@ -102,8 +99,8 @@ void LayoutRect::uniteIfNonZero(const LayoutRect& other)
|
| return;
|
| }
|
|
|
| - LayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
|
| - LayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
|
| + LayoutPoint newLocation(std::min(x(), other.x()), std::min(y(), other.y()));
|
| + LayoutPoint newMaxPoint(std::max(maxX(), other.maxX()), std::max(maxY(), other.maxY()));
|
|
|
| m_location = newLocation;
|
| m_size = newMaxPoint - newLocation;
|
|
|