diff --git a/mozilla/widget/public/nsIDeviceContextSpec.h b/mozilla/widget/public/nsIDeviceContextSpec.h index e76f9ff811d..8dbca1167c9 100644 --- a/mozilla/widget/public/nsIDeviceContextSpec.h +++ b/mozilla/widget/public/nsIDeviceContextSpec.h @@ -44,9 +44,7 @@ class nsIWidget; class nsIPrintSettings; -#ifdef MOZ_CAIRO_GFX class gfxASurface; -#endif #define NS_IDEVICE_CONTEXT_SPEC_IID \ { 0x205c614f, 0x39f8, 0x42e1, \ @@ -68,7 +66,6 @@ public: nsIPrintSettings* aPrintSettings, PRBool aIsPrintPreview) = 0; -#ifdef MOZ_CAIRO_GFX NS_IMETHOD GetSurfaceForPrinter(gfxASurface **nativeSurface) = 0; NS_IMETHOD BeginDocument(PRUnichar* aTitle, @@ -79,9 +76,6 @@ public: NS_IMETHOD EndDocument() = 0; NS_IMETHOD BeginPage() = 0; NS_IMETHOD EndPage() = 0; - - -#endif }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceContextSpec, diff --git a/mozilla/widget/src/os2/nsDeviceContextSpecOS2.cpp b/mozilla/widget/src/os2/nsDeviceContextSpecOS2.cpp index abd51a52731..3b7ec4c81d3 100644 --- a/mozilla/widget/src/os2/nsDeviceContextSpecOS2.cpp +++ b/mozilla/widget/src/os2/nsDeviceContextSpecOS2.cpp @@ -329,7 +329,6 @@ nsresult nsDeviceContextSpecOS2::GetPRTQUEUE( PRTQUEUE *&p) return NS_OK; } -#ifdef MOZ_CAIRO_GFX NS_IMETHODIMP nsDeviceContextSpecOS2::GetSurfaceForPrinter(gfxASurface **nativeSurface) { return NS_ERROR_NOT_IMPLEMENTED; @@ -357,7 +356,6 @@ NS_IMETHODIMP nsDeviceContextSpecOS2::EndPage() { return NS_ERROR_NOT_IMPLEMENTED; } -#endif // Printer Enumerator nsPrinterEnumeratorOS2::nsPrinterEnumeratorOS2() diff --git a/mozilla/widget/src/os2/nsDeviceContextSpecOS2.h b/mozilla/widget/src/os2/nsDeviceContextSpecOS2.h index 80a91146eb7..ac1d4272f78 100644 --- a/mozilla/widget/src/os2/nsDeviceContextSpecOS2.h +++ b/mozilla/widget/src/os2/nsDeviceContextSpecOS2.h @@ -96,14 +96,12 @@ public: NS_IMETHOD GetPRTQUEUE(PRTQUEUE *&p); -#ifdef MOZ_CAIRO_GFX NS_IMETHOD GetSurfaceForPrinter(gfxASurface **nativeSurface); NS_IMETHOD BeginDocument(PRUnichar* aTitle, PRUnichar* aPrintToFileName, PRInt32 aStartPage, PRInt32 aEndPage); NS_IMETHOD EndDocument(); NS_IMETHOD BeginPage(); NS_IMETHOD EndPage(); -#endif /** * Destructor for nsDeviceContextSpecOS2, this will release the printrecord diff --git a/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp b/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp index 90fa126386b..3ee98d39031 100644 --- a/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp +++ b/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp @@ -51,10 +51,9 @@ #include "nsIServiceManager.h" #include "nsReadableUtils.h" #include "nsStringEnumerator.h" -#ifdef MOZ_CAIRO_GFX + #include "gfxPDFSurface.h" #include "gfxWindowsSurface.h" -#endif #include "nsIFileStreams.h" #include "nsUnitConversion.h" @@ -181,11 +180,9 @@ nsDeviceContextSpecWin::nsDeviceContextSpecWin() //---------------------------------------------------------------------------------- -#ifdef MOZ_CAIRO_GFX + NS_IMPL_ISUPPORTS1(nsDeviceContextSpecWin, nsIDeviceContextSpec) -#else -NS_IMPL_ISUPPORTS2(nsDeviceContextSpecWin, nsIDeviceContextSpec, nsISupportsVoid) -#endif + nsDeviceContextSpecWin::~nsDeviceContextSpecWin() { SetDeviceName(nsnull); @@ -515,7 +512,6 @@ static void CleanAndCopyString(char*& aStr, char* aNewStr) } } -#ifdef MOZ_CAIRO_GFX NS_IMETHODIMP nsDeviceContextSpecWin::GetSurfaceForPrinter(gfxASurface **surface) { NS_ASSERTION(mDevMode, "DevMode can't be NULL here"); @@ -565,24 +561,6 @@ NS_IMETHODIMP nsDeviceContextSpecWin::GetSurfaceForPrinter(gfxASurface **surface return NS_ERROR_FAILURE; } -#else - -// nsISupportsVoid impl stuff. goes away when we turn on cairo. -NS_IMETHODIMP nsDeviceContextSpecWin::GetData(void **data) -{ - NS_ASSERTION(mDevMode, "DevMode can't be NULL here"); - - if (mDevMode) { - HDC dc = ::CreateDC(mDriverName, mDeviceName, NULL, mDevMode); - *data = (void*)dc; - - return NS_OK; - } - return NS_ERROR_FAILURE; -} - -#endif - //---------------------------------------------------------------------------------- void nsDeviceContextSpecWin::SetDeviceName(char* aDeviceName) { diff --git a/mozilla/widget/src/windows/nsDeviceContextSpecWin.h b/mozilla/widget/src/windows/nsDeviceContextSpecWin.h index 2c94cb8ea43..48513cac46e 100644 --- a/mozilla/widget/src/windows/nsDeviceContextSpecWin.h +++ b/mozilla/widget/src/windows/nsDeviceContextSpecWin.h @@ -47,16 +47,12 @@ #include class nsDeviceContextSpecWin : public nsIDeviceContextSpec -#ifndef MOZ_CAIRO_GFX - , public nsISupportsVoid -#endif { public: nsDeviceContextSpecWin(); NS_DECL_ISUPPORTS -#ifdef MOZ_CAIRO_GFX NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface); NS_IMETHOD BeginDocument(PRUnichar* aTitle, PRUnichar* aPrintToFileName, @@ -65,13 +61,6 @@ public: NS_IMETHOD EndDocument() { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHOD BeginPage() { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHOD EndPage() { return NS_ERROR_NOT_IMPLEMENTED; } -#else - // kill these when we move to CAIRO_GFX - NS_IMETHOD GetType(PRUint16 *aType) { *aType = nsISupportsPrimitive::TYPE_VOID; return NS_OK; } - NS_IMETHOD GetData(void * *aData); - NS_IMETHOD SetData(void * aData) { return NS_ERROR_FAILURE; } - NS_IMETHOD ToString(char **_retval) { return NS_ERROR_FAILURE; } -#endif NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPS, PRBool aIsPrintPreview);