Index: Source/platform/geometry/IntRect.h |
diff --git a/Source/platform/geometry/IntRect.h b/Source/platform/geometry/IntRect.h |
index 5abb74e13e2a9325ca32d66e3028fbe4753c3f3a..43cd436c14c0a985d563df556e9758dc4088ed25 100644 |
--- a/Source/platform/geometry/IntRect.h |
+++ b/Source/platform/geometry/IntRect.h |
@@ -33,10 +33,8 @@ |
#if OS(MACOSX) |
typedef struct CGRect CGRect; |
-#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES |
-typedef struct CGRect NSRect; |
-#else |
-typedef struct _NSRect NSRect; |
+#ifdef __OBJC__ |
+#import <Foundation/Foundation.h> |
#endif |
#endif |
@@ -154,7 +152,7 @@ public: |
#if OS(MACOSX) |
operator CGRect() const; |
-#if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
+#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
operator NSRect() const; |
#endif |
#endif |
@@ -195,7 +193,7 @@ inline bool operator!=(const IntRect& a, const IntRect& b) |
#if OS(MACOSX) |
PLATFORM_EXPORT IntRect enclosingIntRect(const CGRect&); |
-#if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
+#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
PLATFORM_EXPORT IntRect enclosingIntRect(const NSRect&); |
#endif |
#endif |