diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/IntRect.h')
-rw-r--r-- | Source/WebCore/platform/graphics/IntRect.h | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/Source/WebCore/platform/graphics/IntRect.h b/Source/WebCore/platform/graphics/IntRect.h index 70f2cc3d0..0e33bbf95 100644 --- a/Source/WebCore/platform/graphics/IntRect.h +++ b/Source/WebCore/platform/graphics/IntRect.h @@ -29,11 +29,11 @@ #include "IntPoint.h" #include <wtf/Vector.h> -#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) +#if USE(CG) typedef struct CGRect CGRect; #endif -#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) || (PLATFORM(QT) && USE(QTKIT)) +#if PLATFORM(MAC) #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES typedef struct CGRect NSRect; #else @@ -65,15 +65,6 @@ class IntRect; typedef struct _cairo_rectangle_int cairo_rectangle_int_t; #endif -#if PLATFORM(WX) -class wxRect; -#endif - -#if USE(SKIA) -struct SkRect; -struct SkIRect; -#endif - namespace WebCore { class FloatRect; @@ -104,17 +95,6 @@ public: int width() const { return m_size.width(); } int height() const { return m_size.height(); } - // FIXME: These methods are here only to ease the transition to sub-pixel layout. They should - // be removed when we close http://webkit.org/b/60318 - int pixelSnappedX() const { return m_location.x(); } - int pixelSnappedY() const { return m_location.y(); } - int pixelSnappedMaxX() const { return x() + width(); } - int pixelSnappedMaxY() const { return y() + height(); } - int pixelSnappedWidth() const { return m_size.width(); } - int pixelSnappedHeight() const { return m_size.height(); } - IntPoint pixelSnappedLocation() const { return location(); } - IntSize pixelSnappedSize() const { return size(); } - void setX(int x) { m_location.setX(x); } void setY(int y) { m_location.setY(y); } void setWidth(int width) { m_size.setWidth(width); } @@ -194,11 +174,6 @@ public: IntRect transposedRect() const { return IntRect(m_location.transposedPoint(), m_size.transposedSize()); } -#if PLATFORM(WX) - IntRect(const wxRect&); - operator wxRect() const; -#endif - #if PLATFORM(WIN) IntRect(const RECT&); operator RECT() const; @@ -220,19 +195,11 @@ public: operator cairo_rectangle_int_t() const; #endif -#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) +#if USE(CG) operator CGRect() const; #endif -#if USE(SKIA) - IntRect(const SkIRect&); - operator SkRect() const; - operator SkIRect() const; -#endif - -#if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))) \ - && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) \ - || (PLATFORM(QT) && USE(QTKIT)) +#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) operator NSRect() const; #endif @@ -272,19 +239,11 @@ inline bool operator!=(const IntRect& a, const IntRect& b) return a.location() != b.location() || a.size() != b.size(); } -// FIXME: This method is here only to ease the transition to sub-pixel layout. It should -// be removed when we close http://webkit.org/b/60318 -inline IntRect enclosingIntRect(const IntRect& rect) -{ - return rect; -} - -#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) +#if USE(CG) IntRect enclosingIntRect(const CGRect&); #endif -#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \ - || (PLATFORM(CHROMIUM) && OS(DARWIN)) || (PLATFORM(QT) && USE(QTKIT)) +#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) IntRect enclosingIntRect(const NSRect&); #endif |