2011-05-02 Sam Weinig <sam@webkit.org>
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 May 2011 19:11:17 +0000 (19:11 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 May 2011 19:11:17 +0000 (19:11 +0000)
        Reviewed by Anders Carlsson.

        Prune ApplicationServices.h out of the headers
        https://bugs.webkit.org/show_bug.cgi?id=59952

        More forward declares are better.

        * html/canvas/CanvasRenderingContext2D.cpp:
        * html/canvas/CanvasRenderingContext2D.h:
        * platform/graphics/GlyphBuffer.h:
        * platform/graphics/cg/ImageBufferCG.cpp:
        * platform/graphics/cg/PDFDocumentImage.cpp:
        * platform/graphics/cg/PDFDocumentImage.h:
        * platform/graphics/mac/ComplexTextController.h:
        * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
        * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
        * platform/mac/ScrollAnimatorMac.h:
        * platform/mac/ScrollAnimatorMac.mm:
        * platform/mac/ScrollbarThemeMac.h:
        * platform/mac/ScrollbarThemeMac.mm:
        * platform/mac/WebCoreNSStringExtras.h:
        * platform/mac/WebCoreSystemInterface.h:

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

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/platform/graphics/GlyphBuffer.h
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
Source/WebCore/platform/graphics/mac/ComplexTextController.h
Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp
Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
Source/WebCore/platform/mac/ScrollAnimatorMac.h
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/mac/ScrollbarThemeMac.h
Source/WebCore/platform/mac/ScrollbarThemeMac.mm
Source/WebCore/platform/mac/WebCoreNSStringExtras.h
Source/WebCore/platform/mac/WebCoreSystemInterface.h

index cc9cbc9..d43ee35 100644 (file)
@@ -1,3 +1,28 @@
+2011-05-02  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Prune ApplicationServices.h out of the headers
+        https://bugs.webkit.org/show_bug.cgi?id=59952
+
+        More forward declares are better.
+
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        * html/canvas/CanvasRenderingContext2D.h:
+        * platform/graphics/GlyphBuffer.h:
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        * platform/graphics/cg/PDFDocumentImage.cpp:
+        * platform/graphics/cg/PDFDocumentImage.h:
+        * platform/graphics/mac/ComplexTextController.h:
+        * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
+        * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
+        * platform/mac/ScrollAnimatorMac.h:
+        * platform/mac/ScrollAnimatorMac.mm:
+        * platform/mac/ScrollbarThemeMac.h:
+        * platform/mac/ScrollbarThemeMac.mm:
+        * platform/mac/WebCoreNSStringExtras.h:
+        * platform/mac/WebCoreSystemInterface.h:
+
 2011-05-02  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Simon Fraser.
index ff12168..9e25e74 100644 (file)
 #include <wtf/OwnPtr.h>
 #include <wtf/UnusedParam.h>
 
+#if USE(CG)
+#include <ApplicationServices/ApplicationServices.h>
+#endif
+
 using namespace std;
 
 namespace WebCore {
index a1b5651..d95ef74 100644 (file)
 #include "GraphicsTypes.h"
 #include "Path.h"
 #include "PlatformString.h"
-
 #include <wtf/Vector.h>
 
-#if USE(CG)
-#include <ApplicationServices/ApplicationServices.h>
-#endif
 
 #if USE(ACCELERATED_COMPOSITING)
 #include "GraphicsLayer.h"
index 353bc2f..1a7cd8d 100644 (file)
@@ -36,7 +36,7 @@
 #include <wtf/Vector.h>
 
 #if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
-#include <ApplicationServices/ApplicationServices.h>
+#include <CoreGraphics/CGGeometry.h>
 #endif
 
 #if USE(CAIRO) || (PLATFORM(WX) && defined(__WXGTK__))
index 207a9e4..34df3a0 100644 (file)
 #include "WebCoreSystemInterface.h"
 #endif
 
+#if USE(IOSURFACE_CANVAS_BACKING_STORE)
+#include <IOSurface/IOSurface.h>
+#endif
+
 using namespace std;
 
 namespace WebCore {
index 28b0446..81ef18b 100644 (file)
@@ -32,6 +32,8 @@
 #include "GraphicsContext.h"
 #include "ImageObserver.h"
 #include "SharedBuffer.h"
+#include <CoreGraphics/CGContext.h>
+#include <CoreGraphics/CGPDFDocument.h>
 #include <wtf/MathExtras.h>
 #include <wtf/RetainPtr.h>
 
index c69a222..1741b8b 100644 (file)
 #ifndef PDFDocumentImage_h
 #define PDFDocumentImage_h
 
-#include "Image.h"
-
 #include "FloatRect.h"
 #include "GraphicsTypes.h"
+#include "Image.h"
 
 #if USE(CG)
 
-#include <ApplicationServices/ApplicationServices.h>
+typedef struct CGPDFDocument *CGPDFDocumentRef;
 
 namespace WebCore {
 
index 8c1017a..218bfa7 100644 (file)
@@ -25,7 +25,6 @@
 #ifndef ComplexTextController_h
 #define ComplexTextController_h
 
-#include <ApplicationServices/ApplicationServices.h>
 #include "GlyphBuffer.h"
 #include <wtf/HashSet.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/unicode/Unicode.h>
 
+typedef unsigned short CGGlyph;
+typedef const struct __CTRun * CTRunRef;
+typedef const struct __CTLine * CTLineRef;
+
 namespace WebCore {
 
 class Font;
index 41a9635..6a7af5a 100644 (file)
  */
 
 #include "config.h"
-#include "ComplexTextController.h"
-#include "TextRun.h"
-#include "WebCoreSystemInterface.h"
 
 #if USE(CORE_TEXT)
 
+#include "ComplexTextController.h"
+
 #include "Font.h"
+#include "TextRun.h"
+#include "WebCoreSystemInterface.h"
+#include <CoreText/CoreText.h>
 
 #if defined(BUILDING_ON_LEOPARD)
 // The following symbols are SPI in 10.5.
index 04b72ba..17ea7aa 100644 (file)
@@ -28,8 +28,8 @@
 
 #include "config.h"
 #include "GlyphPageTreeNode.h"
-#include "Font.h"
 
+#include "Font.h"
 #include "SimpleFontData.h"
 #include "WebCoreSystemInterface.h"
 #include <ApplicationServices/ApplicationServices.h>
index 0eae897..9c8fa56 100644 (file)
@@ -33,7 +33,6 @@
 #include "FloatSize.h"
 #include "ScrollAnimator.h"
 #include "Timer.h"
-#include "WebCoreSystemInterface.h"
 #include <wtf/RetainPtr.h>
 
 #ifdef __OBJC__
@@ -48,6 +47,10 @@ class ScrollbarPainterControllerDelegate;
 class ScrollbarPainterDelegate;
 #endif
 
+#if USE(WK_SCROLLBAR_PAINTER)
+typedef struct __WKScrollbarPainterController *WKScrollbarPainterControllerRef;
+#endif
+
 namespace WebCore {
 
 class Scrollbar;
index da8f7d7..9b7635d 100644 (file)
@@ -36,6 +36,7 @@
 #include "ScrollableArea.h"
 #include "ScrollbarTheme.h"
 #include "ScrollbarThemeMac.h"
+#include "WebCoreSystemInterface.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/UnusedParam.h>
 
index ca91249..b3be064 100644 (file)
 #define ScrollbarThemeMac_h
 
 #include "ScrollbarThemeComposite.h"
-#include "WebCoreSystemInterface.h"
+
+#if USE(WK_SCROLLBAR_PAINTER)
+typedef struct __WKScrollbarPainter *WKScrollbarPainterRef;
+#endif
 
 namespace WebCore {
 
index 1d6abb5..6f284bb 100644 (file)
@@ -31,6 +31,7 @@
 #include "PlatformMouseEvent.h"
 #include "ScrollAnimatorMac.h"
 #include "ScrollView.h"
+#include "WebCoreSystemInterface.h"
 #include <Carbon/Carbon.h>
 #include <wtf/HashMap.h>
 #include <wtf/StdLibExtras.h>
index f040f16..3bf7342 100644 (file)
@@ -26,7 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <ApplicationServices/ApplicationServices.h>
 #include <objc/objc.h>
 
 #ifdef __OBJC__
index 35d50b8..2413bf8 100644 (file)
 #ifndef WebCoreSystemInterface_h
 #define WebCoreSystemInterface_h
 
-#include <ApplicationServices/ApplicationServices.h>
 #include <objc/objc.h>
 
+typedef const struct __CFString * CFStringRef;
+typedef const struct __CFNumber * CFNumberRef;
+typedef const struct __CFDictionary * CFDictionaryRef;
+typedef struct CGPoint CGPoint;
+typedef struct CGSize CGSize;
+typedef struct CGRect CGRect;
+typedef struct CGAffineTransform CGAffineTransform;
+typedef struct CGContext *CGContextRef;
+typedef struct CGImage *CGImageRef;
+typedef struct CGColor *CGColorRef;
+typedef struct CGFont *CGFontRef;
+typedef struct CGColorSpace *CGColorSpaceRef;
+typedef unsigned short CGGlyph;
+typedef struct __CFReadStream * CFReadStreamRef;
+typedef struct __CFRunLoop * CFRunLoopRef;
+typedef struct __CFHTTPMessage *CFHTTPMessageRef;
+typedef struct _CFURLResponse *CFURLResponseRef;
+typedef const struct __CTLine * CTLineRef;
+typedef const struct __CTTypesetter * CTTypesetterRef;
+typedef const struct __AXUIElement *AXUIElementRef;
+typedef uint32_t ATSUFontID;
+typedef uint16_t ATSGlyphRef;
+typedef struct _NSRange NSRange;
+
 #if PLATFORM(MAC) && USE(CA) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
-#include <IOSurface/IOSurface.h>
+typedef struct __IOSurface *IOSurfaceRef;
 #endif
 
-typedef struct _NSRange NSRange;
-
 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
 typedef struct CGPoint NSPoint;
 typedef struct CGRect NSRect;
@@ -86,8 +107,6 @@ class QTMovie;
 class QTMovieView;
 #endif
 
-typedef struct _CFURLResponse *CFURLResponseRef;
-
 extern "C" {
 
 // In alphabetical order.