Remove the USE(SKIA_ON_MAC_CHROMIUM) guards
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Apr 2013 21:38:46 +0000 (21:38 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Apr 2013 21:38:46 +0000 (21:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114084

Reviewed by Ryosuke Niwa.

Source/WebCore:

Remove the USE(SKIA_ON_MAC_CHROMIUM) guards. The guards were enabled only
for the Chromium port via the features.gypi file that was removed in r147714.

* platform/graphics/FloatPoint.h:
(FloatPoint):
* platform/graphics/FloatRect.h:
(FloatRect):
* platform/graphics/FloatSize.h:
(FloatSize):
* platform/graphics/FontPlatformData.cpp:
(WebCore):
* platform/graphics/FontPlatformData.h:
(FontPlatformData):
(WebCore::FontPlatformData::hash):
* platform/graphics/IntPoint.h:
(IntPoint):
* platform/graphics/IntRect.h:
(IntRect):
(WebCore):
* platform/graphics/IntSize.h:
(IntSize):
* platform/graphics/SimpleFontData.h:
(SimpleFontData):
(WebCore::SimpleFontData::widthForGlyph):
* platform/graphics/cg/FloatPointCG.cpp:
* platform/graphics/cg/FloatRectCG.cpp:
* platform/graphics/cg/FloatSizeCG.cpp:
* platform/graphics/cg/IntPointCG.cpp:
* platform/graphics/cg/IntRectCG.cpp:
* platform/graphics/cg/IntSizeCG.cpp:
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(FontCustomPlatformData):

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataUseFeatures.in: Remove the SKIA_ON_MAC_(CHROME|CHROMIUM) reference.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147855 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/FloatPoint.h
Source/WebCore/platform/graphics/FloatRect.h
Source/WebCore/platform/graphics/FloatSize.h
Source/WebCore/platform/graphics/FontPlatformData.cpp
Source/WebCore/platform/graphics/FontPlatformData.h
Source/WebCore/platform/graphics/IntPoint.h
Source/WebCore/platform/graphics/IntRect.h
Source/WebCore/platform/graphics/IntSize.h
Source/WebCore/platform/graphics/SimpleFontData.h
Source/WebCore/platform/graphics/cg/FloatPointCG.cpp
Source/WebCore/platform/graphics/cg/FloatRectCG.cpp
Source/WebCore/platform/graphics/cg/FloatSizeCG.cpp
Source/WebCore/platform/graphics/cg/IntPointCG.cpp
Source/WebCore/platform/graphics/cg/IntRectCG.cpp
Source/WebCore/platform/graphics/cg/IntSizeCG.cpp
Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp
Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/AboutDataUseFeatures.in

index 0e56fe3..9de1d8d 100644 (file)
@@ -1,3 +1,47 @@
+2013-04-06  Zan Dobersek  <zdobersek@igalia.com>
+
+        Remove the USE(SKIA_ON_MAC_CHROMIUM) guards
+        https://bugs.webkit.org/show_bug.cgi?id=114084
+
+        Reviewed by Ryosuke Niwa.
+
+        Remove the USE(SKIA_ON_MAC_CHROMIUM) guards. The guards were enabled only
+        for the Chromium port via the features.gypi file that was removed in r147714.
+
+        * platform/graphics/FloatPoint.h:
+        (FloatPoint):
+        * platform/graphics/FloatRect.h:
+        (FloatRect):
+        * platform/graphics/FloatSize.h:
+        (FloatSize):
+        * platform/graphics/FontPlatformData.cpp:
+        (WebCore):
+        * platform/graphics/FontPlatformData.h:
+        (FontPlatformData):
+        (WebCore::FontPlatformData::hash):
+        * platform/graphics/IntPoint.h:
+        (IntPoint):
+        * platform/graphics/IntRect.h:
+        (IntRect):
+        (WebCore):
+        * platform/graphics/IntSize.h:
+        (IntSize):
+        * platform/graphics/SimpleFontData.h:
+        (SimpleFontData):
+        (WebCore::SimpleFontData::widthForGlyph):
+        * platform/graphics/cg/FloatPointCG.cpp:
+        * platform/graphics/cg/FloatRectCG.cpp:
+        * platform/graphics/cg/FloatSizeCG.cpp:
+        * platform/graphics/cg/IntPointCG.cpp:
+        * platform/graphics/cg/IntRectCG.cpp:
+        * platform/graphics/cg/IntSizeCG.cpp:
+        * platform/graphics/mac/FontCustomPlatformData.cpp:
+        (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
+        (WebCore::createFontCustomPlatformData):
+        * platform/graphics/mac/FontCustomPlatformData.h:
+        (WebCore::FontCustomPlatformData::FontCustomPlatformData):
+        (FontCustomPlatformData):
+
 2013-04-06  Robert Hogan  <robert@webkit.org>
 
         REGRESSION(r142152): Text wraps in menu
index 111e231..7bd21fc 100644 (file)
@@ -39,7 +39,7 @@ class FloatPoint;
 }
 #endif
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 typedef struct CGPoint CGPoint;
 #endif
 
@@ -150,7 +150,7 @@ public:
         return FloatPoint(m_y, m_x);
     }
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
     FloatPoint(const CGPoint&);
     operator CGPoint() const;
 #endif
index fcef94a..8b8d33a 100644 (file)
@@ -30,7 +30,7 @@
 #include "FloatPoint.h"
 #include <wtf/Vector.h>
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 typedef struct CGRect CGRect;
 #endif
 
@@ -195,7 +195,7 @@ public:
     operator BlackBerry::Platform::FloatRect() const;
 #endif
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
     FloatRect(const CGRect&);
     operator CGRect() const;
 #endif
index 6010211..ad4ddfa 100644 (file)
@@ -45,7 +45,7 @@ class FloatSize;
 }
 #endif
 
-#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG) || (PLATFORM(WX) && OS(DARWIN))
 typedef struct CGSize CGSize;
 #endif
 
@@ -130,7 +130,7 @@ public:
     operator BlackBerry::Platform::FloatSize() const;
 #endif
 
-#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG) || (PLATFORM(WX) && OS(DARWIN))
     explicit FloatSize(const CGSize&); // don't do this implicitly since it's lossy
     operator CGSize() const;
 #endif
index 95abdad..a55558e 100644 (file)
@@ -112,7 +112,7 @@ FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheti
 {
 }
 
-#if OS(DARWIN) && (USE(CG) || USE(SKIA_ON_MAC_CHROMIUM))
+#if OS(DARWIN) && USE(CG)
 FontPlatformData::FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant)
     : m_syntheticBold(syntheticBold)
     , m_syntheticOblique(syntheticOblique)
index ba64b95..8387d4c 100644 (file)
@@ -71,7 +71,7 @@ typedef const struct __CTFont* CTFontRef;
 typedef struct HFONT__* HFONT;
 #endif
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 typedef struct CGFont* CGFontRef;
 #if OS(DARWIN)
 typedef const struct __CTFont* CTFontRef;
@@ -105,7 +105,7 @@ public:
 #if OS(DARWIN)
     FontPlatformData(NSFont*, float size, bool isPrinterFont = false, bool syntheticBold = false, bool syntheticOblique = false,
                      FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
     FontPlatformData(CGFontRef, float size, bool syntheticBold, bool syntheticOblique, FontOrientation, FontWidthVariant);
 #endif
 #endif
@@ -129,7 +129,7 @@ public:
     void setFont(NSFont*);
 #endif
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 #if OS(DARWIN)
     CGFontRef cgFont() const { return m_cgFont.get(); }
     CTFontRef ctFont() const;
@@ -169,7 +169,7 @@ public:
 #if PLATFORM(WIN) && !USE(CAIRO)
         return m_font ? m_font->hash() : 0;
 #elif OS(DARWIN)
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
         ASSERT(m_font || !m_cgFont);
 #endif
         uintptr_t hashCodes[3] = { (uintptr_t)m_font, m_widthVariant, static_cast<uintptr_t>(m_isPrinterFont << 3 | m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique) };
@@ -250,7 +250,7 @@ private:
     RefPtr<RefCountedGDIHandle<HFONT> > m_font;
 #endif
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 #if PLATFORM(WIN)
     RetainPtr<CGFontRef> m_cgFont;
 #else
index 3e8148a..0e887fb 100644 (file)
@@ -29,7 +29,7 @@
 #include "IntSize.h"
 #include <wtf/MathExtras.h>
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 typedef struct CGPoint CGPoint;
 #endif
 
@@ -119,7 +119,7 @@ public:
         return IntPoint(m_y, m_x);
     }
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
     explicit IntPoint(const CGPoint&); // don't do this implicitly since it's lossy
     operator CGPoint() const;
 #endif
index 70f2cc3..e5ad321 100644 (file)
@@ -29,7 +29,7 @@
 #include "IntPoint.h"
 #include <wtf/Vector.h>
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 typedef struct CGRect CGRect;
 #endif
 
@@ -220,7 +220,7 @@ public:
     operator cairo_rectangle_int_t() const;
 #endif
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
     operator CGRect() const;
 #endif
 
@@ -279,7 +279,7 @@ inline IntRect enclosingIntRect(const IntRect& rect)
     return rect;
 }
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 IntRect enclosingIntRect(const CGRect&);
 #endif
 
index c8a549d..2b037c4 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef IntSize_h
 #define IntSize_h
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 typedef struct CGSize CGSize;
 #endif
 
@@ -132,7 +132,7 @@ public:
         return IntSize(m_height, m_width);
     }
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
     explicit IntSize(const CGSize&); // don't do this implicitly since it's lossy
     operator CGSize() const;
 #endif
index e9ed48f..49e2899 100644 (file)
@@ -151,7 +151,7 @@ public:
     float adjustedSpaceWidth() const { return m_adjustedSpaceWidth; }
     void setSpaceWidth(float spaceWidth) { m_spaceWidth = spaceWidth; }
 
-#if USE(CG) || USE(CAIRO) || PLATFORM(WX) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG) || USE(CAIRO) || PLATFORM(WX)
     float syntheticBoldOffset() const { return m_syntheticBoldOffset; }
 #endif
 
@@ -313,7 +313,7 @@ private:
 
     mutable OwnPtr<DerivedFontData> m_derivedFontData;
 
-#if USE(CG) || USE(CAIRO) || PLATFORM(WX) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG) || USE(CAIRO) || PLATFORM(WX)
     float m_syntheticBoldOffset;
 #endif
 
@@ -366,7 +366,7 @@ ALWAYS_INLINE float SimpleFontData::widthForGlyph(Glyph glyph) const
         width = m_fontData->widthForSVGGlyph(glyph, m_platformData.size());
 #if ENABLE(OPENTYPE_VERTICAL)
     else if (m_verticalData)
-#if USE(CG) || USE(CAIRO) || PLATFORM(WX) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG) || USE(CAIRO) || PLATFORM(WX)
         width = m_verticalData->advanceHeight(this, glyph) + m_syntheticBoldOffset;
 #else
         width = m_verticalData->advanceHeight(this, glyph);
index 006983e..f37e07f 100644 (file)
@@ -27,7 +27,7 @@
 #include "config.h"
 #include "FloatPoint.h"
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 
 #include <ApplicationServices/ApplicationServices.h>
 
index fe6f880..4ea083a 100644 (file)
@@ -27,7 +27,7 @@
 #include "config.h"
 #include "FloatRect.h"
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 
 #include <ApplicationServices/ApplicationServices.h>
 
index a3dcbdd..0f5bc73 100644 (file)
@@ -27,7 +27,7 @@
 #include "config.h"
 #include "FloatSize.h"
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) || (PLATFORM(QT) && USE(QTKIT))
+#if USE(CG) || (PLATFORM(QT) && USE(QTKIT))
 
 #include <ApplicationServices/ApplicationServices.h>
 
index a76767f..708fcc2 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "IntPoint.h"
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 
 #include <ApplicationServices/ApplicationServices.h>
 
index f757497..f1ccde4 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "IntRect.h"
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) || (PLATFORM(QT) && USE(QTKIT))
+#if USE(CG) || (PLATFORM(QT) && USE(QTKIT))
 
 #include <ApplicationServices/ApplicationServices.h>
 
index 7993d42..41fb399 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "IntSize.h"
 
-#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
+#if USE(CG)
 
 #include <ApplicationServices/ApplicationServices.h>
 
index 265c4d3..85388d7 100644 (file)
 #include "WOFFFileFormat.h"
 #include <ApplicationServices/ApplicationServices.h>
 
-#if USE(SKIA_ON_MAC_CHROMIUM)
-#include "SkStream.h"
-#include "SkTypeface.h"
-#endif
-
 namespace WebCore {
 
-#if USE(SKIA_ON_MAC_CHROMIUM)
-class RemoteFontStream : public SkStream {
-public:
-    explicit RemoteFontStream(PassRefPtr<SharedBuffer> buffer)
-        : m_buffer(buffer)
-        , m_offset(0)
-    {
-    }
-
-    virtual ~RemoteFontStream()
-    {
-    }
-
-    virtual bool rewind()
-    {
-        m_offset = 0;
-        return true;
-    }
-
-    virtual size_t read(void* buffer, size_t size)
-    {
-        if (!buffer && !size) {
-            // This is request for the length of the stream.
-            return m_buffer->size();
-        }
-        // This is a request to read bytes or skip bytes (when buffer is 0).
-        if (!m_buffer->data() || !m_buffer->size())
-            return 0;
-        size_t left = m_buffer->size() - m_offset;
-        size_t bytesToConsume = std::min(left, size);
-        if (buffer)
-            std::memcpy(buffer, m_buffer->data() + m_offset, bytesToConsume);
-        m_offset += bytesToConsume;
-        return bytesToConsume;
-    }
-
-private:
-    RefPtr<SharedBuffer> m_buffer;
-    size_t m_offset;
-};
-#endif
-
 FontCustomPlatformData::~FontCustomPlatformData()
 {
-#if USE(SKIA_ON_MAC_CHROMIUM)
-    SkSafeUnref(m_typeface);
-#endif
     CGFontRelease(m_cgFont);
 }
 
@@ -121,11 +71,6 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
         return 0;
 
     FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(containerRef, cgFontRef.leakRef());
-#if USE(SKIA_ON_MAC_CHROMIUM)
-    RemoteFontStream* stream = new RemoteFontStream(buffer);
-    fontCustomPlatformData->m_typeface = SkTypeface::CreateFromStream(stream);
-    stream->unref();
-#endif
     return fontCustomPlatformData;
 }
 
index a940037..c7ae1ca 100644 (file)
@@ -32,10 +32,6 @@ typedef struct CGFont* CGFontRef;
 typedef UInt32 ATSFontContainerRef;
 typedef UInt32 ATSFontRef;
 
-#if USE(SKIA_ON_MAC_CHROMIUM)
-class SkTypeface;
-#endif
-
 namespace WebCore {
 
 class FontPlatformData;
@@ -47,9 +43,6 @@ public:
     FontCustomPlatformData(ATSFontContainerRef container, CGFontRef cgFont)
         : m_atsContainer(container)
         , m_cgFont(cgFont)
-#if USE(SKIA_ON_MAC_CHROMIUM)
-        , m_typeface(0)
-#endif
     {
     }
 
@@ -61,9 +54,6 @@ public:
 
     ATSFontContainerRef m_atsContainer;
     CGFontRef m_cgFont;
-#if USE(SKIA_ON_MAC_CHROMIUM)
-    SkTypeface* m_typeface;
-#endif
 };
 
 FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
index b52ae55..ef8fc02 100644 (file)
@@ -1,3 +1,12 @@
+2013-04-06  Zan Dobersek  <zdobersek@igalia.com>
+
+        Remove the USE(SKIA_ON_MAC_CHROMIUM) guards
+        https://bugs.webkit.org/show_bug.cgi?id=114084
+
+        Reviewed by Ryosuke Niwa.
+
+        * WebCoreSupport/AboutDataUseFeatures.in: Remove the SKIA_ON_MAC_(CHROME|CHROMIUM) reference.
+
 2013-04-05  Tiancheng Jiang  <tijiang@rim.com>
 
         [BlackBerry] FatFingers Don't check the shadow tree for all elements.
index 6121c72..61f700b 100644 (file)
@@ -88,8 +88,6 @@ RTL_SCROLLBAR
 SAFARI_THEME
 SCROLLBAR_PAINTER
 SKIA
-SKIA_ON_MAC_CHROME
-SKIA_ON_MAC_CHROMIUM
 SKIA_TEXT
 SOUP
 SYSTEM_MALLOC