diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/platform/geometry/FloatRect.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/platform/geometry/FloatRect.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/geometry/FloatRect.h b/chromium/third_party/WebKit/Source/platform/geometry/FloatRect.h index c7e2948096e..6195926a43f 100644 --- a/chromium/third_party/WebKit/Source/platform/geometry/FloatRect.h +++ b/chromium/third_party/WebKit/Source/platform/geometry/FloatRect.h @@ -28,19 +28,17 @@ #define FloatRect_h #include "platform/geometry/FloatPoint.h" +#include "third_party/skia/include/core/SkRect.h" #include "wtf/Vector.h" #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 -struct SkRect; - namespace WebCore { class LayoutRect; @@ -167,13 +165,13 @@ public: #if OS(MACOSX) FloatRect(const CGRect&); operator CGRect() const; -#if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) +#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) FloatRect(const NSRect&); operator NSRect() const; #endif #endif - operator SkRect() const; + operator SkRect() const { return SkRect::MakeXYWH(x(), y(), width(), height()); } private: FloatPoint m_location; |