From 605900c19fefba0517a533826fd2d34c4ce19525 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 1 Apr 2010 09:38:53 -0700 Subject: [PATCH] Backed out changeset 29bc09de2f77 (Bug 551298) due to Linux debug mochitest-5 orange --- content/svg/content/src/nsSVGMatrix.cpp | 1 - content/svg/content/src/nsSVGMatrix.h | 1 - gfx/layers/Layers.h | 6 ++---- gfx/thebes/public/gfxASurface.h | 1 - gfx/thebes/public/gfxContext.h | 3 +-- gfx/thebes/public/gfxFont.h | 7 +++---- gfx/thebes/public/gfxGdkNativeRenderer.h | 1 - gfx/thebes/public/gfxPath.h | 3 +-- gfx/thebes/public/gfxPattern.h | 4 +--- gfx/thebes/public/gfxRect.h | 1 - gfx/thebes/public/gfxTypes.h | 10 ++++++++++ gfx/thebes/public/gfxUserFontSet.h | 3 +-- gfx/thebes/src/gfxFontconfigUtils.h | 3 +-- gfx/thebes/src/gfxPangoFonts.cpp | 2 +- layout/printing/nsPrintData.h | 1 - 15 files changed, 21 insertions(+), 26 deletions(-) diff --git a/content/svg/content/src/nsSVGMatrix.cpp b/content/svg/content/src/nsSVGMatrix.cpp index c7e7d75612d1..ee155e5aa7ac 100644 --- a/content/svg/content/src/nsSVGMatrix.cpp +++ b/content/svg/content/src/nsSVGMatrix.cpp @@ -41,7 +41,6 @@ #include "nsSVGValue.h" #include #include "nsContentUtils.h" -#include "nsISupportsImpl.h" const double radPerDegree = 2.0*3.1415926535 / 360.0; diff --git a/content/svg/content/src/nsSVGMatrix.h b/content/svg/content/src/nsSVGMatrix.h index c95002031716..6d1f5d2f2612 100644 --- a/content/svg/content/src/nsSVGMatrix.h +++ b/content/svg/content/src/nsSVGMatrix.h @@ -71,7 +71,6 @@ #include "nsIDOMSVGMatrix.h" #include "gfxMatrix.h" -#include "nsAutoPtr.h" nsresult NS_NewSVGMatrix(nsIDOMSVGMatrix** result, diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index b5d674be34b4..a3759ceeebde 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -42,8 +42,6 @@ #include "nsRegion.h" #include "nsPoint.h" #include "nsRect.h" -#include "nsISupportsImpl.h" -#include "nsAutoPtr.h" #include "gfx3DMatrix.h" class gfxContext; @@ -108,7 +106,7 @@ class ImageContainer; * root layer, and each container layer holds a reference to its children. */ class THEBES_API LayerManager { - NS_INLINE_DECL_REFCOUNTING(LayerManager) + THEBES_INLINE_DECL_REFCOUNTING(LayerManager) public: enum LayersBackend { @@ -183,7 +181,7 @@ public: * surface. */ class THEBES_API Layer { - NS_INLINE_DECL_REFCOUNTING(Layer) + THEBES_INLINE_DECL_REFCOUNTING(Layer) public: virtual ~Layer() {} diff --git a/gfx/thebes/public/gfxASurface.h b/gfx/thebes/public/gfxASurface.h index c84f4ea14a60..4c2143d646aa 100644 --- a/gfx/thebes/public/gfxASurface.h +++ b/gfx/thebes/public/gfxASurface.h @@ -40,7 +40,6 @@ #include "gfxTypes.h" #include "gfxRect.h" -#include "nsAutoPtr.h" typedef struct _cairo_surface cairo_surface_t; typedef struct _cairo_user_data_key cairo_user_data_key_t; diff --git a/gfx/thebes/public/gfxContext.h b/gfx/thebes/public/gfxContext.h index f9e95d2dfeb8..23f2f068db8c 100644 --- a/gfx/thebes/public/gfxContext.h +++ b/gfx/thebes/public/gfxContext.h @@ -48,7 +48,6 @@ #include "gfxMatrix.h" #include "gfxPattern.h" #include "gfxPath.h" -#include "nsISupportsImpl.h" typedef struct _cairo cairo_t; @@ -67,7 +66,7 @@ typedef struct _cairo cairo_t; * as opposed to app units. */ class THEBES_API gfxContext { - NS_INLINE_DECL_REFCOUNTING(gfxContext) + THEBES_INLINE_DECL_REFCOUNTING(gfxContext) public: /** diff --git a/gfx/thebes/public/gfxFont.h b/gfx/thebes/public/gfxFont.h index f808c32ce9f6..370654c53e02 100644 --- a/gfx/thebes/public/gfxFont.h +++ b/gfx/thebes/public/gfxFont.h @@ -55,7 +55,6 @@ #include "gfxFontConstants.h" #include "gfxPlatform.h" #include "nsIAtom.h" -#include "nsISupportsImpl.h" #ifdef DEBUG #include @@ -161,7 +160,7 @@ struct THEBES_API gfxFontStyle { class gfxFontEntry { public: - NS_INLINE_DECL_REFCOUNTING(gfxFontEntry) + THEBES_INLINE_DECL_REFCOUNTING(gfxFontEntry) gfxFontEntry(const nsAString& aName, gfxFontFamily *aFamily = nsnull, PRBool aIsStandardFace = PR_FALSE) : @@ -290,7 +289,7 @@ struct FontSearch { class gfxFontFamily { public: - NS_INLINE_DECL_REFCOUNTING(gfxFontFamily) + THEBES_INLINE_DECL_REFCOUNTING(gfxFontFamily) gfxFontFamily(const nsAString& aName) : mName(aName), @@ -956,7 +955,7 @@ protected: }; class THEBES_API gfxTextRunFactory { - NS_INLINE_DECL_REFCOUNTING(gfxTextRunFactory) + THEBES_INLINE_DECL_REFCOUNTING(gfxTextRunFactory) public: // Flags in the mask 0xFFFF0000 are reserved for textrun clients diff --git a/gfx/thebes/public/gfxGdkNativeRenderer.h b/gfx/thebes/public/gfxGdkNativeRenderer.h index ca5bef4337aa..68cf01570061 100644 --- a/gfx/thebes/public/gfxGdkNativeRenderer.h +++ b/gfx/thebes/public/gfxGdkNativeRenderer.h @@ -39,7 +39,6 @@ #define GFXGDKNATIVERENDER_H_ #include "gfxColor.h" -#include "nsAutoPtr.h" #include class gfxASurface; diff --git a/gfx/thebes/public/gfxPath.h b/gfx/thebes/public/gfxPath.h index 127b81ea4d24..1a5cc2e9f729 100644 --- a/gfx/thebes/public/gfxPath.h +++ b/gfx/thebes/public/gfxPath.h @@ -38,7 +38,6 @@ #define GFX_PATH_H #include "gfxTypes.h" -#include "nsISupportsImpl.h" class gfxContext; struct gfxPoint; @@ -49,7 +48,7 @@ typedef struct cairo_path cairo_path_t; * of a gfxContext. */ class THEBES_API gfxPath { - NS_INLINE_DECL_REFCOUNTING(gfxPath) + THEBES_INLINE_DECL_REFCOUNTING(gfxPath) friend class gfxContext; diff --git a/gfx/thebes/public/gfxPattern.h b/gfx/thebes/public/gfxPattern.h index b378b815c02a..26f67b35f1d2 100644 --- a/gfx/thebes/public/gfxPattern.h +++ b/gfx/thebes/public/gfxPattern.h @@ -42,8 +42,6 @@ #include "gfxColor.h" #include "gfxMatrix.h" -#include "nsISupportsImpl.h" -#include "nsAutoPtr.h" class gfxContext; class gfxASurface; @@ -51,7 +49,7 @@ typedef struct _cairo_pattern cairo_pattern_t; class THEBES_API gfxPattern { - NS_INLINE_DECL_REFCOUNTING(gfxPattern) + THEBES_INLINE_DECL_REFCOUNTING(gfxPattern) public: gfxPattern(cairo_pattern_t *aPattern); diff --git a/gfx/thebes/public/gfxRect.h b/gfx/thebes/public/gfxRect.h index 7da3e1f2678a..c024211aa5bd 100644 --- a/gfx/thebes/public/gfxRect.h +++ b/gfx/thebes/public/gfxRect.h @@ -40,7 +40,6 @@ #include "gfxTypes.h" #include "gfxPoint.h" -#include "nsDebug.h" struct THEBES_API gfxCorner { typedef int Corner; diff --git a/gfx/thebes/public/gfxTypes.h b/gfx/thebes/public/gfxTypes.h index 1e1f0862cb3d..b68c48f1e790 100644 --- a/gfx/thebes/public/gfxTypes.h +++ b/gfx/thebes/public/gfxTypes.h @@ -90,6 +90,16 @@ enum gfxBreakPriority { eNormalBreak }; +/** + * Define refcounting for Thebes. For now use the stuff from nsISupportsImpl + * even though it forces the functions to be virtual... + */ +#include "nsISupportsImpl.h" +#include "nsAutoPtr.h" + +#define THEBES_INLINE_DECL_REFCOUNTING(_class) \ + NS_INLINE_DECL_REFCOUNTING(_class) + #define THEBES_INLINE_DECL_THREADSAFE_REFCOUNTING(_class) \ public: \ nsrefcnt AddRef(void) { \ diff --git a/gfx/thebes/public/gfxUserFontSet.h b/gfx/thebes/public/gfxUserFontSet.h index aece55f5789b..654350c89d8a 100644 --- a/gfx/thebes/public/gfxUserFontSet.h +++ b/gfx/thebes/public/gfxUserFontSet.h @@ -46,7 +46,6 @@ #include "nsCOMPtr.h" #include "nsIURI.h" #include "nsIFile.h" -#include "nsISupportsImpl.h" class nsIURI; class gfxMixedFontFamily; @@ -139,7 +138,7 @@ class THEBES_API gfxUserFontSet { public: - NS_INLINE_DECL_REFCOUNTING(gfxUserFontSet) + THEBES_INLINE_DECL_REFCOUNTING(gfxUserFontSet) gfxUserFontSet(); virtual ~gfxUserFontSet(); diff --git a/gfx/thebes/src/gfxFontconfigUtils.h b/gfx/thebes/src/gfxFontconfigUtils.h index 4943f77b8cda..7dcb6a38758b 100644 --- a/gfx/thebes/src/gfxFontconfigUtils.h +++ b/gfx/thebes/src/gfxFontconfigUtils.h @@ -44,7 +44,6 @@ #include "nsAutoRef.h" #include "nsTArray.h" #include "nsTHashtable.h" -#include "nsISupportsImpl.h" #include @@ -88,7 +87,7 @@ class gfxIgnoreCaseCStringComparator class gfxFontNameList : public nsTArray { public: - NS_INLINE_DECL_REFCOUNTING(gfxFontNameList) + THEBES_INLINE_DECL_REFCOUNTING(gfxFontNameList) PRBool Exists(nsAString& aName); }; diff --git a/gfx/thebes/src/gfxPangoFonts.cpp b/gfx/thebes/src/gfxPangoFonts.cpp index 06b1da984218..3069a396e015 100644 --- a/gfx/thebes/src/gfxPangoFonts.cpp +++ b/gfx/thebes/src/gfxPangoFonts.cpp @@ -935,7 +935,7 @@ GetFontGroup(PangoContext *aContext) class gfxFcPangoFontSet { public: - NS_INLINE_DECL_REFCOUNTING(gfxFcPangoFontSet) + THEBES_INLINE_DECL_REFCOUNTING(gfxFcPangoFontSet) explicit gfxFcPangoFontSet(FcPattern *aPattern, gfxUserFontSet *aUserFontSet) diff --git a/layout/printing/nsPrintData.h b/layout/printing/nsPrintData.h index 97dfb4f468d8..bd6dbf322e38 100644 --- a/layout/printing/nsPrintData.h +++ b/layout/printing/nsPrintData.h @@ -44,7 +44,6 @@ #include "nsIPrintOptions.h" #include "nsTArray.h" #include "nsCOMArray.h" -#include "nsAutoPtr.h" // Classes class nsPrintObject;