From 87745476138e557c8cebd6bf25dc5978ec20fb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCchler?= Date: Thu, 7 Apr 2011 18:04:40 -0700 Subject: [PATCH] Bug 266236 part 3: Mechanical rename of nsIRenderingContext and nsThebesRenderingContext to nsRenderingContext. Mechanical substitution of nsRefPtr for nsCOMPtr. --- accessible/src/msaa/nsTextAccessibleWrap.cpp | 7 +--- accessible/src/msaa/nsTextAccessibleWrap.h | 2 +- .../canvas/public/nsICanvasElementExternal.h | 2 +- .../canvas/src/nsCanvasRenderingContext2D.cpp | 2 +- .../html/content/public/nsHTMLCanvasElement.h | 2 +- .../html/content/src/nsHTMLAudioElement.cpp | 2 +- .../html/content/src/nsHTMLMediaElement.cpp | 2 +- .../html/content/src/nsHTMLVideoElement.cpp | 2 +- content/media/nsMediaDecoder.cpp | 2 +- embedding/browser/webBrowser/nsWebBrowser.cpp | 2 +- gfx/layers/basic/BasicLayers.cpp | 2 +- gfx/src/nsIDeviceContext.h | 8 ++-- gfx/src/nsIThebesFontMetrics.h | 16 +++---- gfx/src/nsITheme.h | 6 +-- gfx/src/nsRenderingContext.cpp | 2 +- gfx/src/nsThebesDeviceContext.cpp | 16 +++---- gfx/src/nsThebesDeviceContext.h | 8 ++-- gfx/src/nsThebesFontMetrics.cpp | 16 +++---- gfx/src/nsThebesFontMetrics.h | 22 +++++----- layout/base/FrameLayerBuilder.cpp | 2 +- layout/base/nsBidiPresUtils.cpp | 14 +++---- layout/base/nsBidiPresUtils.h | 10 ++--- layout/base/nsCSSRendering.cpp | 36 ++++++++-------- layout/base/nsCSSRendering.h | 22 +++++----- layout/base/nsCaret.cpp | 4 +- layout/base/nsCaret.h | 4 +- layout/base/nsDisplayList.cpp | 26 ++++++------ layout/base/nsDisplayList.h | 38 ++++++++--------- layout/base/nsDocumentViewer.cpp | 2 +- layout/base/nsIPresShell.h | 6 +-- layout/base/nsLayoutUtils.cpp | 32 +++++++------- layout/base/nsLayoutUtils.h | 28 ++++++------- layout/base/nsPresContext.cpp | 2 +- layout/base/nsPresContext.h | 2 +- layout/base/nsPresShell.cpp | 24 +++++------ layout/forms/nsButtonFrameRenderer.cpp | 18 ++++---- layout/forms/nsButtonFrameRenderer.h | 4 +- layout/forms/nsComboboxControlFrame.cpp | 12 +++--- layout/forms/nsComboboxControlFrame.h | 8 ++-- layout/forms/nsFieldSetFrame.cpp | 24 +++++------ layout/forms/nsFileControlFrame.cpp | 2 +- layout/forms/nsFileControlFrame.h | 2 +- layout/forms/nsGfxCheckboxControlFrame.cpp | 4 +- layout/forms/nsGfxRadioControlFrame.cpp | 2 +- layout/forms/nsHTMLButtonControlFrame.cpp | 6 +-- layout/forms/nsHTMLButtonControlFrame.h | 6 +-- layout/forms/nsImageControlFrame.cpp | 2 +- layout/forms/nsIsIndexFrame.cpp | 2 +- layout/forms/nsIsIndexFrame.h | 2 +- layout/forms/nsListControlFrame.cpp | 6 +-- layout/forms/nsListControlFrame.h | 6 +-- layout/forms/nsSelectsAreaFrame.cpp | 2 +- layout/forms/nsTextControlFrame.cpp | 6 +-- layout/forms/nsTextControlFrame.h | 6 +-- layout/generic/nsBRFrame.cpp | 18 ++++---- layout/generic/nsBlockFrame.cpp | 6 +-- layout/generic/nsBlockFrame.h | 4 +- layout/generic/nsBulletFrame.cpp | 14 +++---- layout/generic/nsBulletFrame.h | 8 ++-- layout/generic/nsCanvasFrame.cpp | 12 +++--- layout/generic/nsCanvasFrame.h | 10 ++--- layout/generic/nsColumnSetFrame.cpp | 14 +++---- layout/generic/nsContainerFrame.cpp | 6 +-- layout/generic/nsContainerFrame.h | 4 +- layout/generic/nsFirstLetterFrame.cpp | 10 ++--- layout/generic/nsFirstLetterFrame.h | 10 ++--- layout/generic/nsFrame.cpp | 38 ++++++++--------- layout/generic/nsFrame.h | 18 ++++---- layout/generic/nsFrameSetFrame.cpp | 16 +++---- layout/generic/nsFrameSetFrame.h | 2 +- layout/generic/nsGfxScrollFrame.cpp | 6 +-- layout/generic/nsGfxScrollFrame.h | 12 +++--- layout/generic/nsHTMLCanvasFrame.cpp | 6 +-- layout/generic/nsHTMLCanvasFrame.h | 6 +-- layout/generic/nsHTMLContainerFrame.cpp | 10 ++--- layout/generic/nsHTMLReflowMetrics.h | 2 +- layout/generic/nsHTMLReflowState.cpp | 4 +- layout/generic/nsHTMLReflowState.h | 10 ++--- layout/generic/nsIFrame.h | 20 ++++----- layout/generic/nsIScrollableFrame.h | 2 +- layout/generic/nsImageFrame.cpp | 24 +++++------ layout/generic/nsImageFrame.h | 18 ++++---- layout/generic/nsImageMap.cpp | 22 +++++----- layout/generic/nsImageMap.h | 4 +- layout/generic/nsInlineFrame.cpp | 8 ++-- layout/generic/nsInlineFrame.h | 6 +-- layout/generic/nsLeafFrame.cpp | 6 +-- layout/generic/nsLeafFrame.h | 6 +-- layout/generic/nsLineLayout.cpp | 4 +- layout/generic/nsObjectFrame.cpp | 24 +++++------ layout/generic/nsObjectFrame.h | 12 +++--- layout/generic/nsPageContentFrame.cpp | 4 +- layout/generic/nsPageContentFrame.h | 2 +- layout/generic/nsPageFrame.cpp | 20 ++++----- layout/generic/nsPageFrame.h | 12 +++--- layout/generic/nsPlaceholderFrame.cpp | 12 +++--- layout/generic/nsPlaceholderFrame.h | 8 ++-- layout/generic/nsSimplePageSequence.cpp | 8 ++-- layout/generic/nsSimplePageSequence.h | 2 +- layout/generic/nsSubDocumentFrame.cpp | 10 ++--- layout/generic/nsSubDocumentFrame.h | 8 ++-- layout/generic/nsTextFrame.h | 20 ++++----- layout/generic/nsTextFrameThebes.cpp | 38 ++++++++--------- layout/generic/nsVideoFrame.cpp | 10 ++--- layout/generic/nsVideoFrame.h | 8 ++-- layout/generic/nsViewportFrame.cpp | 4 +- layout/generic/nsViewportFrame.h | 4 +- layout/inspector/src/inFlasher.cpp | 6 +-- layout/inspector/src/inFlasher.h | 6 +-- layout/inspector/src/inLayoutUtils.h | 2 +- layout/mathml/nsIMathMLFrame.h | 4 +- layout/mathml/nsMathMLChar.cpp | 42 +++++++++---------- layout/mathml/nsMathMLChar.h | 16 +++---- layout/mathml/nsMathMLContainerFrame.cpp | 24 +++++------ layout/mathml/nsMathMLContainerFrame.h | 18 ++++---- layout/mathml/nsMathMLForeignFrameWrapper.cpp | 2 +- layout/mathml/nsMathMLFrame.cpp | 12 +++--- layout/mathml/nsMathMLFrame.h | 8 ++-- layout/mathml/nsMathMLTokenFrame.cpp | 4 +- layout/mathml/nsMathMLTokenFrame.h | 2 +- layout/mathml/nsMathMLmactionFrame.cpp | 4 +- layout/mathml/nsMathMLmactionFrame.h | 2 +- layout/mathml/nsMathMLmencloseFrame.cpp | 12 +++--- layout/mathml/nsMathMLmencloseFrame.h | 6 +-- layout/mathml/nsMathMLmfencedFrame.cpp | 8 ++-- layout/mathml/nsMathMLmfencedFrame.h | 4 +- layout/mathml/nsMathMLmfracFrame.cpp | 12 +++--- layout/mathml/nsMathMLmfracFrame.h | 6 +-- layout/mathml/nsMathMLmmultiscriptsFrame.cpp | 4 +- layout/mathml/nsMathMLmmultiscriptsFrame.h | 2 +- layout/mathml/nsMathMLmoFrame.cpp | 6 +-- layout/mathml/nsMathMLmoFrame.h | 4 +- layout/mathml/nsMathMLmoverFrame.cpp | 4 +- layout/mathml/nsMathMLmoverFrame.h | 2 +- layout/mathml/nsMathMLmpaddedFrame.cpp | 4 +- layout/mathml/nsMathMLmpaddedFrame.h | 2 +- layout/mathml/nsMathMLmphantomFrame.cpp | 2 +- layout/mathml/nsMathMLmrootFrame.cpp | 6 +-- layout/mathml/nsMathMLmrootFrame.h | 2 +- layout/mathml/nsMathMLmrowFrame.cpp | 2 +- layout/mathml/nsMathMLmspaceFrame.cpp | 2 +- layout/mathml/nsMathMLmstyleFrame.cpp | 2 +- layout/mathml/nsMathMLmsubFrame.cpp | 6 +-- layout/mathml/nsMathMLmsubFrame.h | 4 +- layout/mathml/nsMathMLmsubsupFrame.cpp | 6 +-- layout/mathml/nsMathMLmsubsupFrame.h | 4 +- layout/mathml/nsMathMLmsupFrame.cpp | 6 +-- layout/mathml/nsMathMLmsupFrame.h | 4 +- layout/mathml/nsMathMLmtableFrame.cpp | 2 +- layout/mathml/nsMathMLmunderFrame.cpp | 4 +- layout/mathml/nsMathMLmunderFrame.h | 2 +- layout/mathml/nsMathMLmunderoverFrame.cpp | 4 +- layout/mathml/nsMathMLmunderoverFrame.h | 2 +- layout/printing/nsPrintEngine.cpp | 14 +++---- layout/printing/nsPrintEngine.h | 6 +-- .../svg/base/src/nsSVGForeignObjectFrame.cpp | 4 +- layout/svg/base/src/nsSVGIntegrationUtils.cpp | 8 ++-- layout/svg/base/src/nsSVGIntegrationUtils.h | 6 +-- layout/svg/base/src/nsSVGOuterSVGFrame.cpp | 12 +++--- layout/svg/base/src/nsSVGOuterSVGFrame.h | 8 ++-- layout/svg/base/src/nsSVGUtils.cpp | 4 +- layout/svg/base/src/nsSVGUtils.h | 8 ++-- layout/tables/BasicTableLayoutStrategy.cpp | 14 +++---- layout/tables/BasicTableLayoutStrategy.h | 8 ++-- layout/tables/FixedTableLayoutStrategy.cpp | 4 +- layout/tables/FixedTableLayoutStrategy.h | 4 +- layout/tables/nsITableLayoutStrategy.h | 6 +-- layout/tables/nsTableCellFrame.cpp | 24 +++++------ layout/tables/nsTableCellFrame.h | 14 +++---- layout/tables/nsTableFrame.cpp | 42 +++++++++---------- layout/tables/nsTableFrame.h | 18 ++++---- layout/tables/nsTableOuterFrame.cpp | 12 +++--- layout/tables/nsTableOuterFrame.h | 8 ++-- layout/tables/nsTablePainter.cpp | 2 +- layout/tables/nsTablePainter.h | 4 +- layout/tables/nsTableRowFrame.cpp | 6 +-- layout/tables/nsTableRowGroupFrame.cpp | 6 +-- layout/xul/base/src/nsBox.cpp | 4 +- layout/xul/base/src/nsBoxFrame.cpp | 20 ++++----- layout/xul/base/src/nsBoxFrame.h | 14 +++---- layout/xul/base/src/nsBoxLayoutState.cpp | 2 +- layout/xul/base/src/nsBoxLayoutState.h | 8 ++-- layout/xul/base/src/nsDocElementBoxFrame.cpp | 2 +- layout/xul/base/src/nsGroupBoxFrame.cpp | 8 ++-- layout/xul/base/src/nsIBoxLayout.h | 2 +- layout/xul/base/src/nsImageBoxFrame.cpp | 8 ++-- layout/xul/base/src/nsImageBoxFrame.h | 2 +- layout/xul/base/src/nsLeafBoxFrame.cpp | 8 ++-- layout/xul/base/src/nsLeafBoxFrame.h | 6 +-- layout/xul/base/src/nsListBoxBodyFrame.cpp | 4 +- layout/xul/base/src/nsRootBoxFrame.cpp | 2 +- layout/xul/base/src/nsSplitterFrame.cpp | 2 +- layout/xul/base/src/nsTextBoxFrame.cpp | 26 ++++++------ layout/xul/base/src/nsTextBoxFrame.h | 14 +++---- .../xul/base/src/tree/src/nsTreeBodyFrame.cpp | 40 +++++++++--------- .../xul/base/src/tree/src/nsTreeBodyFrame.h | 30 ++++++------- tools/trace-malloc/types.dat | 2 +- view/public/nsIViewManager.h | 2 +- view/public/nsIViewObserver.h | 2 +- widget/public/nsGUIEvent.h | 2 +- widget/public/nsIWidget.h | 2 +- widget/src/android/nsWindow.cpp | 2 +- widget/src/cocoa/nsNativeThemeCocoa.h | 4 +- widget/src/cocoa/nsNativeThemeCocoa.mm | 6 +-- widget/src/gtk2/nsNativeThemeGTK.cpp | 4 +- widget/src/gtk2/nsNativeThemeGTK.h | 4 +- widget/src/gtk2/nsWindow.cpp | 2 +- widget/src/qt/nsNativeThemeQt.cpp | 8 ++-- widget/src/qt/nsNativeThemeQt.h | 8 ++-- widget/src/qt/nsWindow.cpp | 2 +- widget/src/windows/nsNativeThemeWin.cpp | 10 ++--- widget/src/windows/nsNativeThemeWin.h | 8 ++-- widget/src/windows/nsWindowGfx.cpp | 2 +- widget/src/xpwidgets/nsBaseDragService.h | 2 +- 214 files changed, 932 insertions(+), 937 deletions(-) diff --git a/accessible/src/msaa/nsTextAccessibleWrap.cpp b/accessible/src/msaa/nsTextAccessibleWrap.cpp index 43d4d25a91c9..f7e0ad5e0ef2 100644 --- a/accessible/src/msaa/nsTextAccessibleWrap.cpp +++ b/accessible/src/msaa/nsTextAccessibleWrap.cpp @@ -36,19 +36,14 @@ * * ***** END LICENSE BLOCK ***** */ -// NOTE: alphabetically ordered #include "nsTextAccessibleWrap.h" #include "ISimpleDOMText_i.c" #include "nsCoreUtils.h" #include "nsDocAccessible.h" - -#include "nsIThebesFontMetrics.h" #include "nsIFrame.h" +#include "nsIThebesFontMetrics.h" #include "nsPresContext.h" -#include "nsIPresShell.h" -#include "nsIRenderingContext.h" -#include "nsIComponentManager.h" #include "gfxFont.h" diff --git a/accessible/src/msaa/nsTextAccessibleWrap.h b/accessible/src/msaa/nsTextAccessibleWrap.h index 356c2e1bccff..b0de4df21126 100644 --- a/accessible/src/msaa/nsTextAccessibleWrap.h +++ b/accessible/src/msaa/nsTextAccessibleWrap.h @@ -44,7 +44,7 @@ #include "nsRect.h" class nsIFrame; -class nsIRenderingContext; +class nsRenderingContext; class nsTextAccessibleWrap : public nsTextAccessible, public ISimpleDOMText diff --git a/content/canvas/public/nsICanvasElementExternal.h b/content/canvas/public/nsICanvasElementExternal.h index 0ecc65c4de17..62b30a94face 100644 --- a/content/canvas/public/nsICanvasElementExternal.h +++ b/content/canvas/public/nsICanvasElementExternal.h @@ -48,7 +48,7 @@ struct gfxRect; #define NS_ICANVASELEMENTEXTERNAL_IID \ { 0x51870f54, 0x6c4c, 0x469a, {0xad, 0x46, 0xf0, 0xa9, 0x8e, 0x32, 0xa7, 0xe2 } } -class nsIRenderingContext; +class nsRenderingContext; class nsICanvasRenderingContextInternal; struct _cairo_surface; diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index 14f1010bf31b..5a8f0c462cc6 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -76,7 +76,7 @@ #include "nsReadableUtils.h" #include "nsColor.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsIDeviceContext.h" #include "nsGfxCIID.h" #include "nsIScriptSecurityManager.h" diff --git a/content/html/content/public/nsHTMLCanvasElement.h b/content/html/content/public/nsHTMLCanvasElement.h index 99b3a9a41c52..52dc798e09eb 100644 --- a/content/html/content/public/nsHTMLCanvasElement.h +++ b/content/html/content/public/nsHTMLCanvasElement.h @@ -48,7 +48,7 @@ #include "nsDOMError.h" #include "nsNodeInfoManager.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsICanvasRenderingContextInternal.h" #include "nsICanvasElementExternal.h" diff --git a/content/html/content/src/nsHTMLAudioElement.cpp b/content/html/content/src/nsHTMLAudioElement.cpp index 2cec15d8749f..630ad57859fc 100644 --- a/content/html/content/src/nsHTMLAudioElement.cpp +++ b/content/html/content/src/nsHTMLAudioElement.cpp @@ -61,7 +61,7 @@ #include "jstypedarray.h" #include "nsJSUtils.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsITimer.h" #include "nsEventDispatcher.h" diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp index 8e9bd2c17a37..ca09e2835816 100644 --- a/content/html/content/src/nsHTMLMediaElement.cpp +++ b/content/html/content/src/nsHTMLMediaElement.cpp @@ -65,7 +65,7 @@ #include "nsIXPConnect.h" #include "jsapi.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsITimer.h" #include "nsEventDispatcher.h" diff --git a/content/html/content/src/nsHTMLVideoElement.cpp b/content/html/content/src/nsHTMLVideoElement.cpp index cca44102e242..25d6e2963099 100644 --- a/content/html/content/src/nsHTMLVideoElement.cpp +++ b/content/html/content/src/nsHTMLVideoElement.cpp @@ -58,7 +58,7 @@ #include "nsIXPConnect.h" #include "jsapi.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsITimer.h" #include "nsEventDispatcher.h" diff --git a/content/media/nsMediaDecoder.cpp b/content/media/nsMediaDecoder.cpp index 38234daeb866..52e31158d925 100644 --- a/content/media/nsMediaDecoder.cpp +++ b/content/media/nsMediaDecoder.cpp @@ -47,7 +47,7 @@ #include "nsIDOMHTMLMediaElement.h" #include "nsNetUtil.h" #include "nsHTMLMediaElement.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "gfxContext.h" #include "nsPresContext.h" #include "nsDOMError.h" diff --git a/embedding/browser/webBrowser/nsWebBrowser.cpp b/embedding/browser/webBrowser/nsWebBrowser.cpp index f0b35569008e..b335a29edbde 100644 --- a/embedding/browser/webBrowser/nsWebBrowser.cpp +++ b/embedding/browser/webBrowser/nsWebBrowser.cpp @@ -76,7 +76,7 @@ #include "gfxContext.h" // for painting the background window -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsIDeviceContext.h" #include "nsIRegion.h" #include "nsILookAndFeel.h" diff --git a/gfx/layers/basic/BasicLayers.cpp b/gfx/layers/basic/BasicLayers.cpp index 55ac3fb5b772..0ed40484b5b6 100644 --- a/gfx/layers/basic/BasicLayers.cpp +++ b/gfx/layers/basic/BasicLayers.cpp @@ -48,7 +48,7 @@ #include "nsTArray.h" #include "nsGUIEvent.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "gfxContext.h" #include "gfxImageSurface.h" #include "gfxPattern.h" diff --git a/gfx/src/nsIDeviceContext.h b/gfx/src/nsIDeviceContext.h index 4e0c55194956..2851ddd4ef95 100644 --- a/gfx/src/nsIDeviceContext.h +++ b/gfx/src/nsIDeviceContext.h @@ -220,7 +220,7 @@ public: * @param aContext out parameter for new rendering context * @return error status */ - NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) = 0; + NS_IMETHOD CreateRenderingContext(nsIView *aView, nsRenderingContext *&aContext) = 0; /** * Create a rendering context and initialize it from an nsIWidget @@ -228,21 +228,21 @@ public: * @param aContext out parameter for new rendering context * @return error status */ - NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) = 0; + NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsRenderingContext *&aContext) = 0; /** * Create a rendering context and initialize it. * @param aContext out parameter for new rendering context * @return error status */ - NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext) = 0; + NS_IMETHOD CreateRenderingContext(nsRenderingContext *&aContext) = 0; /** * Create an uninitalised rendering context. * @param aContext out parameter for new rendering context * @return error status */ - NS_IMETHOD CreateRenderingContextInstance(nsIRenderingContext *&aContext) = 0; + NS_IMETHOD CreateRenderingContextInstance(nsRenderingContext *&aContext) = 0; /** * We are in the process of creating the native widget for aWidget. diff --git a/gfx/src/nsIThebesFontMetrics.h b/gfx/src/nsIThebesFontMetrics.h index bb9289bc7d8d..43e80f9c111f 100644 --- a/gfx/src/nsIThebesFontMetrics.h +++ b/gfx/src/nsIThebesFontMetrics.h @@ -51,10 +51,10 @@ public: // width in points, not twips. Callers must convert it if they // want it in another format. virtual nsresult GetWidth(const char* aString, PRUint32 aLength, - nscoord& aWidth, nsThebesRenderingContext *aContext) = 0; + nscoord& aWidth, nsRenderingContext *aContext) = 0; virtual nsresult GetWidth(const PRUnichar* aString, PRUint32 aLength, nscoord& aWidth, PRInt32 *aFontID, - nsThebesRenderingContext *aContext) = 0; + nsRenderingContext *aContext) = 0; // Get the text dimensions for this string virtual nsresult GetTextDimensions(const PRUnichar* aString, @@ -84,16 +84,16 @@ public: virtual nsresult DrawString(const char *aString, PRUint32 aLength, nscoord aX, nscoord aY, const nscoord* aSpacing, - nsThebesRenderingContext *aContext) = 0; + nsRenderingContext *aContext) = 0; virtual nsresult DrawString(const PRUnichar* aString, PRUint32 aLength, nscoord aX, nscoord aY, PRInt32 aFontID, const nscoord* aSpacing, - nsThebesRenderingContext *aContext) = 0; + nsRenderingContext *aContext) = 0; virtual nsresult DrawString(const PRUnichar* aString, PRUint32 aLength, nscoord aX, nscoord aY, - nsIRenderingContext *aContext, - nsIRenderingContext *aTextRunConstructionContext) = 0; + nsRenderingContext *aContext, + nsRenderingContext *aTextRunConstructionContext) = 0; #ifdef MOZ_MATHML // These two functions get the bounding metrics for this handle, @@ -101,12 +101,12 @@ public: // caller will have to update them to twips before passing it // back. virtual nsresult GetBoundingMetrics(const char *aString, PRUint32 aLength, - nsThebesRenderingContext *aContext, + nsRenderingContext *aContext, nsBoundingMetrics &aBoundingMetrics) = 0; // aCachedOffset will be updated with a new offset. virtual nsresult GetBoundingMetrics(const PRUnichar *aString, PRUint32 aLength, - nsThebesRenderingContext *aContext, + nsRenderingContext *aContext, nsBoundingMetrics &aBoundingMetrics) = 0; #endif /* MOZ_MATHML */ diff --git a/gfx/src/nsITheme.h b/gfx/src/nsITheme.h index 56c987067bdd..8cc89528e851 100644 --- a/gfx/src/nsITheme.h +++ b/gfx/src/nsITheme.h @@ -51,7 +51,7 @@ struct nsIntSize; struct nsFont; struct nsIntMargin; class nsPresContext; -class nsIRenderingContext; +class nsRenderingContext; class nsIDeviceContext; class nsIFrame; class nsIContent; @@ -95,7 +95,7 @@ public: * @param aRect the rectangle defining the area occupied by the widget * @param aDirtyRect the rectangle that needs to be drawn */ - NS_IMETHOD DrawWidgetBackground(nsIRenderingContext* aContext, + NS_IMETHOD DrawWidgetBackground(nsRenderingContext* aContext, nsIFrame* aFrame, PRUint8 aWidgetType, const nsRect& aRect, @@ -150,7 +150,7 @@ public: * minimum size; if false, this size is the only valid size for the * widget. */ - NS_IMETHOD GetMinimumWidgetSize(nsIRenderingContext* aContext, + NS_IMETHOD GetMinimumWidgetSize(nsRenderingContext* aContext, nsIFrame* aFrame, PRUint8 aWidgetType, nsIntSize* aResult, diff --git a/gfx/src/nsRenderingContext.cpp b/gfx/src/nsRenderingContext.cpp index b29198285ae6..3cb776297425 100644 --- a/gfx/src/nsRenderingContext.cpp +++ b/gfx/src/nsRenderingContext.cpp @@ -108,7 +108,7 @@ static PRInt32 FindSafeLength(nsRenderingContext* aContext, } ////////////////////////////////////////////////////////////////////// -//// nsIRenderingContext +//// nsRenderingContext nsresult nsRenderingContext::Init(nsIDeviceContext* aContext, gfxASurface *aThebesSurface) diff --git a/gfx/src/nsThebesDeviceContext.cpp b/gfx/src/nsThebesDeviceContext.cpp index cd5ad439ed02..a0f20ad0f1da 100644 --- a/gfx/src/nsThebesDeviceContext.cpp +++ b/gfx/src/nsThebesDeviceContext.cpp @@ -50,7 +50,7 @@ #include "mozilla/Services.h" #include "nsThebesDeviceContext.h" -#include "nsThebesRenderingContext.h" +#include "nsRenderingContext.h" #include "gfxUserFontSet.h" #include "gfxPlatform.h" @@ -711,7 +711,7 @@ nsThebesDeviceContext::Init(nsIWidget *aWidget) NS_IMETHODIMP nsThebesDeviceContext::CreateRenderingContext(nsIView *aView, - nsIRenderingContext *&aContext) + nsRenderingContext *&aContext) { // This is currently only called by the caret code NS_ENSURE_ARG_POINTER(aView); @@ -725,12 +725,12 @@ nsThebesDeviceContext::CreateRenderingContext(nsIView *aView, NS_IMETHODIMP nsThebesDeviceContext::CreateRenderingContext(nsIWidget *aWidget, - nsIRenderingContext *&aContext) + nsRenderingContext *&aContext) { nsresult rv; aContext = nsnull; - nsCOMPtr pContext; + nsRefPtr pContext; rv = CreateRenderingContextInstance(*getter_AddRefs(pContext)); if (NS_SUCCEEDED(rv)) { nsRefPtr surface(aWidget->GetThebesSurface()); @@ -749,12 +749,12 @@ nsThebesDeviceContext::CreateRenderingContext(nsIWidget *aWidget, } NS_IMETHODIMP -nsThebesDeviceContext::CreateRenderingContext(nsIRenderingContext *&aContext) +nsThebesDeviceContext::CreateRenderingContext(nsRenderingContext *&aContext) { nsresult rv = NS_OK; aContext = nsnull; - nsCOMPtr pContext; + nsRefPtr pContext; rv = CreateRenderingContextInstance(*getter_AddRefs(pContext)); if (NS_SUCCEEDED(rv)) { if (mPrintingSurface) @@ -773,9 +773,9 @@ nsThebesDeviceContext::CreateRenderingContext(nsIRenderingContext *&aContext) } NS_IMETHODIMP -nsThebesDeviceContext::CreateRenderingContextInstance(nsIRenderingContext *&aContext) +nsThebesDeviceContext::CreateRenderingContextInstance(nsRenderingContext *&aContext) { - nsCOMPtr renderingContext = new nsThebesRenderingContext(); + nsRefPtr renderingContext = new nsRenderingContext(); if (!renderingContext) return NS_ERROR_OUT_OF_MEMORY; diff --git a/gfx/src/nsThebesDeviceContext.h b/gfx/src/nsThebesDeviceContext.h index 743f2b79904b..230502f3407c 100644 --- a/gfx/src/nsThebesDeviceContext.h +++ b/gfx/src/nsThebesDeviceContext.h @@ -83,10 +83,10 @@ public: NS_IMETHOD Init(nsIWidget *aWidget); NS_IMETHOD InitForPrinting(nsIDeviceContextSpec *aDevSpec); - NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext); - NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext); - NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext); - NS_IMETHOD CreateRenderingContextInstance(nsIRenderingContext *&aContext); + NS_IMETHOD CreateRenderingContext(nsIView *aView, nsRenderingContext *&aContext); + NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsRenderingContext *&aContext); + NS_IMETHOD CreateRenderingContext(nsRenderingContext *&aContext); + NS_IMETHOD CreateRenderingContextInstance(nsRenderingContext *&aContext); NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLanguage, gfxUserFontSet* aUserFontSet, diff --git a/gfx/src/nsThebesFontMetrics.cpp b/gfx/src/nsThebesFontMetrics.cpp index 6dfda868b145..9adf94b354eb 100644 --- a/gfx/src/nsThebesFontMetrics.cpp +++ b/gfx/src/nsThebesFontMetrics.cpp @@ -296,7 +296,7 @@ public: nsresult nsThebesFontMetrics::GetWidth(const char* aString, PRUint32 aLength, nscoord& aWidth, - nsThebesRenderingContext *aContext) + nsRenderingContext *aContext) { if (aLength == 0) { aWidth = 0; @@ -320,7 +320,7 @@ nsThebesFontMetrics::GetWidth(const char* aString, PRUint32 aLength, nscoord& aW nsresult nsThebesFontMetrics::GetWidth(const PRUnichar* aString, PRUint32 aLength, nscoord& aWidth, PRInt32 *aFontID, - nsThebesRenderingContext *aContext) + nsRenderingContext *aContext) { if (aLength == 0) { aWidth = 0; @@ -383,7 +383,7 @@ nsresult nsThebesFontMetrics::DrawString(const char *aString, PRUint32 aLength, nscoord aX, nscoord aY, const nscoord* aSpacing, - nsThebesRenderingContext *aContext) + nsRenderingContext *aContext) { if (aLength == 0) return NS_OK; @@ -405,8 +405,8 @@ nsThebesFontMetrics::DrawString(const char *aString, PRUint32 aLength, nsresult nsThebesFontMetrics::DrawString(const PRUnichar* aString, PRUint32 aLength, nscoord aX, nscoord aY, - nsIRenderingContext *aContext, - nsIRenderingContext *aTextRunConstructionContext) + nsRenderingContext *aContext, + nsRenderingContext *aTextRunConstructionContext) { if (aLength == 0) return NS_OK; @@ -428,7 +428,7 @@ nsThebesFontMetrics::DrawString(const PRUnichar* aString, PRUint32 aLength, static void GetTextRunBoundingMetrics(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aLength, - nsThebesRenderingContext *aContext, + nsRenderingContext *aContext, nsBoundingMetrics &aBoundingMetrics) { StubPropertyProvider provider; @@ -447,7 +447,7 @@ GetTextRunBoundingMetrics(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aLengt nsresult nsThebesFontMetrics::GetBoundingMetrics(const char *aString, PRUint32 aLength, - nsThebesRenderingContext *aContext, + nsRenderingContext *aContext, nsBoundingMetrics &aBoundingMetrics) { if (aLength == 0) { @@ -465,7 +465,7 @@ nsThebesFontMetrics::GetBoundingMetrics(const char *aString, PRUint32 aLength, nsresult nsThebesFontMetrics::GetBoundingMetrics(const PRUnichar *aString, PRUint32 aLength, - nsThebesRenderingContext *aContext, + nsRenderingContext *aContext, nsBoundingMetrics &aBoundingMetrics) { if (aLength == 0) { diff --git a/gfx/src/nsThebesFontMetrics.h b/gfx/src/nsThebesFontMetrics.h index 559cc3f29bff..1871182e37c6 100644 --- a/gfx/src/nsThebesFontMetrics.h +++ b/gfx/src/nsThebesFontMetrics.h @@ -40,7 +40,7 @@ #define NSTHEBESFONTMETRICS__H__ #include "nsIThebesFontMetrics.h" -#include "nsThebesRenderingContext.h" +#include "nsRenderingContext.h" #include "nsCOMPtr.h" #include "nsThebesDeviceContext.h" #include "nsIAtom.h" @@ -83,10 +83,10 @@ public: virtual nsresult GetWidth(const char* aString, PRUint32 aLength, nscoord& aWidth, - nsThebesRenderingContext *aContext); + nsRenderingContext *aContext); virtual nsresult GetWidth(const PRUnichar* aString, PRUint32 aLength, nscoord& aWidth, PRInt32 *aFontID, - nsThebesRenderingContext *aContext); + nsRenderingContext *aContext); // Get the text dimensions for this string virtual nsresult GetTextDimensions(const PRUnichar* aString, @@ -116,30 +116,30 @@ public: virtual nsresult DrawString(const char *aString, PRUint32 aLength, nscoord aX, nscoord aY, const nscoord* aSpacing, - nsThebesRenderingContext *aContext); + nsRenderingContext *aContext); virtual nsresult DrawString(const PRUnichar* aString, PRUint32 aLength, nscoord aX, nscoord aY, PRInt32 aFontID, const nscoord* aSpacing, - nsThebesRenderingContext *aContext) + nsRenderingContext *aContext) { NS_ASSERTION(!aSpacing, "Spacing not supported here"); return DrawString(aString, aLength, aX, aY, aContext, aContext); } virtual nsresult DrawString(const PRUnichar* aString, PRUint32 aLength, nscoord aX, nscoord aY, - nsIRenderingContext *aContext, - nsIRenderingContext *aTextRunConstructionContext); + nsRenderingContext *aContext, + nsRenderingContext *aTextRunConstructionContext); #ifdef MOZ_MATHML // These two functions get the bounding metrics for this handle, // updating the aBoundingMetrics in app units. virtual nsresult GetBoundingMetrics(const char *aString, PRUint32 aLength, - nsThebesRenderingContext *aContext, + nsRenderingContext *aContext, nsBoundingMetrics &aBoundingMetrics); virtual nsresult GetBoundingMetrics(const PRUnichar *aString, PRUint32 aLength, - nsThebesRenderingContext *aContext, + nsRenderingContext *aContext, nsBoundingMetrics &aBoundingMetrics); #endif /* MOZ_MATHML */ @@ -162,7 +162,7 @@ protected: class AutoTextRun { public: - AutoTextRun(nsThebesFontMetrics* aMetrics, nsIRenderingContext* aRC, + AutoTextRun(nsThebesFontMetrics* aMetrics, nsRenderingContext* aRC, const char* aString, PRInt32 aLength) { mTextRun = gfxTextRunCache::MakeTextRun( reinterpret_cast(aString), aLength, @@ -170,7 +170,7 @@ protected: aMetrics->mP2A, ComputeFlags(aMetrics)); } - AutoTextRun(nsThebesFontMetrics* aMetrics, nsIRenderingContext* aRC, + AutoTextRun(nsThebesFontMetrics* aMetrics, nsRenderingContext* aRC, const PRUnichar* aString, PRInt32 aLength) { mTextRun = gfxTextRunCache::MakeTextRun( aString, aLength, aMetrics->mFontGroup, diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 3c46e9755cd2..2622a555d475 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -1891,7 +1891,7 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer, } } - nsRefPtr rc; + nsRefPtr rc; nsresult rv = presContext->DeviceContext()->CreateRenderingContextInstance(*getter_AddRefs(rc)); if (NS_FAILED(rv)) diff --git a/layout/base/nsBidiPresUtils.cpp b/layout/base/nsBidiPresUtils.cpp index 71daec422ace..1061cbde130b 100644 --- a/layout/base/nsBidiPresUtils.cpp +++ b/layout/base/nsBidiPresUtils.cpp @@ -44,7 +44,7 @@ #include "nsTextFragment.h" #include "nsGkAtoms.h" #include "nsPresContext.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsIServiceManager.h" #include "nsFrameManager.h" #include "nsBidiUtils.h" @@ -1758,8 +1758,8 @@ nsresult nsBidiPresUtils::ProcessText(const PRUnichar* aText, class NS_STACK_CLASS nsIRenderingContextBidiProcessor : public nsBidiPresUtils::BidiProcessor { public: - nsIRenderingContextBidiProcessor(nsIRenderingContext* aCtx, - nsIRenderingContext* aTextRunConstructionContext, + nsIRenderingContextBidiProcessor(nsRenderingContext* aCtx, + nsRenderingContext* aTextRunConstructionContext, const nsPoint& aPt) : mCtx(aCtx), mTextRunConstructionContext(aTextRunConstructionContext), mPt(aPt) { } @@ -1794,8 +1794,8 @@ public: } private: - nsIRenderingContext* mCtx; - nsIRenderingContext* mTextRunConstructionContext; + nsRenderingContext* mCtx; + nsRenderingContext* mTextRunConstructionContext; nsPoint mPt; const PRUnichar* mText; PRInt32 mLength; @@ -1806,8 +1806,8 @@ nsresult nsBidiPresUtils::ProcessTextForRenderingContext(const PRUnichar* PRInt32 aLength, nsBidiDirection aBaseDirection, nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, - nsIRenderingContext& aTextRunConstructionContext, + nsRenderingContext& aRenderingContext, + nsRenderingContext& aTextRunConstructionContext, Mode aMode, nscoord aX, nscoord aY, diff --git a/layout/base/nsBidiPresUtils.h b/layout/base/nsBidiPresUtils.h index a815a45e2b87..9147994e99ef 100644 --- a/layout/base/nsBidiPresUtils.h +++ b/layout/base/nsBidiPresUtils.h @@ -226,8 +226,8 @@ public: PRInt32 aLength, nsBidiDirection aBaseDirection, nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, - nsIRenderingContext& aTextRunConstructionContext, + nsRenderingContext& aRenderingContext, + nsRenderingContext& aTextRunConstructionContext, nscoord aX, nscoord aY, nsBidiPositionResolve* aPosResolve = nsnull, @@ -241,7 +241,7 @@ public: PRInt32 aLength, nsBidiDirection aBaseDirection, nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext) + nsRenderingContext& aRenderingContext) { nscoord length; nsresult rv = ProcessTextForRenderingContext(aText, aLength, aBaseDirection, aPresContext, @@ -351,8 +351,8 @@ private: PRInt32 aLength, nsBidiDirection aBaseDirection, nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, - nsIRenderingContext& aTextRunConstructionContext, + nsRenderingContext& aRenderingContext, + nsRenderingContext& aTextRunConstructionContext, Mode aMode, nscoord aX, // DRAW only nscoord aY, // DRAW only diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index eaa9c050a60a..1275ab5ed749 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -119,7 +119,7 @@ public: * @see nsLayoutUtils::DrawImage() for other parameters */ void Draw(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aDest, const nsRect& aFill, const nsPoint& aAnchor, @@ -358,13 +358,13 @@ protected: /* Local functions */ static void DrawBorderImage(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aBorderArea, const nsStyleBorder& aStyleBorder, const nsRect& aDirtyRect); -static void DrawBorderImageComponent(nsIRenderingContext& aRenderingContext, +static void DrawBorderImageComponent(nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, imgIContainer* aImage, const nsRect& aDirtyRect, @@ -472,7 +472,7 @@ nsCSSRendering::ComputePixelRadii(const nscoord *aAppUnitsRadii, void nsCSSRendering::PaintBorder(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -513,7 +513,7 @@ nsCSSRendering::PaintBorder(nsPresContext* aPresContext, void nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -664,7 +664,7 @@ GetOutlineInnerRect(nsIFrame* aFrame) void nsCSSRendering::PaintOutline(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -793,7 +793,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext, void nsCSSRendering::PaintFocus(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aFocusRect, nscolor aColor) { @@ -1073,7 +1073,7 @@ nsCSSRendering::DidPaint() void nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aFrameArea, const nsRect& aDirtyRect) @@ -1199,7 +1199,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, // Draw the widget shape gfxContextMatrixAutoSaveRestore save(shadowContext); nsIDeviceContext* devCtx = aPresContext->DeviceContext(); - nsCOMPtr wrapperCtx; + nsRefPtr wrapperCtx; devCtx->CreateRenderingContextInstance(*getter_AddRefs(wrapperCtx)); wrapperCtx->Init(devCtx, shadowContext); wrapperCtx->Translate(nsPoint(shadowItem->mXOffset, shadowItem->mYOffset)); @@ -1265,7 +1265,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, void nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aFrameArea, const nsRect& aDirtyRect) @@ -1430,7 +1430,7 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext, void nsCSSRendering::PaintBackground(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -1924,7 +1924,7 @@ FindTileStart(nscoord aDirtyCoord, nscoord aTilePos, nscoord aTileDim) void nsCSSRendering::PaintGradient(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsStyleGradient* aGradient, const nsRect& aDirtyRect, const nsRect& aOneCellArea, @@ -2248,7 +2248,7 @@ PrepareBackgroundLayer(nsPresContext* aPresContext, void nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -2733,7 +2733,7 @@ nsCSSRendering::GetBackgroundLayerRect(nsPresContext* aPresContext, static void DrawBorderImage(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aBorderArea, const nsStyleBorder& aStyleBorder, @@ -2940,7 +2940,7 @@ DrawBorderImage(nsPresContext* aPresContext, } static void -DrawBorderImageComponent(nsIRenderingContext& aRenderingContext, +DrawBorderImageComponent(nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, imgIContainer* aImage, const nsRect& aDirtyRect, @@ -3076,7 +3076,7 @@ SetPoly(const nsRect& aRect, } static void -DrawSolidBorderSegment(nsIRenderingContext& aContext, +DrawSolidBorderSegment(nsRenderingContext& aContext, nsRect aRect, nscoord aTwipsPerPixel, PRUint8 aStartBevelSide = 0, @@ -3166,7 +3166,7 @@ GetDashInfo(nscoord aBorderLength, } void -nsCSSRendering::DrawTableBorderSegment(nsIRenderingContext& aContext, +nsCSSRendering::DrawTableBorderSegment(nsRenderingContext& aContext, PRUint8 aBorderStyle, nscolor aBorderColor, const nsStyleBackground* aBGColor, @@ -3926,7 +3926,7 @@ ImageRenderer::ComputeSize(const nsSize& aDefault) void ImageRenderer::Draw(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aDest, const nsRect& aFill, const nsPoint& aAnchor, diff --git a/layout/base/nsCSSRendering.h b/layout/base/nsCSSRendering.h index 37112cf7059e..86f63d05fcf7 100644 --- a/layout/base/nsCSSRendering.h +++ b/layout/base/nsCSSRendering.h @@ -40,7 +40,7 @@ #ifndef nsCSSRendering_h___ #define nsCSSRendering_h___ -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsStyleConsts.h" #include "gfxBlur.h" #include "gfxContext.h" @@ -62,13 +62,13 @@ struct nsCSSRendering { static void Shutdown(); static void PaintBoxShadowInner(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aFrameArea, const nsRect& aDirtyRect); static void PaintBoxShadowOuter(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aFrameArea, const nsRect& aDirtyRect); @@ -83,7 +83,7 @@ struct nsCSSRendering { * when rendering. If 0 then no sides are skipped. */ static void PaintBorder(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -95,7 +95,7 @@ struct nsCSSRendering { * getting it from aStyleContext. */ static void PaintBorderWithStyleBorder(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -110,7 +110,7 @@ struct nsCSSRendering { * when rendering. If 0 then no sides are skipped. */ static void PaintOutline(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -123,7 +123,7 @@ struct nsCSSRendering { * Not used for controls, because the native theme may differ. */ static void PaintFocus(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aFocusRect, nscolor aColor); @@ -131,7 +131,7 @@ struct nsCSSRendering { * Render a gradient for an element. */ static void PaintGradient(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsStyleGradient* aGradient, const nsRect& aDirtyRect, const nsRect& aOneCellArea, @@ -234,7 +234,7 @@ struct nsCSSRendering { PAINTBG_TO_WINDOW = 0x04 }; static void PaintBackground(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -247,7 +247,7 @@ struct nsCSSRendering { * background is drawn on the canvas. */ static void PaintBackgroundWithSC(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea, @@ -275,7 +275,7 @@ struct nsCSSRendering { // Draw a border segment in the table collapsing border model without // beveling corners - static void DrawTableBorderSegment(nsIRenderingContext& aContext, + static void DrawTableBorderSegment(nsRenderingContext& aContext, PRUint8 aBorderStyle, nscolor aBorderColor, const nsStyleBackground* aBGColor, diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp index 2fd141fe7d37..c3997b837c07 100644 --- a/layout/base/nsCaret.cpp +++ b/layout/base/nsCaret.cpp @@ -57,7 +57,7 @@ #include "nsIDOMCharacterData.h" #include "nsIContent.h" #include "nsIPresShell.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsIDeviceContext.h" #include "nsPresContext.h" #include "nsILookAndFeel.h" @@ -526,7 +526,7 @@ void nsCaret::UpdateCaretPosition() } void nsCaret::PaintCaret(nsDisplayListBuilder *aBuilder, - nsIRenderingContext *aCtx, + nsRenderingContext *aCtx, nsIFrame* aForFrame, const nsPoint &aOffset) { diff --git a/layout/base/nsCaret.h b/layout/base/nsCaret.h index 4ae582c8a522..3248031ba79f 100644 --- a/layout/base/nsCaret.h +++ b/layout/base/nsCaret.h @@ -48,7 +48,7 @@ #include "nsWeakPtr.h" #include "nsFrameSelection.h" -class nsIRenderingContext; +class nsRenderingContext; class nsDisplayListBuilder; //----------------------------------------------------------------------------- @@ -170,7 +170,7 @@ class nsCaret : public nsISelectionListener * Actually paint the caret onto the given rendering context. */ void PaintCaret(nsDisplayListBuilder *aBuilder, - nsIRenderingContext *aCtx, + nsRenderingContext *aCtx, nsIFrame *aForFrame, const nsPoint &aOffset); /** diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index ee439287d0c0..73445b08045e 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -499,7 +499,7 @@ nsDisplayList::ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder, } void nsDisplayList::PaintRoot(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx, + nsRenderingContext* aCtx, PRUint32 aFlags) const { PaintForFrame(aBuilder, aCtx, aBuilder->ReferenceFrame(), aFlags); } @@ -510,7 +510,7 @@ void nsDisplayList::PaintRoot(nsDisplayListBuilder* aBuilder, * root of the layer manager, drawing into the ThebesLayers. */ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx, + nsRenderingContext* aCtx, nsIFrame* aForFrame, PRUint32 aFlags) const { NS_ASSERTION(mDidComputeVisibility, @@ -818,7 +818,7 @@ PRBool nsDisplayItem::RecomputeVisibility(nsDisplayListBuilder* aBuilder, } void nsDisplaySolidColor::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { aCtx->SetColor(mColor); aCtx->FillRect(mVisibleRect); } @@ -1227,7 +1227,7 @@ nsDisplayBackground::ShouldFixToViewport(nsDisplayListBuilder* aBuilder) void nsDisplayBackground::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { nsPoint offset = ToReferenceFrame(); PRUint32 flags = aBuilder->GetBackgroundPaintFlags(); nsDisplayItem* nextItem = GetAbove(); @@ -1262,7 +1262,7 @@ nsDisplayOutline::GetBounds(nsDisplayListBuilder* aBuilder) { void nsDisplayOutline::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { // TODO join outlines together nsPoint offset = ToReferenceFrame(); nsCSSRendering::PaintOutline(mFrame->PresContext(), *aCtx, mFrame, @@ -1312,7 +1312,7 @@ nsDisplayEventReceiver::HitTest(nsDisplayListBuilder* aBuilder, void nsDisplayCaret::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { // Note: Because we exist, we know that the caret is visible, so we don't // need to check for the caret's visibility. mCaret->PaintCaret(aBuilder, aCtx, mFrame, ToReferenceFrame()); @@ -1349,7 +1349,7 @@ nsDisplayBorder::ComputeVisibility(nsDisplayListBuilder* aBuilder, void nsDisplayBorder::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { nsPoint offset = ToReferenceFrame(); nsCSSRendering::PaintBorder(mFrame->PresContext(), *aCtx, mFrame, mVisibleRect, @@ -1398,7 +1398,7 @@ ComputeDisjointRectangles(const nsRegion& aRegion, void nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { nsPoint offset = ToReferenceFrame(); nsRect borderRect = nsRect(offset, mFrame->GetSize()); nsPresContext* presContext = mFrame->PresContext(); @@ -1451,7 +1451,7 @@ nsDisplayBoxShadowOuter::ComputeVisibility(nsDisplayListBuilder* aBuilder, void nsDisplayBoxShadowInner::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { nsPoint offset = ToReferenceFrame(); nsRect borderRect = nsRect(offset, mFrame->GetSize()); nsPresContext* presContext = mFrame->PresContext(); @@ -1547,7 +1547,7 @@ PRBool nsDisplayWrapList::IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* a } void nsDisplayWrapList::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { NS_ERROR("nsDisplayWrapList should have been flattened away for painting"); } @@ -1886,7 +1886,7 @@ nsDisplayClip::~nsDisplayClip() { #endif void nsDisplayClip::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { NS_ERROR("nsDisplayClip should have been flattened away for painting"); } @@ -2059,7 +2059,7 @@ void nsDisplayZoom::HitTest(nsDisplayListBuilder *aBuilder, } void nsDisplayZoom::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) + nsRenderingContext* aCtx) { mList.PaintForFrame(aBuilder, aCtx, mFrame, nsDisplayList::PAINT_DEFAULT); } @@ -2570,7 +2570,7 @@ nsDisplaySVGEffects::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect } void nsDisplaySVGEffects::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) + nsRenderingContext* aCtx) { nsSVGIntegrationUtils::PaintFramesWithEffects(aCtx, mEffectsFrame, mVisibleRect, aBuilder, &mList); diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index 0fae59439fb9..6a1358441513 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -61,7 +61,7 @@ class nsIPresShell; class nsIContent; -class nsIRenderingContext; +class nsRenderingContext; class nsIDeviceContext; class nsDisplayTableItem; class nsDisplayItem; @@ -697,7 +697,7 @@ public: * Content outside mVisibleRect need not be painted. * aCtx must be set up as for nsDisplayList::Paint. */ - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx) {} + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) {} /** * Get the layer drawn by this display item. Call this only if * GetLayerState() returns something other than LAYER_NONE. @@ -1076,13 +1076,13 @@ public: PAINT_FLUSH_LAYERS = 0x02, PAINT_EXISTING_TRANSACTION = 0x04 }; - void PaintRoot(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx, + void PaintRoot(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx, PRUint32 aFlags) const; /** * Like PaintRoot, but used for internal display sublists. * aForFrame is the frame that the list is associated with. */ - void PaintForFrame(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx, + void PaintForFrame(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx, nsIFrame* aForFrame, PRUint32 aFlags) const; /** * Get the bounds. Takes the union of the bounds of all children. @@ -1258,7 +1258,7 @@ private: */ class nsDisplayGeneric : public nsDisplayItem { public: - typedef void (* PaintCallback)(nsIFrame* aFrame, nsIRenderingContext* aCtx, + typedef void (* PaintCallback)(nsIFrame* aFrame, nsRenderingContext* aCtx, const nsRect& aDirtyRect, nsPoint aFramePt); nsDisplayGeneric(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, @@ -1277,7 +1277,7 @@ public: } #endif - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx) { + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) { mPaint(mFrame, aCtx, mVisibleRect, ToReferenceFrame()); } NS_DISPLAY_DECL_NAME(mName, mType) @@ -1326,9 +1326,9 @@ public: } #endif - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx) { + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) { nsPoint pt = ToReferenceFrame(); - nsIRenderingContext::AutoPushTranslation translate(aCtx, pt); + nsRenderingContext::AutoPushTranslation translate(aCtx, pt); mFrame->PresContext()->PresShell()->PaintCount(mFrameName, aCtx, mFrame->PresContext(), mFrame, mColor); @@ -1397,7 +1397,7 @@ public: // The caret returns a rect in the coordinates of mFrame. return mCaret->GetCaretRect() + ToReferenceFrame(); } - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); NS_DISPLAY_DECL_NAME("Caret", TYPE_CARET) protected: nsRefPtr mCaret; @@ -1420,7 +1420,7 @@ public: #endif virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder); - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, const nsRect& aAllowVisibleRegionExpansion, @@ -1478,7 +1478,7 @@ public: return PR_TRUE; } - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, @@ -1522,7 +1522,7 @@ public: virtual PRBool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor); virtual PRBool ShouldFixToViewport(nsDisplayListBuilder* aBuilder); virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder); - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); NS_DISPLAY_DECL_NAME("Background", TYPE_BACKGROUND) protected: nsRegion GetInsideClipRegion(nsPresContext* aPresContext, PRUint8 aClip, @@ -1549,7 +1549,7 @@ public: } #endif - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, @@ -1576,7 +1576,7 @@ public: } #endif - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, const nsRect& aAllowVisibleRegionExpansion, @@ -1603,7 +1603,7 @@ public: #endif virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder); - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, const nsRect& aAllowVisibleRegionExpansion, @@ -1666,7 +1666,7 @@ public: virtual PRBool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor); virtual PRBool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame); - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, const nsRect& aAllowVisibleRegionExpansion, @@ -1881,7 +1881,7 @@ public: #endif virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder); - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, const nsRect& aAllowVisibleRegionExpansion, @@ -1964,7 +1964,7 @@ public: #endif virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder); - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, HitTestState* aState, nsTArray *aOutFrames); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, @@ -2002,7 +2002,7 @@ public: virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { return mBounds + aBuilder->ToReferenceFrame(mEffectsFrame); } - virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); + virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx); virtual PRBool ComputeVisibility(nsDisplayListBuilder* aBuilder, nsRegion* aVisibleRegion, const nsRect& aAllowVisibleRegionExpansion, diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index d6a7e6e20268..3e20fee9d9c4 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -3293,7 +3293,7 @@ NS_IMETHODIMP DocumentViewerImpl::SizeToContent() nscoord prefWidth; { - nsCOMPtr rcx = + nsRefPtr rcx = presShell->GetReferenceRenderingContext(); NS_ENSURE_TRUE(rcx, NS_ERROR_FAILURE); prefWidth = root->GetPrefWidth(rcx); diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h index 7a90912e51b8..22c4674c6472 100644 --- a/layout/base/nsIPresShell.h +++ b/layout/base/nsIPresShell.h @@ -77,7 +77,7 @@ class nsPresContext; class nsStyleSet; class nsIViewManager; class nsIView; -class nsIRenderingContext; +class nsRenderingContext; class nsIPageSequenceFrame; class nsAString; class nsCaret; @@ -504,7 +504,7 @@ public: * be rendered to, but is suitable for measuring text and performing * other non-rendering operations. */ - virtual already_AddRefed GetReferenceRenderingContext() = 0; + virtual already_AddRefed GetReferenceRenderingContext() = 0; /** * Informs the pres shell that the document is now at the anchor with @@ -803,7 +803,7 @@ public: virtual NS_HIDDEN_(void) DumpReflows() = 0; virtual NS_HIDDEN_(void) CountReflows(const char * aName, nsIFrame * aFrame) = 0; virtual NS_HIDDEN_(void) PaintCount(const char * aName, - nsIRenderingContext* aRenderingContext, + nsRenderingContext* aRenderingContext, nsPresContext * aPresContext, nsIFrame * aFrame, PRUint32 aColor) = 0; diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 173df2898d5e..39eb6fae5766 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1401,7 +1401,7 @@ GetNextPage(nsIFrame* aPageContentFrame) } nsresult -nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFrame, +nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFrame, const nsRegion& aDirtyRegion, nscolor aBackstop, PRUint32 aFlags) { @@ -1692,7 +1692,7 @@ nsLayoutUtils::GetZIndex(nsIFrame* aFrame) { * before the cursor aIndex contains the index of the text where the cursor falls */ PRBool -nsLayoutUtils::BinarySearchForPosition(nsIRenderingContext* aRendContext, +nsLayoutUtils::BinarySearchForPosition(nsRenderingContext* aRendContext, const PRUnichar* aText, PRInt32 aBaseWidth, PRInt32 aBaseInx, @@ -2125,7 +2125,7 @@ GetPercentHeight(const nsStyleCoord& aStyle, enum eWidthProperty { PROP_WIDTH, PROP_MAX_WIDTH, PROP_MIN_WIDTH }; static PRBool GetIntrinsicCoord(const nsStyleCoord& aStyle, - nsIRenderingContext* aRenderingContext, + nsRenderingContext* aRenderingContext, nsIFrame* aFrame, eWidthProperty aProperty, nscoord& aResult) @@ -2170,7 +2170,7 @@ static PRInt32 gNoiseIndent = 0; #endif /* static */ nscoord -nsLayoutUtils::IntrinsicForContainer(nsIRenderingContext *aRenderingContext, +nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, nsIFrame *aFrame, IntrinsicWidthType aType) { @@ -2415,7 +2415,7 @@ nsLayoutUtils::ComputeWidthDependentValue( /* static */ nscoord nsLayoutUtils::ComputeWidthValue( - nsIRenderingContext* aRenderingContext, + nsRenderingContext* aRenderingContext, nsIFrame* aFrame, nscoord aContainingBlockWidth, nscoord aContentEdgeToBoxSizing, @@ -2503,7 +2503,7 @@ nsLayoutUtils::ComputeHeightDependentValue( /* static */ nsSize nsLayoutUtils::ComputeSizeWithIntrinsicDimensions( - nsIRenderingContext* aRenderingContext, nsIFrame* aFrame, + nsRenderingContext* aRenderingContext, nsIFrame* aFrame, const nsIFrame::IntrinsicSize& aIntrinsicSize, nsSize aIntrinsicRatio, nsSize aCBSize, nsSize aMargin, nsSize aBorder, nsSize aPadding) @@ -2772,7 +2772,7 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions( /* static */ nscoord nsLayoutUtils::MinWidthFromInline(nsIFrame* aFrame, - nsIRenderingContext* aRenderingContext) + nsRenderingContext* aRenderingContext) { nsIFrame::InlineMinWidthData data; DISPLAY_MIN_WIDTH(aFrame, data.prevLines); @@ -2783,7 +2783,7 @@ nsLayoutUtils::MinWidthFromInline(nsIFrame* aFrame, /* static */ nscoord nsLayoutUtils::PrefWidthFromInline(nsIFrame* aFrame, - nsIRenderingContext* aRenderingContext) + nsRenderingContext* aRenderingContext) { nsIFrame::InlinePrefWidthData data; DISPLAY_PREF_WIDTH(aFrame, data.prevLines); @@ -2794,7 +2794,7 @@ nsLayoutUtils::PrefWidthFromInline(nsIFrame* aFrame, void nsLayoutUtils::DrawString(const nsIFrame* aFrame, - nsIRenderingContext* aContext, + nsRenderingContext* aContext, const PRUnichar* aString, PRInt32 aLength, nsPoint aPoint, @@ -2824,7 +2824,7 @@ nsLayoutUtils::DrawString(const nsIFrame* aFrame, nscoord nsLayoutUtils::GetStringWidth(const nsIFrame* aFrame, - nsIRenderingContext* aContext, + nsRenderingContext* aContext, const PRUnichar* aString, PRInt32 aLength) { @@ -3257,7 +3257,7 @@ ComputeSnappedImageDrawingParameters(gfxContext* aCtx, static nsresult -DrawImageInternal(nsIRenderingContext* aRenderingContext, +DrawImageInternal(nsRenderingContext* aRenderingContext, imgIContainer* aImage, GraphicsFilter aGraphicsFilter, const nsRect& aDest, @@ -3290,7 +3290,7 @@ DrawImageInternal(nsIRenderingContext* aRenderingContext, } /* static */ void -nsLayoutUtils::DrawPixelSnapped(nsIRenderingContext* aRenderingContext, +nsLayoutUtils::DrawPixelSnapped(nsRenderingContext* aRenderingContext, gfxDrawable* aDrawable, GraphicsFilter aFilter, const nsRect& aDest, @@ -3332,7 +3332,7 @@ nsLayoutUtils::DrawPixelSnapped(nsIRenderingContext* aRenderingContext, } /* static */ nsresult -nsLayoutUtils::DrawSingleUnscaledImage(nsIRenderingContext* aRenderingContext, +nsLayoutUtils::DrawSingleUnscaledImage(nsRenderingContext* aRenderingContext, imgIContainer* aImage, GraphicsFilter aGraphicsFilter, const nsPoint& aDest, @@ -3368,7 +3368,7 @@ nsLayoutUtils::DrawSingleUnscaledImage(nsIRenderingContext* aRenderingContext, } /* static */ nsresult -nsLayoutUtils::DrawSingleImage(nsIRenderingContext* aRenderingContext, +nsLayoutUtils::DrawSingleImage(nsRenderingContext* aRenderingContext, imgIContainer* aImage, GraphicsFilter aGraphicsFilter, const nsRect& aDest, @@ -3450,7 +3450,7 @@ nsLayoutUtils::ComputeSizeForDrawing(imgIContainer *aImage, /* static */ nsresult -nsLayoutUtils::DrawImage(nsIRenderingContext* aRenderingContext, +nsLayoutUtils::DrawImage(nsRenderingContext* aRenderingContext, imgIContainer* aImage, GraphicsFilter aGraphicsFilter, const nsRect& aDest, @@ -3493,7 +3493,7 @@ nsLayoutUtils::GetWholeImageDestination(const nsIntSize& aWholeImageSize, } void -nsLayoutUtils::SetFontFromStyle(nsIRenderingContext* aRC, nsStyleContext* aSC) +nsLayoutUtils::SetFontFromStyle(nsRenderingContext* aRC, nsStyleContext* aSC) { const nsStyleFont* font = aSC->GetStyleFont(); const nsStyleVisibility* visibility = aSC->GetStyleVisibility(); diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index f06ea3713220..efdc297f86c8 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -630,7 +630,7 @@ public: * necessarily correspond to what's visible in the window; we don't * want to mess up the widget's layer tree. */ - static nsresult PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFrame, + static nsresult PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFrame, const nsRegion& aDirtyRegion, nscolor aBackstop, PRUint32 aFlags = 0); @@ -653,7 +653,7 @@ public: * before the cursor aIndex contains the index of the text where the cursor falls */ static PRBool - BinarySearchForPosition(nsIRenderingContext* acx, + BinarySearchForPosition(nsRenderingContext* acx, const PRUnichar* aText, PRInt32 aBaseWidth, PRInt32 aBaseInx, @@ -809,7 +809,7 @@ public: * and margin. */ enum IntrinsicWidthType { MIN_WIDTH, PREF_WIDTH }; - static nscoord IntrinsicForContainer(nsIRenderingContext* aRenderingContext, + static nscoord IntrinsicForContainer(nsRenderingContext* aRenderingContext, nsIFrame* aFrame, IntrinsicWidthType aType); @@ -839,7 +839,7 @@ public: * @param aCoord The width value to compute. */ static nscoord ComputeWidthValue( - nsIRenderingContext* aRenderingContext, + nsRenderingContext* aRenderingContext, nsIFrame* aFrame, nscoord aContainingBlockWidth, nscoord aContentEdgeToBoxSizing, @@ -904,28 +904,28 @@ public: * http://www.w3.org/TR/CSS21/visudet.html#min-max-widths */ static nsSize ComputeSizeWithIntrinsicDimensions( - nsIRenderingContext* aRenderingContext, nsIFrame* aFrame, + nsRenderingContext* aRenderingContext, nsIFrame* aFrame, const nsIFrame::IntrinsicSize& aIntrinsicSize, nsSize aIntrinsicRatio, nsSize aCBSize, nsSize aMargin, nsSize aBorder, nsSize aPadding); // Implement nsIFrame::GetPrefWidth in terms of nsIFrame::AddInlinePrefWidth static nscoord PrefWidthFromInline(nsIFrame* aFrame, - nsIRenderingContext* aRenderingContext); + nsRenderingContext* aRenderingContext); // Implement nsIFrame::GetMinWidth in terms of nsIFrame::AddInlineMinWidth static nscoord MinWidthFromInline(nsIFrame* aFrame, - nsIRenderingContext* aRenderingContext); + nsRenderingContext* aRenderingContext); static void DrawString(const nsIFrame* aFrame, - nsIRenderingContext* aContext, + nsRenderingContext* aContext, const PRUnichar* aString, PRInt32 aLength, nsPoint aPoint, PRUint8 aDirection = NS_STYLE_DIRECTION_INHERIT); static nscoord GetStringWidth(const nsIFrame* aFrame, - nsIRenderingContext* aContext, + nsRenderingContext* aContext, const PRUnichar* aString, PRInt32 aLength); @@ -1022,7 +1022,7 @@ public: * @param aDirty Pixels outside this area may be skipped. * @param aImageFlags Image flags of the imgIContainer::FLAG_* variety */ - static nsresult DrawImage(nsIRenderingContext* aRenderingContext, + static nsresult DrawImage(nsRenderingContext* aRenderingContext, imgIContainer* aImage, GraphicsFilter aGraphicsFilter, const nsRect& aDest, @@ -1052,7 +1052,7 @@ public: * pixel-aligned in the output. * @param aDirty Pixels outside this area may be skipped. */ - static void DrawPixelSnapped(nsIRenderingContext* aRenderingContext, + static void DrawPixelSnapped(nsRenderingContext* aRenderingContext, gfxDrawable* aDrawable, GraphicsFilter aFilter, const nsRect& aDest, @@ -1076,7 +1076,7 @@ public: * in appunits. For best results it should * be aligned with image pixels. */ - static nsresult DrawSingleUnscaledImage(nsIRenderingContext* aRenderingContext, + static nsresult DrawSingleUnscaledImage(nsRenderingContext* aRenderingContext, imgIContainer* aImage, GraphicsFilter aGraphicsFilter, const nsPoint& aDest, @@ -1099,7 +1099,7 @@ public: * be aligned with image pixels. * @param aImageFlags Image flags of the imgIContainer::FLAG_* variety */ - static nsresult DrawSingleImage(nsIRenderingContext* aRenderingContext, + static nsresult DrawSingleImage(nsRenderingContext* aRenderingContext, imgIContainer* aImage, GraphicsFilter aGraphicsFilter, const nsRect& aDest, @@ -1140,7 +1140,7 @@ public: /** * Set the font on aRC based on the style in aSC */ - static void SetFontFromStyle(nsIRenderingContext* aRC, nsStyleContext* aSC); + static void SetFontFromStyle(nsRenderingContext* aRC, nsStyleContext* aSC); /** * Determine if any corner radius is of nonzero size diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 9cbb66429e22..9c8db2de8bab 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -52,7 +52,7 @@ #include "nsImageLoader.h" #include "nsIContent.h" #include "nsIFrame.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsIURL.h" #include "nsIDocument.h" #include "nsStyleContext.h" diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h index 11e32c6336a4..c1d348a5595e 100644 --- a/layout/base/nsPresContext.h +++ b/layout/base/nsPresContext.h @@ -109,7 +109,7 @@ class nsRefreshDriver; class imgIContainer; #ifdef MOZ_REFLOW_PERF -class nsIRenderingContext; +class nsRenderingContext; #endif enum nsWidgetType { diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 45e0b50ed136..b606d00ab647 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -141,7 +141,7 @@ #include "nsRegion.h" #ifdef MOZ_REFLOW_PERF -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsIFontMetrics.h" #endif @@ -407,7 +407,7 @@ public: void Add(const char * aName, nsIFrame * aFrame); ReflowCounter * LookUp(const char * aName); - void PaintCount(const char * aName, nsIRenderingContext* aRenderingContext, nsPresContext* aPresContext, nsIFrame * aFrame, PRUint32 aColor); + void PaintCount(const char * aName, nsRenderingContext* aRenderingContext, nsPresContext* aPresContext, nsIFrame * aFrame, PRUint32 aColor); FILE * GetOutFile() { return mFD; } @@ -773,7 +773,7 @@ public: virtual NS_HIDDEN_(void) CancelReflowCallback(nsIReflowCallback* aCallback); virtual NS_HIDDEN_(void) ClearFrameRefs(nsIFrame* aFrame); - virtual NS_HIDDEN_(already_AddRefed) GetReferenceRenderingContext(); + virtual NS_HIDDEN_(already_AddRefed) GetReferenceRenderingContext(); virtual NS_HIDDEN_(nsresult) GoToAnchor(const nsAString& aAnchorName, PRBool aScroll); virtual NS_HIDDEN_(nsresult) ScrollToAnchor(); @@ -930,7 +930,7 @@ public: virtual NS_HIDDEN_(void) DumpReflows(); virtual NS_HIDDEN_(void) CountReflows(const char * aName, nsIFrame * aFrame); virtual NS_HIDDEN_(void) PaintCount(const char * aName, - nsIRenderingContext* aRenderingContext, + nsRenderingContext* aRenderingContext, nsPresContext* aPresContext, nsIFrame * aFrame, PRUint32 aColor); @@ -3751,13 +3751,13 @@ PresShell::ClearFrameRefs(nsIFrame* aFrame) } } -already_AddRefed +already_AddRefed PresShell::GetReferenceRenderingContext() { NS_TIME_FUNCTION_MIN(1.0); nsIDeviceContext* devCtx = mPresContext->DeviceContext(); - nsRefPtr rc; + nsRefPtr rc; if (mPresContext->IsScreen()) { devCtx->CreateRenderingContextInstance(*getter_AddRefs(rc)); if (rc) { @@ -5281,7 +5281,7 @@ PresShell::RenderDocument(const nsRect& aRect, PRUint32 aFlags, AutoSaveRestoreRenderingState _(this); - nsCOMPtr rc; + nsRefPtr rc; devCtx->CreateRenderingContextInstance(*getter_AddRefs(rc)); rc->Init(devCtx, aThebesContext); @@ -5606,7 +5606,7 @@ PresShell::PaintRangePaintInfo(nsTArray >* aItems, context.Rectangle(gfxRect(0, 0, pixelArea.width, pixelArea.height)); context.Fill(); - nsCOMPtr rc; + nsRefPtr rc; deviceContext->CreateRenderingContextInstance(*getter_AddRefs(rc)); rc->Init(deviceContext, surface); @@ -5644,7 +5644,7 @@ PresShell::PaintRangePaintInfo(nsTArray >* aItems, RangePaintInfo* rangeInfo = (*aItems)[i]; // the display lists paint relative to the offset from the reference // frame, so translate the rendering context - nsIRenderingContext::AutoPushTranslation + nsRenderingContext::AutoPushTranslation translate(rc, rangeInfo->mRootOffset); aArea.MoveBy(-rangeInfo->mRootOffset.x, -rangeInfo->mRootOffset.y); @@ -7638,7 +7638,7 @@ PresShell::DoReflow(nsIFrame* target, PRBool aInterruptible) nsIFrame* rootFrame = FrameManager()->GetRootFrame(); - nsCOMPtr rcx = GetReferenceRenderingContext(); + nsRefPtr rcx = GetReferenceRenderingContext(); if (!rcx) { NS_NOTREACHED("CreateRenderingContext failure"); return PR_FALSE; @@ -8590,7 +8590,7 @@ PresShell::CountReflows(const char * aName, nsIFrame * aFrame) //------------------------------------------------------------- void PresShell::PaintCount(const char * aName, - nsIRenderingContext* aRenderingContext, + nsRenderingContext* aRenderingContext, nsPresContext* aPresContext, nsIFrame * aFrame, PRUint32 aColor) @@ -8780,7 +8780,7 @@ void ReflowCountMgr::Add(const char * aName, nsIFrame * aFrame) //------------------------------------------------------------------ void ReflowCountMgr::PaintCount(const char * aName, - nsIRenderingContext* aRenderingContext, + nsRenderingContext* aRenderingContext, nsPresContext* aPresContext, nsIFrame* aFrame, PRUint32 aColor) diff --git a/layout/forms/nsButtonFrameRenderer.cpp b/layout/forms/nsButtonFrameRenderer.cpp index e4bc9ad38a9e..a605dd74a61f 100644 --- a/layout/forms/nsButtonFrameRenderer.cpp +++ b/layout/forms/nsButtonFrameRenderer.cpp @@ -35,7 +35,7 @@ * * ***** END LICENSE BLOCK ***** */ #include "nsButtonFrameRenderer.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsCSSRendering.h" #include "nsPresContext.h" #include "nsGkAtoms.h" @@ -106,7 +106,7 @@ public: #endif virtual void Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx); + nsRenderingContext* aCtx); virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder); NS_DISPLAY_DECL_NAME("ButtonBoxShadowOuter", TYPE_BUTTON_BOX_SHADOW_OUTER) private: @@ -120,7 +120,7 @@ nsDisplayButtonBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder) { void nsDisplayButtonBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { nsRect frameRect = nsRect(ToReferenceFrame(), mFrame->GetSize()); nsRect buttonRect; @@ -148,7 +148,7 @@ public: aOutFrames->AppendElement(mFrame); } virtual void Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx); + nsRenderingContext* aCtx); NS_DISPLAY_DECL_NAME("ButtonBorderBackground", TYPE_BUTTON_BORDER_BACKGROUND) private: nsButtonFrameRenderer* mBFR; @@ -168,14 +168,14 @@ public: #endif virtual void Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx); + nsRenderingContext* aCtx); NS_DISPLAY_DECL_NAME("ButtonForeground", TYPE_BUTTON_FOREGROUND) private: nsButtonFrameRenderer* mBFR; }; void nsDisplayButtonBorderBackground::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) + nsRenderingContext* aCtx) { NS_ASSERTION(mFrame, "No frame?"); nsPresContext* pc = mFrame->PresContext(); @@ -187,7 +187,7 @@ void nsDisplayButtonBorderBackground::Paint(nsDisplayListBuilder* aBuilder, } void nsDisplayButtonForeground::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) + nsRenderingContext* aCtx) { nsPresContext *presContext = mFrame->PresContext(); const nsStyleDisplay *disp = mFrame->GetStyleDisplay(); @@ -220,7 +220,7 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder, void nsButtonFrameRenderer::PaintOutlineAndFocusBorders(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aDirtyRect, const nsRect& aRect) { @@ -255,7 +255,7 @@ nsButtonFrameRenderer::PaintOutlineAndFocusBorders(nsPresContext* aPresContext, void nsButtonFrameRenderer::PaintBorderAndBackground(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aDirtyRect, const nsRect& aRect, PRUint32 aBGFlags) diff --git a/layout/forms/nsButtonFrameRenderer.h b/layout/forms/nsButtonFrameRenderer.h index 3476e2beb469..c377820a781e 100644 --- a/layout/forms/nsButtonFrameRenderer.h +++ b/layout/forms/nsButtonFrameRenderer.h @@ -68,12 +68,12 @@ public: void PaintOutlineAndFocusBorders(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aDirtyRect, const nsRect& aRect); void PaintBorderAndBackground(nsPresContext* aPresContext, - nsIRenderingContext& aRenderingContext, + nsRenderingContext& aRenderingContext, const nsRect& aDirtyRect, const nsRect& aRect, PRUint32 aBGFlags); diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 662aafa51ff3..c3f1c04c9541 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -558,7 +558,7 @@ static void printSize(char * aDesc, nscoord aSize) //------------------------------------------------------------------- nscoord -nsComboboxControlFrame::GetIntrinsicWidth(nsIRenderingContext* aRenderingContext, +nsComboboxControlFrame::GetIntrinsicWidth(nsRenderingContext* aRenderingContext, nsLayoutUtils::IntrinsicWidthType aType) { // get the scrollbar width, we'll use this later @@ -602,7 +602,7 @@ nsComboboxControlFrame::GetIntrinsicWidth(nsIRenderingContext* aRenderingContext } nscoord -nsComboboxControlFrame::GetMinWidth(nsIRenderingContext *aRenderingContext) +nsComboboxControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext) { nscoord minWidth; DISPLAY_MIN_WIDTH(this, minWidth); @@ -611,7 +611,7 @@ nsComboboxControlFrame::GetMinWidth(nsIRenderingContext *aRenderingContext) } nscoord -nsComboboxControlFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext) +nsComboboxControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) { nscoord prefWidth; DISPLAY_PREF_WIDTH(this, prefWidth); @@ -1348,12 +1348,12 @@ public: #endif virtual void Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx); + nsRenderingContext* aCtx); NS_DISPLAY_DECL_NAME("ComboboxFocus", TYPE_COMBOBOX_FOCUS) }; void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) + nsRenderingContext* aCtx) { static_cast(mFrame) ->PaintFocus(*aCtx, ToReferenceFrame()); @@ -1401,7 +1401,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, return DisplaySelectionOverlay(aBuilder, aLists.Content()); } -void nsComboboxControlFrame::PaintFocus(nsIRenderingContext& aRenderingContext, +void nsComboboxControlFrame::PaintFocus(nsRenderingContext& aRenderingContext, nsPoint aPt) { /* Do we need to do anything? */ diff --git a/layout/forms/nsComboboxControlFrame.h b/layout/forms/nsComboboxControlFrame.h index 917d94ec554a..fd90c98515d3 100644 --- a/layout/forms/nsComboboxControlFrame.h +++ b/layout/forms/nsComboboxControlFrame.h @@ -107,9 +107,9 @@ public: virtual already_AddRefed CreateAccessible(); #endif - virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext); + virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext); - virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext); + virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext); NS_IMETHOD Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, @@ -124,7 +124,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists); - void PaintFocus(nsIRenderingContext& aRenderingContext, nsPoint aPt); + void PaintFocus(nsRenderingContext& aRenderingContext, nsPoint aPt); // XXXbz this is only needed to prevent the quirk percent height stuff from // leaking out of the combobox. We may be able to get rid of this as more @@ -226,7 +226,7 @@ protected: const nsHTMLReflowState& aReflowState); // Helper for GetMinWidth/GetPrefWidth - nscoord GetIntrinsicWidth(nsIRenderingContext* aRenderingContext, + nscoord GetIntrinsicWidth(nsRenderingContext* aRenderingContext, nsLayoutUtils::IntrinsicWidthType aType); protected: class RedisplayTextEvent; diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index 1f86d11a3f93..d24e38716838 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -74,11 +74,11 @@ public: nsFrameList& aChildList); NS_HIDDEN_(nscoord) - GetIntrinsicWidth(nsIRenderingContext* aRenderingContext, + GetIntrinsicWidth(nsRenderingContext* aRenderingContext, nsLayoutUtils::IntrinsicWidthType); - virtual nscoord GetMinWidth(nsIRenderingContext* aRenderingContext); - virtual nscoord GetPrefWidth(nsIRenderingContext* aRenderingContext); - virtual nsSize ComputeSize(nsIRenderingContext *aRenderingContext, + virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext); + virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext); + virtual nsSize ComputeSize(nsRenderingContext *aRenderingContext, nsSize aCBSize, nscoord aAvailableWidth, nsSize aMargin, nsSize aBorder, nsSize aPadding, PRBool aShrinkWrap); @@ -93,7 +93,7 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists); - void PaintBorderBackground(nsIRenderingContext& aRenderingContext, + void PaintBorderBackground(nsRenderingContext& aRenderingContext, nsPoint aPt, const nsRect& aDirtyRect, PRUint32 aBGFlags); NS_IMETHOD AppendFrames(nsIAtom* aListName, @@ -190,7 +190,7 @@ public: virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, HitTestState* aState, nsTArray *aOutFrames); virtual void Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx); + nsRenderingContext* aCtx); NS_DISPLAY_DECL_NAME("FieldSetBorderBackground", TYPE_FIELDSET_BORDER_BACKGROUND) }; @@ -205,7 +205,7 @@ void nsDisplayFieldSetBorderBackground::HitTest(nsDisplayListBuilder* aBuilder, void nsDisplayFieldSetBorderBackground::Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) + nsRenderingContext* aCtx) { static_cast(mFrame)-> PaintBorderBackground(*aCtx, ToReferenceFrame(), @@ -267,7 +267,7 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } void -nsFieldSetFrame::PaintBorderBackground(nsIRenderingContext& aRenderingContext, +nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext, nsPoint aPt, const nsRect& aDirtyRect, PRUint32 aBGFlags) { PRIntn skipSides = GetSkipSides(); @@ -349,7 +349,7 @@ nsFieldSetFrame::PaintBorderBackground(nsIRenderingContext& aRenderingContext, } nscoord -nsFieldSetFrame::GetIntrinsicWidth(nsIRenderingContext* aRenderingContext, +nsFieldSetFrame::GetIntrinsicWidth(nsRenderingContext* aRenderingContext, nsLayoutUtils::IntrinsicWidthType aType) { nscoord legendWidth = 0; @@ -371,7 +371,7 @@ nsFieldSetFrame::GetIntrinsicWidth(nsIRenderingContext* aRenderingContext, nscoord -nsFieldSetFrame::GetMinWidth(nsIRenderingContext* aRenderingContext) +nsFieldSetFrame::GetMinWidth(nsRenderingContext* aRenderingContext) { nscoord result = 0; DISPLAY_MIN_WIDTH(this, result); @@ -381,7 +381,7 @@ nsFieldSetFrame::GetMinWidth(nsIRenderingContext* aRenderingContext) } nscoord -nsFieldSetFrame::GetPrefWidth(nsIRenderingContext* aRenderingContext) +nsFieldSetFrame::GetPrefWidth(nsRenderingContext* aRenderingContext) { nscoord result = 0; DISPLAY_PREF_WIDTH(this, result); @@ -391,7 +391,7 @@ nsFieldSetFrame::GetPrefWidth(nsIRenderingContext* aRenderingContext) } /* virtual */ nsSize -nsFieldSetFrame::ComputeSize(nsIRenderingContext *aRenderingContext, +nsFieldSetFrame::ComputeSize(nsRenderingContext *aRenderingContext, nsSize aCBSize, nscoord aAvailableWidth, nsSize aMargin, nsSize aBorder, nsSize aPadding, PRBool aShrinkWrap) diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp index 6385ba166ec7..f6a818c624f4 100644 --- a/layout/forms/nsFileControlFrame.cpp +++ b/layout/forms/nsFileControlFrame.cpp @@ -499,7 +499,7 @@ nsFileControlFrame::BrowseMouseListener::MouseClick(nsIDOMEvent* aMouseEvent) } nscoord -nsFileControlFrame::GetMinWidth(nsIRenderingContext *aRenderingContext) +nsFileControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext) { nscoord result; DISPLAY_MIN_WIDTH(this, result); diff --git a/layout/forms/nsFileControlFrame.h b/layout/forms/nsFileControlFrame.h index 951b76645c65..6eb8e10ef540 100644 --- a/layout/forms/nsFileControlFrame.h +++ b/layout/forms/nsFileControlFrame.h @@ -71,7 +71,7 @@ public: virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const; virtual void SetFocus(PRBool aOn, PRBool aRepaint); - virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext); + virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext); NS_IMETHOD Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, diff --git a/layout/forms/nsGfxCheckboxControlFrame.cpp b/layout/forms/nsGfxCheckboxControlFrame.cpp index 934372aeed48..34229911f93c 100644 --- a/layout/forms/nsGfxCheckboxControlFrame.cpp +++ b/layout/forms/nsGfxCheckboxControlFrame.cpp @@ -50,7 +50,7 @@ static void PaintCheckMark(nsIFrame* aFrame, - nsIRenderingContext* aCtx, + nsRenderingContext* aCtx, const nsRect& aDirtyRect, nsPoint aPt) { @@ -83,7 +83,7 @@ PaintCheckMark(nsIFrame* aFrame, static void PaintIndeterminateMark(nsIFrame* aFrame, - nsIRenderingContext* aCtx, + nsRenderingContext* aCtx, const nsRect& aDirtyRect, nsPoint aPt) { diff --git a/layout/forms/nsGfxRadioControlFrame.cpp b/layout/forms/nsGfxRadioControlFrame.cpp index fe1d3cac1ade..009e0d0b589a 100644 --- a/layout/forms/nsGfxRadioControlFrame.cpp +++ b/layout/forms/nsGfxRadioControlFrame.cpp @@ -82,7 +82,7 @@ nsGfxRadioControlFrame::CreateAccessible() // Draw the dot for a non-native radio button in the checked state. static void PaintCheckedRadioButton(nsIFrame* aFrame, - nsIRenderingContext* aCtx, + nsRenderingContext* aCtx, const nsRect& aDirtyRect, nsPoint aPt) { diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index fd983178ec70..8b4c1689ae1a 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -43,7 +43,7 @@ #include "nsHTMLParts.h" #include "nsIFormControl.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsPresContext.h" #include "nsIPresShell.h" #include "nsStyleContext.h" @@ -198,7 +198,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } nscoord -nsHTMLButtonControlFrame::GetMinWidth(nsIRenderingContext* aRenderingContext) +nsHTMLButtonControlFrame::GetMinWidth(nsRenderingContext* aRenderingContext) { nscoord result; DISPLAY_MIN_WIDTH(this, result); @@ -214,7 +214,7 @@ nsHTMLButtonControlFrame::GetMinWidth(nsIRenderingContext* aRenderingContext) } nscoord -nsHTMLButtonControlFrame::GetPrefWidth(nsIRenderingContext* aRenderingContext) +nsHTMLButtonControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext) { nscoord result; DISPLAY_PREF_WIDTH(this, result); diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index 511c0dae7ab7..75b6ffdcca94 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -51,7 +51,7 @@ #include "nsIComponentManager.h" #include "nsButtonFrameRenderer.h" -class nsIRenderingContext; +class nsRenderingContext; class nsPresContext; class nsHTMLButtonControlFrame : public nsHTMLContainerFrame, @@ -70,9 +70,9 @@ public: const nsRect& aDirtyRect, const nsDisplayListSet& aLists); - virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext); + virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext); - virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext); + virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext); NS_IMETHOD Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/layout/forms/nsImageControlFrame.cpp b/layout/forms/nsImageControlFrame.cpp index 1bc00dc58c0f..7c5587254569 100644 --- a/layout/forms/nsImageControlFrame.cpp +++ b/layout/forms/nsImageControlFrame.cpp @@ -39,7 +39,7 @@ #include "nsIFormControlFrame.h" #include "nsIFormControl.h" #include "nsHTMLParts.h" -#include "nsIRenderingContext.h" +#include "nsRenderingContext.h" #include "nsPresContext.h" #include "nsIPresShell.h" #include "nsStyleContext.h" diff --git a/layout/forms/nsIsIndexFrame.cpp b/layout/forms/nsIsIndexFrame.cpp index 695d64855195..336f80a61dac 100644 --- a/layout/forms/nsIsIndexFrame.cpp +++ b/layout/forms/nsIsIndexFrame.cpp @@ -259,7 +259,7 @@ NS_IMPL_ISUPPORTS2(nsIsIndexFrame::KeyListener, nsIDOMEventListener) nscoord -nsIsIndexFrame::GetMinWidth(nsIRenderingContext *aRenderingContext) +nsIsIndexFrame::GetMinWidth(nsRenderingContext *aRenderingContext) { nscoord result; DISPLAY_MIN_WIDTH(this, result); diff --git a/layout/forms/nsIsIndexFrame.h b/layout/forms/nsIsIndexFrame.h index 0723bcc03344..b717c6079461 100644 --- a/layout/forms/nsIsIndexFrame.h +++ b/layout/forms/nsIsIndexFrame.h @@ -83,7 +83,7 @@ public: NS_DECL_FRAMEARENA_HELPERS // nsIFormControlFrame - virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext); + virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext); virtual PRBool IsLeaf() const; diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 2791c84d2682..b4df0b206fa3 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -262,7 +262,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, * @param aPt the offset of this frame, relative to the rendering reference * frame */ -void nsListControlFrame::PaintFocus(nsIRenderingContext& aRC, nsPoint aPt) +void nsListControlFrame::PaintFocus(nsRenderingContext& aRC, nsPoint aPt) { if (mFocused != this) return; @@ -486,7 +486,7 @@ nsListControlFrame::CalcHeightOfARow() } nscoord -nsListControlFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext) +nsListControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) { nscoord result; DISPLAY_PREF_WIDTH(this, result); @@ -502,7 +502,7 @@ nsListControlFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext) } nscoord -nsListControlFrame::GetMinWidth(nsIRenderingContext *aRenderingContext) +nsListControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext) { nscoord result; DISPLAY_MIN_WIDTH(this, result); diff --git a/layout/forms/nsListControlFrame.h b/layout/forms/nsListControlFrame.h index 3ff966fdc6bc..1fe90c7617b7 100644 --- a/layout/forms/nsListControlFrame.h +++ b/layout/forms/nsListControlFrame.h @@ -88,8 +88,8 @@ public: NS_IMETHOD SetInitialChildList(nsIAtom* aListName, nsFrameList& aChildList); - virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext); - virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext); + virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext); + virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext); NS_IMETHOD Reflow(nsPresContext* aCX, nsHTMLReflowMetrics& aDesiredSize, @@ -238,7 +238,7 @@ public: * @param aPt the offset of this frame, relative to the rendering reference * frame */ - void PaintFocus(nsIRenderingContext& aRC, nsPoint aPt); + void PaintFocus(nsRenderingContext& aRC, nsPoint aPt); /** * If this frame IsFocused(), invalidates an area that includes anything * that PaintFocus will or could have painted --- basically the whole diff --git a/layout/forms/nsSelectsAreaFrame.cpp b/layout/forms/nsSelectsAreaFrame.cpp index a82dc8ff6fc1..cd98c76d2d92 100644 --- a/layout/forms/nsSelectsAreaFrame.cpp +++ b/layout/forms/nsSelectsAreaFrame.cpp @@ -182,7 +182,7 @@ public: aBuilder->ToReferenceFrame(listFrame); } virtual void Paint(nsDisplayListBuilder* aBuilder, - nsIRenderingContext* aCtx) { + nsRenderingContext* aCtx) { nsListControlFrame* listFrame = GetEnclosingListFrame(GetUnderlyingFrame()); // listFrame must be non-null or we wouldn't get called. listFrame->PaintFocus(*aCtx, aBuilder->ToReferenceFrame(listFrame)); diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index dacee33f9785..fa26ec11cd3e 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -221,7 +221,7 @@ nsTextControlFrame::GetType() const } nsresult -nsTextControlFrame::CalcIntrinsicSize(nsIRenderingContext* aRenderingContext, +nsTextControlFrame::CalcIntrinsicSize(nsRenderingContext* aRenderingContext, nsSize& aIntrinsicSize) { // Get leading and the Average/MaxAdvance char width @@ -466,7 +466,7 @@ nsTextControlFrame::AppendAnonymousContentTo(nsBaseContentList& aElements, } nscoord -nsTextControlFrame::GetMinWidth(nsIRenderingContext* aRenderingContext) +nsTextControlFrame::GetMinWidth(nsRenderingContext* aRenderingContext) { // Our min width is just our preferred width if we have auto width. nscoord result; @@ -478,7 +478,7 @@ nsTextControlFrame::GetMinWidth(nsIRenderingContext* aRenderingContext) } nsSize -nsTextControlFrame::ComputeAutoSize(nsIRenderingContext *aRenderingContext, +nsTextControlFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, nsSize aCBSize, nscoord aAvailableWidth, nsSize aMargin, nsSize aBorder, nsSize aPadding, PRBool aShrinkWrap) diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h index 1f31e9009bdb..b1b18dece88b 100644 --- a/layout/forms/nsTextControlFrame.h +++ b/layout/forms/nsTextControlFrame.h @@ -79,8 +79,8 @@ public: return do_QueryFrame(GetFirstChild(nsnull)); } - virtual nscoord GetMinWidth(nsIRenderingContext* aRenderingContext); - virtual nsSize ComputeAutoSize(nsIRenderingContext *aRenderingContext, + virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext); + virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext, nsSize aCBSize, nscoord aAvailableWidth, nsSize aMargin, nsSize aBorder, nsSize aPadding, PRBool aShrinkWrap); @@ -367,7 +367,7 @@ protected: // Compute our intrinsic size. This does not include any borders, paddings, // etc. Just the size of our actual area for the text (and the scrollbars, // for