From ac78dedf29a1f24aee24954a8b70dc55544ae645 Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Fri, 20 Feb 2004 17:29:53 +0000 Subject: [PATCH] Bug 234954 - remove unused nsIDeviceContext::ConvertPixel. r=pavlov sr=bryner git-svn-id: svn://10.0.0.236/trunk@153017 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/public/nsIDeviceContext.h | 5 ----- mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp | 13 ------------- mozilla/gfx/src/beos/nsDeviceContextBeOS.h | 1 - mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp | 9 --------- mozilla/gfx/src/gtk/nsDeviceContextGTK.h | 1 - mozilla/gfx/src/mac/nsDeviceContextMac.cpp | 11 ----------- mozilla/gfx/src/mac/nsDeviceContextMac.h | 1 - mozilla/gfx/src/os2/nsDeviceContextOS2.cpp | 6 ------ mozilla/gfx/src/os2/nsDeviceContextOS2.h | 2 -- mozilla/gfx/src/photon/nsDeviceContextPh.h | 7 ------- mozilla/gfx/src/ps/nsDeviceContextPS.cpp | 12 ------------ mozilla/gfx/src/ps/nsDeviceContextPS.h | 1 - mozilla/gfx/src/windows/nsDeviceContextWin.cpp | 6 ------ mozilla/gfx/src/windows/nsDeviceContextWin.h | 2 -- mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp | 10 ---------- mozilla/gfx/src/xlib/nsDeviceContextXlib.h | 1 - mozilla/gfx/src/xprint/nsDeviceContextXP.cpp | 15 --------------- mozilla/gfx/src/xprint/nsDeviceContextXP.h | 1 - 18 files changed, 104 deletions(-) diff --git a/mozilla/gfx/public/nsIDeviceContext.h b/mozilla/gfx/public/nsIDeviceContext.h index 0ad9036a6bd..703238d2e93 100644 --- a/mozilla/gfx/public/nsIDeviceContext.h +++ b/mozilla/gfx/public/nsIDeviceContext.h @@ -434,11 +434,6 @@ public: */ NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo) = 0; - /** - * Returns Platform specific pixel value for an RGB value - */ - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel) = 0; - /** * Get the size of the displayable area of the output device * in app units. diff --git a/mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp b/mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp index 8d8ce6381bd..10bca415d67 100644 --- a/mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp +++ b/mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp @@ -267,19 +267,6 @@ NS_IMETHODIMP nsDeviceContextBeOS::GetSystemFont(nsSystemFontID aID, nsFont *aFo return status; } -NS_IMETHODIMP nsDeviceContextBeOS::ConvertPixel(nscolor aColor, - PRUint32 & aPixel) -{ - // koehler@mythrium.com: - // I think this fill the 32 bits pixel with the desired color - // It's possible that the nscolor is not representing that color - // if you just dump it inside a 32 bits value. - aPixel = aColor; - - return NS_OK; -} - - NS_IMETHODIMP nsDeviceContextBeOS::CheckFontExistence(const nsString& aFontName) { return nsFontMetricsBeOS::FamilyExists(aFontName); diff --git a/mozilla/gfx/src/beos/nsDeviceContextBeOS.h b/mozilla/gfx/src/beos/nsDeviceContextBeOS.h index 1c6c61ddc46..3bee46dfacb 100644 --- a/mozilla/gfx/src/beos/nsDeviceContextBeOS.h +++ b/mozilla/gfx/src/beos/nsDeviceContextBeOS.h @@ -64,7 +64,6 @@ public: NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const; NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const; - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); NS_IMETHOD CheckFontExistence(const nsString& aFontName); NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); diff --git a/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp b/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp index c86faffc592..ee115c9cf16 100644 --- a/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp +++ b/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp @@ -443,15 +443,6 @@ NS_IMETHODIMP nsDeviceContextGTK::GetSystemFont(nsSystemFontID aID, nsFont *aFon return status; } -NS_IMETHODIMP nsDeviceContextGTK::ConvertPixel(nscolor aColor, - PRUint32 & aPixel) -{ - aPixel = ::gdk_rgb_xpixel_from_rgb (NS_TO_GDK_RGB(aColor)); - - return NS_OK; -} - - NS_IMETHODIMP nsDeviceContextGTK::CheckFontExistence(const nsString& aFontName) { return NS_FontMetricsFamilyExists(this, aFontName); diff --git a/mozilla/gfx/src/gtk/nsDeviceContextGTK.h b/mozilla/gfx/src/gtk/nsDeviceContextGTK.h index 68bcdc494bf..66bf76df0bc 100644 --- a/mozilla/gfx/src/gtk/nsDeviceContextGTK.h +++ b/mozilla/gfx/src/gtk/nsDeviceContextGTK.h @@ -69,7 +69,6 @@ public: NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const; NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const; - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); NS_IMETHOD CheckFontExistence(const nsString& aFontName); NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); diff --git a/mozilla/gfx/src/mac/nsDeviceContextMac.cpp b/mozilla/gfx/src/mac/nsDeviceContextMac.cpp index a9db88df12d..5dd45c0260f 100644 --- a/mozilla/gfx/src/mac/nsDeviceContextMac.cpp +++ b/mozilla/gfx/src/mac/nsDeviceContextMac.cpp @@ -437,17 +437,6 @@ NS_IMETHODIMP nsDeviceContextMac::GetDepth(PRUint32& aDepth) return NS_OK; } -/** --------------------------------------------------- - * See documentation in nsIDeviceContext.h - * @update 12/9/98 dwc - */ -NS_IMETHODIMP nsDeviceContextMac :: ConvertPixel(nscolor aColor, PRUint32 & aPixel) -{ - aPixel = aColor; - return NS_OK; -} - - /** --------------------------------------------------- * See documentation in nsIDeviceContext.h * @update 12/9/98 dwc diff --git a/mozilla/gfx/src/mac/nsDeviceContextMac.h b/mozilla/gfx/src/mac/nsDeviceContextMac.h index 9d553bf4f95..fc599529b76 100644 --- a/mozilla/gfx/src/mac/nsDeviceContextMac.h +++ b/mozilla/gfx/src/mac/nsDeviceContextMac.h @@ -69,7 +69,6 @@ public: NS_IMETHOD CheckFontExistence(const nsString& aFontName); NS_IMETHOD GetDepth(PRUint32& aDepth); - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); NS_IMETHOD GetRect(nsRect &aRect); diff --git a/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp b/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp index f7e83d7bb60..a128d80e797 100644 --- a/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp +++ b/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp @@ -623,12 +623,6 @@ int prefChanged(const char *aPref, void *aClosure) return 0; } -NS_IMETHODIMP nsDeviceContextOS2 :: ConvertPixel(nscolor aColor, PRUint32 & aPixel) -{ - aPixel = aColor; - return NS_OK; -} - NS_IMETHODIMP nsDeviceContextOS2 :: GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight) { #ifdef NS_PRINT_PREVIEW diff --git a/mozilla/gfx/src/os2/nsDeviceContextOS2.h b/mozilla/gfx/src/os2/nsDeviceContextOS2.h index 64d4358bc49..a049aa6b507 100644 --- a/mozilla/gfx/src/os2/nsDeviceContextOS2.h +++ b/mozilla/gfx/src/os2/nsDeviceContextOS2.h @@ -65,8 +65,6 @@ public: NS_IMETHOD GetDepth(PRUint32& aDepth); - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); - NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); NS_IMETHOD GetRect(nsRect &aRect); NS_IMETHOD GetClientRect(nsRect &aRect); diff --git a/mozilla/gfx/src/photon/nsDeviceContextPh.h b/mozilla/gfx/src/photon/nsDeviceContextPh.h index f10b422d9d5..1fd1af4d7ae 100644 --- a/mozilla/gfx/src/photon/nsDeviceContextPh.h +++ b/mozilla/gfx/src/photon/nsDeviceContextPh.h @@ -98,13 +98,6 @@ public: return nsnull == aSurface ? NS_ERROR_OUT_OF_MEMORY : NS_OK; } - inline - NS_IMETHODIMP ConvertPixel(nscolor aColor, PRUint32 & aPixel) - { - aPixel = NS_TO_PH_RGB(aColor); - return NS_OK; - } - NS_IMETHOD CheckFontExistence(const nsString& aFontName); NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); diff --git a/mozilla/gfx/src/ps/nsDeviceContextPS.cpp b/mozilla/gfx/src/ps/nsDeviceContextPS.cpp index 08eca35f147..56b6b0149e1 100644 --- a/mozilla/gfx/src/ps/nsDeviceContextPS.cpp +++ b/mozilla/gfx/src/ps/nsDeviceContextPS.cpp @@ -504,18 +504,6 @@ NS_IMETHODIMP nsDeviceContextPS::EndPage(void) return NS_OK; } -/** --------------------------------------------------- - * See documentation in nsIDeviceContext.h - * @update 12/21/98 dwc - */ -NS_IMETHODIMP nsDeviceContextPS::ConvertPixel(nscolor aColor, PRUint32 & aPixel) -{ - PR_LOG(nsDeviceContextPSLM, PR_LOG_DEBUG, ("nsDeviceContextPS::ConvertPixel()\n")); - - aPixel = aColor; - return NS_OK; -} - class nsFontCachePS : public nsFontCache { public: diff --git a/mozilla/gfx/src/ps/nsDeviceContextPS.h b/mozilla/gfx/src/ps/nsDeviceContextPS.h index c716528a357..65baa6f9921 100644 --- a/mozilla/gfx/src/ps/nsDeviceContextPS.h +++ b/mozilla/gfx/src/ps/nsDeviceContextPS.h @@ -80,7 +80,6 @@ public: NS_IMETHOD CheckFontExistence(const nsString& aFontName); NS_IMETHOD GetDepth(PRUint32& aDepth); - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); NS_IMETHOD GetClientRect(nsRect &aRect); diff --git a/mozilla/gfx/src/windows/nsDeviceContextWin.cpp b/mozilla/gfx/src/windows/nsDeviceContextWin.cpp index 8afb0644dbc..6b796404cbe 100644 --- a/mozilla/gfx/src/windows/nsDeviceContextWin.cpp +++ b/mozilla/gfx/src/windows/nsDeviceContextWin.cpp @@ -641,12 +641,6 @@ NS_IMETHODIMP nsDeviceContextWin::GetPaletteInfo(nsPaletteInfo& aPaletteInfo) return NS_OK; } -NS_IMETHODIMP nsDeviceContextWin :: ConvertPixel(nscolor aColor, PRUint32 & aPixel) -{ - aPixel = aColor; - return NS_OK; -} - NS_IMETHODIMP nsDeviceContextWin :: GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight) { #ifdef NS_PRINT_PREVIEW diff --git a/mozilla/gfx/src/windows/nsDeviceContextWin.h b/mozilla/gfx/src/windows/nsDeviceContextWin.h index db4c33c9d6f..15caf8467f6 100644 --- a/mozilla/gfx/src/windows/nsDeviceContextWin.h +++ b/mozilla/gfx/src/windows/nsDeviceContextWin.h @@ -75,8 +75,6 @@ public: NS_IMETHOD GetPaletteInfo(nsPaletteInfo&); - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); - NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); NS_IMETHOD GetRect(nsRect &aRect); NS_IMETHOD GetClientRect(nsRect &aRect); diff --git a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp index 4c4c93d9bf0..ef060be8192 100644 --- a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp +++ b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp @@ -365,16 +365,6 @@ NS_IMETHODIMP nsDeviceContextXlib::GetSystemFont(nsSystemFontID anID, nsFont *aF return NS_OK; } -NS_IMETHODIMP nsDeviceContextXlib::ConvertPixel(nscolor aColor, PRUint32 & aPixel) -{ - PR_LOG(DeviceContextXlibLM, PR_LOG_DEBUG, ("nsDeviceContextXlib::ConvertPixel()\n")); - aPixel = xxlib_rgb_xpixel_from_rgb(mXlibRgbHandle, - NS_RGB(NS_GET_B(aColor), - NS_GET_G(aColor), - NS_GET_R(aColor))); - return NS_OK; -} - NS_IMETHODIMP nsDeviceContextXlib::CheckFontExistence(const nsString& aFontName) { return nsFontMetricsXlib::FamilyExists(mFontMetricsContext, aFontName); diff --git a/mozilla/gfx/src/xlib/nsDeviceContextXlib.h b/mozilla/gfx/src/xlib/nsDeviceContextXlib.h index 1875d9a9abf..fd84af8d501 100644 --- a/mozilla/gfx/src/xlib/nsDeviceContextXlib.h +++ b/mozilla/gfx/src/xlib/nsDeviceContextXlib.h @@ -65,7 +65,6 @@ public: NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const; NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const; - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); NS_IMETHOD CheckFontExistence(const nsString& aFontName); NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); diff --git a/mozilla/gfx/src/xprint/nsDeviceContextXP.cpp b/mozilla/gfx/src/xprint/nsDeviceContextXP.cpp index 4085d8a84e5..eccad5e1a9a 100644 --- a/mozilla/gfx/src/xprint/nsDeviceContextXP.cpp +++ b/mozilla/gfx/src/xprint/nsDeviceContextXP.cpp @@ -372,21 +372,6 @@ NS_IMETHODIMP nsDeviceContextXp::EndPage(void) return mPrintContext->EndPage(); } -/** --------------------------------------------------- - * See documentation in nsIDeviceContext.h - * @update 12/21/98 dwc - */ -NS_IMETHODIMP nsDeviceContextXp :: ConvertPixel(nscolor aColor, - PRUint32 & aPixel) -{ - PR_LOG(nsDeviceContextXpLM, PR_LOG_DEBUG, ("nsDeviceContextXp::ConvertPixel()\n")); - aPixel = xxlib_rgb_xpixel_from_rgb(GetXlibRgbHandle(), - NS_RGB(NS_GET_B(aColor), - NS_GET_G(aColor), - NS_GET_R(aColor))); - return NS_OK; -} - NS_IMETHODIMP nsDeviceContextXp::GetPrintContext(nsXPrintContext*& aContext) { diff --git a/mozilla/gfx/src/xprint/nsDeviceContextXP.h b/mozilla/gfx/src/xprint/nsDeviceContextXP.h index afca5c6207c..0fde7041eff 100644 --- a/mozilla/gfx/src/xprint/nsDeviceContextXP.h +++ b/mozilla/gfx/src/xprint/nsDeviceContextXP.h @@ -78,7 +78,6 @@ public: NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const; NS_IMETHOD CheckFontExistence(const nsString& aFontName); - NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel); NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight); NS_IMETHOD GetRect(nsRect &aRect);