diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/platform/geometry/IntPoint.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/platform/geometry/IntPoint.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/geometry/IntPoint.h b/chromium/third_party/WebKit/Source/platform/geometry/IntPoint.h index 6d4d3f9a546..acc319d3f1c 100644 --- a/chromium/third_party/WebKit/Source/platform/geometry/IntPoint.h +++ b/chromium/third_party/WebKit/Source/platform/geometry/IntPoint.h @@ -29,13 +29,13 @@ #include "platform/geometry/IntSize.h" #include "wtf/MathExtras.h" +#include "wtf/VectorTraits.h" #if OS(MACOSX) typedef struct CGPoint CGPoint; -#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES -typedef struct CGPoint NSPoint; -#else -typedef struct _NSPoint NSPoint; + +#ifdef __OBJC__ +#import <Foundation/Foundation.h> #endif #endif @@ -92,7 +92,7 @@ public: explicit IntPoint(const CGPoint&); // don't do this implicitly since it's lossy operator CGPoint() const; -#if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) +#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) explicit IntPoint(const NSPoint&); // don't do this implicitly since it's lossy operator NSPoint() const; #endif @@ -161,4 +161,11 @@ inline int IntPoint::distanceSquaredToPoint(const IntPoint& point) const } // namespace WebCore +namespace WTF { + +template<> +struct VectorTraits<WebCore::IntPoint> : SimpleClassVectorTraits<WebCore::IntPoint> { }; + +} // namespace WTF + #endif // IntPoint_h |