From 17eb5a6efca134c6f911916ab1c24092a2a3231b Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 12 Sep 2009 17:49:24 +0100 Subject: [PATCH] Bug 497495 part 3: Add methods to every nsFrame subclass that expose the as-allocated identity of every frame object. Also some cleanups to the QueryFrame implementation. r=dbaron sr=roc --- layout/base/nsIPercentHeightObserver.h | 2 +- layout/forms/nsComboboxControlFrame.cpp | 6 ++ layout/forms/nsComboboxControlFrame.h | 1 + layout/forms/nsFieldSetFrame.cpp | 3 + layout/forms/nsFileControlFrame.cpp | 2 + layout/forms/nsFileControlFrame.h | 3 +- layout/forms/nsFormControlFrame.cpp | 2 + layout/forms/nsFormControlFrame.h | 2 +- layout/forms/nsGfxButtonControlFrame.cpp | 2 + layout/forms/nsGfxButtonControlFrame.h | 2 + layout/forms/nsGfxCheckboxControlFrame.cpp | 2 + layout/forms/nsGfxCheckboxControlFrame.h | 4 +- layout/forms/nsGfxRadioControlFrame.cpp | 2 + layout/forms/nsGfxRadioControlFrame.h | 3 +- layout/forms/nsHTMLButtonControlFrame.cpp | 2 + layout/forms/nsHTMLButtonControlFrame.h | 2 +- layout/forms/nsICheckboxControlFrame.h | 2 +- layout/forms/nsIComboboxControlFrame.h | 2 +- layout/forms/nsIFormControlFrame.h | 2 +- layout/forms/nsIListControlFrame.h | 2 +- layout/forms/nsIRadioControlFrame.h | 2 +- layout/forms/nsISelectControlFrame.h | 2 +- layout/forms/nsITextControlFrame.h | 2 +- layout/forms/nsImageControlFrame.cpp | 3 + layout/forms/nsIsIndexFrame.cpp | 2 + layout/forms/nsIsIndexFrame.h | 1 + layout/forms/nsLegendFrame.cpp | 2 + layout/forms/nsLegendFrame.h | 6 +- layout/forms/nsListControlFrame.cpp | 2 + layout/forms/nsListControlFrame.h | 1 + layout/forms/nsSelectsAreaFrame.cpp | 2 + layout/forms/nsSelectsAreaFrame.h | 2 + layout/forms/nsTextControlFrame.cpp | 5 +- layout/forms/nsTextControlFrame.h | 2 + layout/generic/nsBRFrame.cpp | 4 ++ layout/generic/nsBidiFrames.cpp | 2 + layout/generic/nsBidiFrames.h | 2 + layout/generic/nsBlockFrame.cpp | 2 + layout/generic/nsBlockFrame.h | 3 +- layout/generic/nsBulletFrame.cpp | 1 + layout/generic/nsBulletFrame.h | 2 + layout/generic/nsColumnSetFrame.cpp | 4 ++ layout/generic/nsContainerFrame.cpp | 2 + layout/generic/nsContainerFrame.h | 2 + layout/generic/nsFirstLetterFrame.cpp | 2 + layout/generic/nsFirstLetterFrame.h | 2 + layout/generic/nsFrame.cpp | 56 ++++++++----------- layout/generic/nsFrame.h | 21 +++++-- layout/generic/nsFrameFrame.cpp | 4 ++ layout/generic/nsFrameSetFrame.cpp | 18 ++++-- layout/generic/nsFrameSetFrame.h | 6 +- layout/generic/nsGfxScrollFrame.cpp | 4 ++ layout/generic/nsGfxScrollFrame.h | 2 + layout/generic/nsHTMLCanvasFrame.cpp | 2 + layout/generic/nsHTMLCanvasFrame.h | 2 + layout/generic/nsHTMLContainerFrame.cpp | 2 + layout/generic/nsHTMLContainerFrame.h | 1 + layout/generic/nsHTMLFrame.cpp | 5 +- layout/generic/nsIAnonymousContentCreator.h | 2 +- layout/generic/nsICanvasFrame.h | 2 +- layout/generic/nsIFrame.h | 2 +- layout/generic/nsIFrameFrame.h | 2 +- layout/generic/nsIImageFrame.h | 2 +- layout/generic/nsIObjectFrame.h | 2 +- layout/generic/nsIPageSequenceFrame.h | 2 +- layout/generic/nsIScrollableFrame.h | 2 +- layout/generic/nsIScrollableViewProvider.h | 2 +- layout/generic/nsIStatefulFrame.h | 2 +- layout/generic/nsImageFrame.cpp | 2 + layout/generic/nsImageFrame.h | 2 + layout/generic/nsInlineFrame.cpp | 6 ++ layout/generic/nsInlineFrame.h | 7 ++- layout/generic/nsLeafFrame.cpp | 2 + layout/generic/nsLeafFrame.h | 1 + layout/generic/nsObjectFrame.cpp | 2 + layout/generic/nsObjectFrame.h | 2 + layout/generic/nsPageContentFrame.cpp | 2 + layout/generic/nsPageContentFrame.h | 2 + layout/generic/nsPageFrame.cpp | 4 ++ layout/generic/nsPageFrame.h | 6 +- layout/generic/nsPlaceholderFrame.cpp | 2 + layout/generic/nsPlaceholderFrame.h | 2 + layout/generic/nsQueryFrame.h | 34 +++++++---- layout/generic/nsSimplePageSequence.cpp | 2 + layout/generic/nsSimplePageSequence.h | 1 + layout/generic/nsSpacerFrame.cpp | 7 ++- layout/generic/nsSplittableFrame.cpp | 2 + layout/generic/nsSplittableFrame.h | 2 + layout/generic/nsTextFrame.h | 2 + layout/generic/nsTextFrameThebes.cpp | 6 ++ layout/generic/nsVideoFrame.cpp | 2 + layout/generic/nsVideoFrame.h | 3 +- layout/generic/nsViewportFrame.cpp | 2 + layout/generic/nsViewportFrame.h | 2 + layout/mathml/nsIMathMLFrame.h | 2 +- layout/mathml/nsMathMLContainerFrame.cpp | 6 ++ layout/mathml/nsMathMLContainerFrame.h | 5 ++ layout/mathml/nsMathMLForeignFrameWrapper.cpp | 2 + layout/mathml/nsMathMLForeignFrameWrapper.h | 1 + layout/mathml/nsMathMLTokenFrame.cpp | 3 + layout/mathml/nsMathMLTokenFrame.h | 2 + layout/mathml/nsMathMLmactionFrame.cpp | 2 + layout/mathml/nsMathMLmactionFrame.h | 2 + layout/mathml/nsMathMLmencloseFrame.cpp | 2 + layout/mathml/nsMathMLmencloseFrame.h | 2 + layout/mathml/nsMathMLmfencedFrame.cpp | 2 + layout/mathml/nsMathMLmfencedFrame.h | 2 + layout/mathml/nsMathMLmfracFrame.cpp | 2 + layout/mathml/nsMathMLmfracFrame.h | 2 + layout/mathml/nsMathMLmmultiscriptsFrame.cpp | 2 + layout/mathml/nsMathMLmmultiscriptsFrame.h | 2 + layout/mathml/nsMathMLmoFrame.cpp | 2 + layout/mathml/nsMathMLmoFrame.h | 2 + layout/mathml/nsMathMLmoverFrame.cpp | 2 + layout/mathml/nsMathMLmoverFrame.h | 2 + layout/mathml/nsMathMLmpaddedFrame.cpp | 2 + layout/mathml/nsMathMLmpaddedFrame.h | 2 + layout/mathml/nsMathMLmphantomFrame.cpp | 2 + layout/mathml/nsMathMLmphantomFrame.h | 2 + layout/mathml/nsMathMLmrootFrame.cpp | 2 + layout/mathml/nsMathMLmrootFrame.h | 2 + layout/mathml/nsMathMLmrowFrame.cpp | 2 + layout/mathml/nsMathMLmrowFrame.h | 2 + layout/mathml/nsMathMLmspaceFrame.cpp | 2 + layout/mathml/nsMathMLmspaceFrame.h | 2 + layout/mathml/nsMathMLmsqrtFrame.cpp | 2 + layout/mathml/nsMathMLmsqrtFrame.h | 2 + layout/mathml/nsMathMLmstyleFrame.cpp | 2 + layout/mathml/nsMathMLmstyleFrame.h | 2 + layout/mathml/nsMathMLmsubFrame.cpp | 2 + layout/mathml/nsMathMLmsubFrame.h | 2 + layout/mathml/nsMathMLmsubsupFrame.cpp | 2 + layout/mathml/nsMathMLmsubsupFrame.h | 2 + layout/mathml/nsMathMLmsupFrame.cpp | 2 + layout/mathml/nsMathMLmsupFrame.h | 2 + layout/mathml/nsMathMLmtableFrame.cpp | 10 ++++ layout/mathml/nsMathMLmtableFrame.h | 8 +++ layout/mathml/nsMathMLmunderFrame.cpp | 2 + layout/mathml/nsMathMLmunderFrame.h | 2 + layout/mathml/nsMathMLmunderoverFrame.cpp | 2 + layout/mathml/nsMathMLmunderoverFrame.h | 2 + layout/style/nsICSSPseudoComparator.h | 2 +- layout/svg/base/src/nsISVGChildFrame.h | 2 +- layout/svg/base/src/nsISVGGlyphFragmentLeaf.h | 2 +- layout/svg/base/src/nsISVGGlyphFragmentNode.h | 2 +- layout/svg/base/src/nsISVGSVGFrame.h | 2 +- layout/svg/base/src/nsSVGAFrame.cpp | 4 ++ layout/svg/base/src/nsSVGClipPathFrame.cpp | 2 + layout/svg/base/src/nsSVGClipPathFrame.h | 2 + layout/svg/base/src/nsSVGContainerFrame.cpp | 3 + layout/svg/base/src/nsSVGContainerFrame.h | 8 +-- layout/svg/base/src/nsSVGFilterFrame.cpp | 2 + layout/svg/base/src/nsSVGFilterFrame.h | 2 + .../svg/base/src/nsSVGForeignObjectFrame.cpp | 2 + layout/svg/base/src/nsSVGForeignObjectFrame.h | 5 +- layout/svg/base/src/nsSVGGFrame.cpp | 2 + layout/svg/base/src/nsSVGGFrame.h | 2 + .../base/src/nsSVGGenericContainerFrame.cpp | 2 + .../svg/base/src/nsSVGGenericContainerFrame.h | 2 + layout/svg/base/src/nsSVGGeometryFrame.cpp | 2 + layout/svg/base/src/nsSVGGeometryFrame.h | 2 + layout/svg/base/src/nsSVGGlyphFrame.cpp | 2 + layout/svg/base/src/nsSVGGlyphFrame.h | 1 + layout/svg/base/src/nsSVGGradientFrame.cpp | 6 ++ layout/svg/base/src/nsSVGGradientFrame.h | 6 ++ layout/svg/base/src/nsSVGImageFrame.cpp | 4 ++ layout/svg/base/src/nsSVGInnerSVGFrame.cpp | 2 + layout/svg/base/src/nsSVGInnerSVGFrame.h | 4 +- layout/svg/base/src/nsSVGLeafFrame.cpp | 4 ++ layout/svg/base/src/nsSVGMarkerFrame.cpp | 2 + layout/svg/base/src/nsSVGMarkerFrame.h | 2 + layout/svg/base/src/nsSVGMaskFrame.cpp | 2 + layout/svg/base/src/nsSVGMaskFrame.h | 2 + layout/svg/base/src/nsSVGOuterSVGFrame.cpp | 2 + layout/svg/base/src/nsSVGOuterSVGFrame.h | 1 + layout/svg/base/src/nsSVGPaintServerFrame.cpp | 2 + layout/svg/base/src/nsSVGPaintServerFrame.h | 2 + .../svg/base/src/nsSVGPathGeometryFrame.cpp | 2 + layout/svg/base/src/nsSVGPathGeometryFrame.h | 1 + layout/svg/base/src/nsSVGPatternFrame.cpp | 2 + layout/svg/base/src/nsSVGPatternFrame.h | 2 + layout/svg/base/src/nsSVGStopFrame.cpp | 4 ++ layout/svg/base/src/nsSVGSwitchFrame.cpp | 4 ++ layout/svg/base/src/nsSVGTSpanFrame.cpp | 2 + layout/svg/base/src/nsSVGTSpanFrame.h | 1 + .../svg/base/src/nsSVGTextContainerFrame.cpp | 2 + layout/svg/base/src/nsSVGTextContainerFrame.h | 3 +- layout/svg/base/src/nsSVGTextFrame.cpp | 2 + layout/svg/base/src/nsSVGTextFrame.h | 2 + layout/svg/base/src/nsSVGTextPathFrame.cpp | 2 + layout/svg/base/src/nsSVGTextPathFrame.h | 2 + layout/svg/base/src/nsSVGUseFrame.cpp | 4 ++ layout/tables/nsITableCellLayout.h | 2 +- layout/tables/nsITableLayout.h | 2 +- layout/tables/nsTableCellFrame.cpp | 6 +- layout/tables/nsTableCellFrame.h | 5 +- layout/tables/nsTableColFrame.cpp | 2 + layout/tables/nsTableColFrame.h | 1 + layout/tables/nsTableColGroupFrame.cpp | 2 + layout/tables/nsTableColGroupFrame.h | 1 + layout/tables/nsTableFrame.cpp | 2 + layout/tables/nsTableFrame.h | 2 +- layout/tables/nsTableOuterFrame.cpp | 4 ++ layout/tables/nsTableOuterFrame.h | 4 +- layout/tables/nsTableRowFrame.cpp | 2 + layout/tables/nsTableRowFrame.h | 4 +- layout/tables/nsTableRowGroupFrame.cpp | 2 + layout/tables/nsTableRowGroupFrame.h | 3 +- layout/xul/base/public/nsIMenuFrame.h | 2 +- layout/xul/base/public/nsIScrollbarMediator.h | 2 +- .../xul/base/src/grid/nsGridRowGroupFrame.cpp | 4 +- .../xul/base/src/grid/nsGridRowGroupFrame.h | 1 + .../xul/base/src/grid/nsGridRowLeafFrame.cpp | 4 +- layout/xul/base/src/grid/nsGridRowLeafFrame.h | 1 + layout/xul/base/src/nsBoxFrame.cpp | 4 +- layout/xul/base/src/nsBoxFrame.h | 1 + layout/xul/base/src/nsButtonBoxFrame.cpp | 4 +- layout/xul/base/src/nsButtonBoxFrame.h | 2 + layout/xul/base/src/nsDeckFrame.cpp | 4 +- layout/xul/base/src/nsDeckFrame.h | 1 + layout/xul/base/src/nsDocElementBoxFrame.cpp | 3 + layout/xul/base/src/nsGroupBoxFrame.cpp | 3 + layout/xul/base/src/nsIRootBox.h | 2 +- layout/xul/base/src/nsIScrollbarFrame.h | 2 +- layout/xul/base/src/nsImageBoxFrame.cpp | 4 +- layout/xul/base/src/nsImageBoxFrame.h | 1 + layout/xul/base/src/nsLeafBoxFrame.cpp | 4 +- layout/xul/base/src/nsLeafBoxFrame.h | 1 + layout/xul/base/src/nsListBoxBodyFrame.cpp | 2 + layout/xul/base/src/nsListBoxBodyFrame.h | 4 +- layout/xul/base/src/nsListItemFrame.cpp | 3 +- layout/xul/base/src/nsListItemFrame.h | 2 + layout/xul/base/src/nsMenuBarFrame.cpp | 2 + layout/xul/base/src/nsMenuBarFrame.h | 2 + layout/xul/base/src/nsMenuFrame.cpp | 2 + layout/xul/base/src/nsMenuFrame.h | 1 + layout/xul/base/src/nsMenuPopupFrame.cpp | 2 + layout/xul/base/src/nsMenuPopupFrame.h | 2 + layout/xul/base/src/nsPopupSetFrame.cpp | 2 + layout/xul/base/src/nsPopupSetFrame.h | 2 + layout/xul/base/src/nsProgressMeterFrame.cpp | 4 +- layout/xul/base/src/nsProgressMeterFrame.h | 2 + layout/xul/base/src/nsResizerFrame.cpp | 4 +- layout/xul/base/src/nsResizerFrame.h | 2 + layout/xul/base/src/nsRootBoxFrame.cpp | 3 + layout/xul/base/src/nsScrollBoxFrame.cpp | 6 +- .../xul/base/src/nsScrollbarButtonFrame.cpp | 4 +- layout/xul/base/src/nsScrollbarButtonFrame.h | 2 + layout/xul/base/src/nsScrollbarFrame.cpp | 4 +- layout/xul/base/src/nsScrollbarFrame.h | 1 + layout/xul/base/src/nsSliderFrame.cpp | 4 +- layout/xul/base/src/nsSliderFrame.h | 2 + layout/xul/base/src/nsSplitterFrame.cpp | 4 +- layout/xul/base/src/nsSplitterFrame.h | 2 + layout/xul/base/src/nsStackFrame.cpp | 4 +- layout/xul/base/src/nsStackFrame.h | 1 + layout/xul/base/src/nsTextBoxFrame.cpp | 4 +- layout/xul/base/src/nsTextBoxFrame.h | 1 + layout/xul/base/src/nsTitleBarFrame.cpp | 4 +- layout/xul/base/src/nsTitleBarFrame.h | 3 +- layout/xul/base/src/nsXULLabelFrame.cpp | 2 + layout/xul/base/src/nsXULLabelFrame.h | 2 + .../xul/base/src/tree/src/nsTreeBodyFrame.cpp | 3 +- .../xul/base/src/tree/src/nsTreeBodyFrame.h | 4 +- .../xul/base/src/tree/src/nsTreeColFrame.cpp | 4 +- layout/xul/base/src/tree/src/nsTreeColFrame.h | 2 + xpcom/base/nscore.h | 38 +++++++++---- 267 files changed, 689 insertions(+), 153 deletions(-) diff --git a/layout/base/nsIPercentHeightObserver.h b/layout/base/nsIPercentHeightObserver.h index c80d6b89ee7..2a878d3eee6 100644 --- a/layout/base/nsIPercentHeightObserver.h +++ b/layout/base/nsIPercentHeightObserver.h @@ -51,7 +51,7 @@ class nsPresContext; class nsIPercentHeightObserver { public: - NS_DECLARE_FRAME_ACCESSOR(nsIPercentHeightObserver) + NS_DECL_QUERYFRAME_TARGET(nsIPercentHeightObserver) // Notify the observer that aReflowState has no computed height, but it has a percent height virtual void NotifyPercentHeight(const nsHTMLReflowState& aReflowState) = 0; diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 9f62bbd99a3..f3492b56bc4 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -172,6 +172,8 @@ NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, P return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsComboboxControlFrame) + //----------------------------------------------------------- // Reflow Debugging Macros // These let us "see" how many reflow counts are happening @@ -1052,6 +1054,8 @@ nsComboboxControlFrame::CreateAnonymousContent(nsTArray& aElements) // need to revisit this. class nsComboboxDisplayFrame : public nsBlockFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsComboboxDisplayFrame (nsStyleContext* aContext, nsComboboxControlFrame* aComboBox) : nsBlockFrame(aContext), @@ -1081,6 +1085,8 @@ protected: nsComboboxControlFrame* mComboBox; }; +NS_IMPL_FRAMEARENA_HELPERS(nsComboboxDisplayFrame) + nsIAtom* nsComboboxDisplayFrame::GetType() const { diff --git a/layout/forms/nsComboboxControlFrame.h b/layout/forms/nsComboboxControlFrame.h index 4833dd76745..ec0299dc58b 100644 --- a/layout/forms/nsComboboxControlFrame.h +++ b/layout/forms/nsComboboxControlFrame.h @@ -97,6 +97,7 @@ public: ~nsComboboxControlFrame(); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS NS_DECL_ISUPPORTS_INHERITED // nsIAnonymousContentCreator diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index 7ecd37d154f..937956fac5f 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -66,6 +66,7 @@ class nsLegendFrame; class nsFieldSetFrame : public nsHTMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS nsFieldSetFrame(nsStyleContext* aContext); @@ -133,6 +134,8 @@ NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsFieldSetFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsFieldSetFrame) + nsFieldSetFrame::nsFieldSetFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext) { diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp index 1ea72ac5a9f..c8aa3e407e7 100644 --- a/layout/forms/nsFileControlFrame.cpp +++ b/layout/forms/nsFileControlFrame.cpp @@ -87,6 +87,8 @@ NS_NewFileControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsFileControlFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsFileControlFrame) + nsFileControlFrame::nsFileControlFrame(nsStyleContext* aContext): nsBlockFrame(aContext), mTextFrame(nsnull), diff --git a/layout/forms/nsFileControlFrame.h b/layout/forms/nsFileControlFrame.h index b957fd3d036..cb635ef3ad9 100644 --- a/layout/forms/nsFileControlFrame.h +++ b/layout/forms/nsFileControlFrame.h @@ -64,7 +64,8 @@ public: const nsDisplayListSet& aLists); NS_DECL_QUERYFRAME - + NS_DECL_FRAMEARENA_HELPERS + // nsIFormControlFrame virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue); virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const; diff --git a/layout/forms/nsFormControlFrame.cpp b/layout/forms/nsFormControlFrame.cpp index aaed7b46b6c..d4dd38ad79e 100644 --- a/layout/forms/nsFormControlFrame.cpp +++ b/layout/forms/nsFormControlFrame.cpp @@ -66,6 +66,8 @@ NS_QUERYFRAME_HEAD(nsFormControlFrame) NS_QUERYFRAME_ENTRY(nsIFormControlFrame) NS_QUERYFRAME_TAIL_INHERITING(nsLeafFrame) +NS_IMPL_FRAMEARENA_HELPERS(nsFormControlFrame) + nscoord nsFormControlFrame::GetIntrinsicWidth() { diff --git a/layout/forms/nsFormControlFrame.h b/layout/forms/nsFormControlFrame.h index 179ecec939d..74152f3d75a 100644 --- a/layout/forms/nsFormControlFrame.h +++ b/layout/forms/nsFormControlFrame.h @@ -49,7 +49,6 @@ class nsFormControlFrame : public nsLeafFrame, public nsIFormControlFrame { - public: /** * Main constructor @@ -65,6 +64,7 @@ public: } NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS /** * Respond to a gui event diff --git a/layout/forms/nsGfxButtonControlFrame.cpp b/layout/forms/nsGfxButtonControlFrame.cpp index a41bc316e84..695ca655c1c 100644 --- a/layout/forms/nsGfxButtonControlFrame.cpp +++ b/layout/forms/nsGfxButtonControlFrame.cpp @@ -70,6 +70,8 @@ NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsGfxButtonControlFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsGfxButtonControlFrame) + void nsGfxButtonControlFrame::Destroy() { nsContentUtils::DestroyAnonymousContent(&mTextContent); diff --git a/layout/forms/nsGfxButtonControlFrame.h b/layout/forms/nsGfxButtonControlFrame.h index 63f5db4fdd7..bcdbf0cd39f 100644 --- a/layout/forms/nsGfxButtonControlFrame.h +++ b/layout/forms/nsGfxButtonControlFrame.h @@ -56,6 +56,8 @@ class nsGfxButtonControlFrame : public nsHTMLButtonControlFrame, public nsIAnonymousContentCreator { public: + NS_DECL_FRAMEARENA_HELPERS + nsGfxButtonControlFrame(nsStyleContext* aContext); virtual void Destroy(); diff --git a/layout/forms/nsGfxCheckboxControlFrame.cpp b/layout/forms/nsGfxCheckboxControlFrame.cpp index 36772129a92..672997194a6 100644 --- a/layout/forms/nsGfxCheckboxControlFrame.cpp +++ b/layout/forms/nsGfxCheckboxControlFrame.cpp @@ -105,6 +105,8 @@ NS_NewGfxCheckboxControlFrame(nsIPresShell* aPresShell, return new (aPresShell) nsGfxCheckboxControlFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsGfxCheckboxControlFrame) + //------------------------------------------------------------ // Initialize GFX-rendered state diff --git a/layout/forms/nsGfxCheckboxControlFrame.h b/layout/forms/nsGfxCheckboxControlFrame.h index 400ded6d41c..3cc8fb2b97c 100644 --- a/layout/forms/nsGfxCheckboxControlFrame.h +++ b/layout/forms/nsGfxCheckboxControlFrame.h @@ -48,9 +48,11 @@ class nsGfxCheckboxControlFrame : public nsFormControlFrame, public nsICheckboxControlFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsGfxCheckboxControlFrame(nsStyleContext* aContext); virtual ~nsGfxCheckboxControlFrame(); - + #ifdef DEBUG NS_IMETHOD GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult); diff --git a/layout/forms/nsGfxRadioControlFrame.cpp b/layout/forms/nsGfxRadioControlFrame.cpp index b2e8c00592f..b80cf6da00b 100644 --- a/layout/forms/nsGfxRadioControlFrame.cpp +++ b/layout/forms/nsGfxRadioControlFrame.cpp @@ -53,6 +53,8 @@ NS_NewGfxRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsGfxRadioControlFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsGfxRadioControlFrame) + nsGfxRadioControlFrame::nsGfxRadioControlFrame(nsStyleContext* aContext): nsFormControlFrame(aContext) { diff --git a/layout/forms/nsGfxRadioControlFrame.h b/layout/forms/nsGfxRadioControlFrame.h index e2bfc31a2fc..52a46d31bf2 100644 --- a/layout/forms/nsGfxRadioControlFrame.h +++ b/layout/forms/nsGfxRadioControlFrame.h @@ -56,7 +56,8 @@ public: ~nsGfxRadioControlFrame(); NS_DECL_QUERYFRAME - + NS_DECL_FRAMEARENA_HELPERS + #ifdef ACCESSIBILITY NS_IMETHOD GetAccessible(nsIAccessible** aAccessible); #endif diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index 886137906d0..19eb08cf96b 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -74,6 +74,8 @@ NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsHTMLButtonControlFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsHTMLButtonControlFrame) + nsHTMLButtonControlFrame::nsHTMLButtonControlFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext) { diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index 0537a356bc2..4ed1a4ddfd2 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -62,10 +62,10 @@ public: nsHTMLButtonControlFrame(nsStyleContext* aContext); ~nsHTMLButtonControlFrame(); - virtual void Destroy(); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, diff --git a/layout/forms/nsICheckboxControlFrame.h b/layout/forms/nsICheckboxControlFrame.h index 0ffb86f0e70..da9e26c00ae 100644 --- a/layout/forms/nsICheckboxControlFrame.h +++ b/layout/forms/nsICheckboxControlFrame.h @@ -49,7 +49,7 @@ class nsPresContext; class nsICheckboxControlFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsICheckboxControlFrame) + NS_DECL_QUERYFRAME_TARGET(nsICheckboxControlFrame) /** * Called by content when checkbox "checked" changes diff --git a/layout/forms/nsIComboboxControlFrame.h b/layout/forms/nsIComboboxControlFrame.h index 13c1daaf0d4..e477560e8e0 100644 --- a/layout/forms/nsIComboboxControlFrame.h +++ b/layout/forms/nsIComboboxControlFrame.h @@ -54,7 +54,7 @@ class nsCSSFrameConstructor; class nsIComboboxControlFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIComboboxControlFrame) + NS_DECL_QUERYFRAME_TARGET(nsIComboboxControlFrame) /** * Indicates whether the list is dropped down diff --git a/layout/forms/nsIFormControlFrame.h b/layout/forms/nsIFormControlFrame.h index 6e757e70521..496fe82a257 100644 --- a/layout/forms/nsIFormControlFrame.h +++ b/layout/forms/nsIFormControlFrame.h @@ -52,7 +52,7 @@ struct nsSize; class nsIFormControlFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIFormControlFrame) + NS_DECL_QUERYFRAME_TARGET(nsIFormControlFrame) /** * diff --git a/layout/forms/nsIListControlFrame.h b/layout/forms/nsIListControlFrame.h index bea580ba0a6..f57381b3173 100644 --- a/layout/forms/nsIListControlFrame.h +++ b/layout/forms/nsIListControlFrame.h @@ -50,7 +50,7 @@ class nsIContent; class nsIListControlFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIListControlFrame) + NS_DECL_QUERYFRAME_TARGET(nsIListControlFrame) /** * Sets the ComboBoxFrame diff --git a/layout/forms/nsIRadioControlFrame.h b/layout/forms/nsIRadioControlFrame.h index e5df4772c98..ee22d7e35d7 100644 --- a/layout/forms/nsIRadioControlFrame.h +++ b/layout/forms/nsIRadioControlFrame.h @@ -48,7 +48,7 @@ class nsStyleContext; class nsIRadioControlFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIRadioControlFrame) + NS_DECL_QUERYFRAME_TARGET(nsIRadioControlFrame) /** * Called by content when the radio button's state changes diff --git a/layout/forms/nsISelectControlFrame.h b/layout/forms/nsISelectControlFrame.h index 51fe72e78bb..721ec946dc3 100644 --- a/layout/forms/nsISelectControlFrame.h +++ b/layout/forms/nsISelectControlFrame.h @@ -49,7 +49,7 @@ class nsIDOMHTMLOptionElement; class nsISelectControlFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsISelectControlFrame) + NS_DECL_QUERYFRAME_TARGET(nsISelectControlFrame) /** * Adds an option to the list at index diff --git a/layout/forms/nsITextControlFrame.h b/layout/forms/nsITextControlFrame.h index 85c677b8393..223b7d89811 100644 --- a/layout/forms/nsITextControlFrame.h +++ b/layout/forms/nsITextControlFrame.h @@ -48,7 +48,7 @@ class nsFrameSelection; class nsITextControlFrame : public nsIFormControlFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsITextControlFrame) + NS_DECL_QUERYFRAME_TARGET(nsITextControlFrame) NS_IMETHOD GetEditor(nsIEditor **aEditor) = 0; diff --git a/layout/forms/nsImageControlFrame.cpp b/layout/forms/nsImageControlFrame.cpp index 24aa1693977..33618ba5299 100644 --- a/layout/forms/nsImageControlFrame.cpp +++ b/layout/forms/nsImageControlFrame.cpp @@ -82,6 +82,7 @@ public: nsIFrame* aPrevInFlow); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS NS_IMETHOD Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, @@ -137,6 +138,8 @@ NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsImageControlFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsImageControlFrame) + NS_IMETHODIMP nsImageControlFrame::Init(nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/forms/nsIsIndexFrame.cpp b/layout/forms/nsIsIndexFrame.cpp index 4cad3acfc4f..7827a16e787 100644 --- a/layout/forms/nsIsIndexFrame.cpp +++ b/layout/forms/nsIsIndexFrame.cpp @@ -84,6 +84,8 @@ NS_NewIsIndexFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsIsIndexFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsIsIndexFrame) + nsIsIndexFrame::nsIsIndexFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) { diff --git a/layout/forms/nsIsIndexFrame.h b/layout/forms/nsIsIndexFrame.h index 42e1cd385de..6ad9067fb5e 100644 --- a/layout/forms/nsIsIndexFrame.h +++ b/layout/forms/nsIsIndexFrame.h @@ -82,6 +82,7 @@ public: NS_IMETHOD KeyPress(nsIDOMEvent* aKeyEvent); // we only care when a key is pressed NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsISupports NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); diff --git a/layout/forms/nsLegendFrame.cpp b/layout/forms/nsLegendFrame.cpp index 00f582ee409..e5f6c8e535e 100644 --- a/layout/forms/nsLegendFrame.cpp +++ b/layout/forms/nsLegendFrame.cpp @@ -60,6 +60,8 @@ NS_NewLegendFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return f; } +NS_IMPL_FRAMEARENA_HELPERS(nsLegendFrame) + nsIAtom* nsLegendFrame::GetType() const { diff --git a/layout/forms/nsLegendFrame.h b/layout/forms/nsLegendFrame.h index 378fe6169df..2148b7db017 100644 --- a/layout/forms/nsLegendFrame.h +++ b/layout/forms/nsLegendFrame.h @@ -42,12 +42,12 @@ class nsLegendFrame : public nsBlockFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsLegendFrame) + NS_DECL_QUERYFRAME_TARGET(nsLegendFrame) + NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS nsLegendFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {} - NS_DECL_QUERYFRAME - NS_IMETHOD Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aReflowState, diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 5e678645451..3ca7f706076 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -164,6 +164,8 @@ NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsListControlFrame) + //--------------------------------------------------------- nsListControlFrame::nsListControlFrame( nsIPresShell* aShell, nsIDocument* aDocument, nsStyleContext* aContext) diff --git a/layout/forms/nsListControlFrame.h b/layout/forms/nsListControlFrame.h index 0ac754f3931..1cbe9c3be08 100644 --- a/layout/forms/nsListControlFrame.h +++ b/layout/forms/nsListControlFrame.h @@ -78,6 +78,7 @@ public: friend nsIFrame* NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIFrame NS_IMETHOD HandleEvent(nsPresContext* aPresContext, diff --git a/layout/forms/nsSelectsAreaFrame.cpp b/layout/forms/nsSelectsAreaFrame.cpp index be7a1475c57..e1a82985ce3 100644 --- a/layout/forms/nsSelectsAreaFrame.cpp +++ b/layout/forms/nsSelectsAreaFrame.cpp @@ -56,6 +56,8 @@ NS_NewSelectsAreaFrame(nsIPresShell* aShell, nsStyleContext* aContext, PRUint32 return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsSelectsAreaFrame) + //--------------------------------------------------------- PRBool nsSelectsAreaFrame::IsOptionElement(nsIContent* aContent) diff --git a/layout/forms/nsSelectsAreaFrame.h b/layout/forms/nsSelectsAreaFrame.h index 14a8764d993..623e79e5f8c 100644 --- a/layout/forms/nsSelectsAreaFrame.h +++ b/layout/forms/nsSelectsAreaFrame.h @@ -43,6 +43,8 @@ class nsIContent; class nsSelectsAreaFrame : public nsBlockFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewSelectsAreaFrame(nsIPresShell* aShell, nsStyleContext* aContext, PRUint32 aFlags); NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index dabbc69c912..ca9e7437b18 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -951,12 +951,13 @@ NS_NewTextControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTextControlFrame(aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTextControlFrame) + NS_QUERYFRAME_HEAD(nsTextControlFrame) NS_QUERYFRAME_ENTRY(nsIFormControlFrame) NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator) NS_QUERYFRAME_ENTRY(nsITextControlFrame) - if (nsIScrollableViewProvider::kFrameIID == id && IsScrollable()) - return static_cast(this); + NS_QUERYFRAME_ENTRY_CONDITIONAL(nsIScrollableViewProvider, IsScrollable()) NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) #ifdef ACCESSIBILITY diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h index 4f75acd4ddd..e354f6d597e 100644 --- a/layout/forms/nsTextControlFrame.h +++ b/layout/forms/nsTextControlFrame.h @@ -69,6 +69,8 @@ class nsTextControlFrame : public nsStackFrame, { public: + NS_DECL_FRAMEARENA_HELPERS + nsTextControlFrame(nsIPresShell* aShell, nsStyleContext* aContext); virtual ~nsTextControlFrame(); diff --git a/layout/generic/nsBRFrame.cpp b/layout/generic/nsBRFrame.cpp index 725e72afbff..20ec4457ea7 100644 --- a/layout/generic/nsBRFrame.cpp +++ b/layout/generic/nsBRFrame.cpp @@ -61,6 +61,8 @@ class BRFrame : public nsFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual ContentOffsets CalcContentOffsetsFromFramePoint(nsPoint aPoint); @@ -103,6 +105,8 @@ NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) BRFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(BRFrame) + BRFrame::~BRFrame() { } diff --git a/layout/generic/nsBidiFrames.cpp b/layout/generic/nsBidiFrames.cpp index e6c237b67c9..7a4be1fc382 100644 --- a/layout/generic/nsBidiFrames.cpp +++ b/layout/generic/nsBidiFrames.cpp @@ -71,4 +71,6 @@ NS_NewDirectionalFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUni return new (aPresShell) nsDirectionalFrame(aContext, aChar); } +NS_IMPL_FRAMEARENA_HELPERS(nsDirectionalFrame) + #endif /* IBMBIDI */ diff --git a/layout/generic/nsBidiFrames.h b/layout/generic/nsBidiFrames.h index 35e225b5525..0550b1f2daa 100644 --- a/layout/generic/nsBidiFrames.h +++ b/layout/generic/nsBidiFrames.h @@ -50,6 +50,8 @@ protected: virtual ~nsDirectionalFrame(); public: + NS_DECL_FRAMEARENA_HELPERS + nsDirectionalFrame(nsStyleContext* aContext, PRUnichar aChar); /** diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 69ee5d8a617..83cb90d3bad 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -276,6 +276,8 @@ NS_NewBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint32 aF return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsBlockFrame) + nsBlockFrame::~nsBlockFrame() { } diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index e6bdd29b640..14fc9e6c44f 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -137,7 +137,8 @@ class nsIntervalSet; class nsBlockFrame : public nsBlockFrameSuper { public: - NS_DECLARE_FRAME_ACCESSOR(nsBlockFrame) + NS_DECL_QUERYFRAME_TARGET(nsBlockFrame) + NS_DECL_FRAMEARENA_HELPERS typedef nsLineList::iterator line_iterator; typedef nsLineList::const_iterator const_line_iterator; diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index 628b0c8a8c7..61514e16aa0 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -84,6 +84,7 @@ private: nsBulletFrame *mFrame; }; +NS_IMPL_FRAMEARENA_HELPERS(nsBulletFrame) nsBulletFrame::~nsBulletFrame() { diff --git a/layout/generic/nsBulletFrame.h b/layout/generic/nsBulletFrame.h index 27a3cdb2a2c..e891a9bd1a5 100644 --- a/layout/generic/nsBulletFrame.h +++ b/layout/generic/nsBulletFrame.h @@ -52,6 +52,8 @@ */ class nsBulletFrame : public nsFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsBulletFrame(nsStyleContext* aContext) : nsFrame(aContext) {} virtual ~nsBulletFrame(); diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index 499f8be685b..86e66bf413a 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -54,6 +54,8 @@ class nsColumnSetFrame : public nsHTMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsColumnSetFrame(nsStyleContext* aContext); NS_IMETHOD SetInitialChildList(nsIAtom* aListName, @@ -192,6 +194,8 @@ NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint3 return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsColumnSetFrame) + nsColumnSetFrame::nsColumnSetFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext), mLastBalanceHeight(NS_INTRINSICSIZE), mLastFrameStatus(NS_FRAME_COMPLETE) diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 26fecc26ba5..8a6726e1e72 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -80,6 +80,8 @@ #undef NOISY #endif +NS_IMPL_FRAMEARENA_HELPERS(nsContainerFrame) + nsContainerFrame::~nsContainerFrame() { } diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index e77bbb4331b..67f8f0ec745 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -73,6 +73,8 @@ class nsOverflowContinuationTracker; class nsContainerFrame : public nsSplittableFrame { public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame overrides NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/generic/nsFirstLetterFrame.cpp b/layout/generic/nsFirstLetterFrame.cpp index 163a0233df0..9c795258532 100644 --- a/layout/generic/nsFirstLetterFrame.cpp +++ b/layout/generic/nsFirstLetterFrame.cpp @@ -54,6 +54,8 @@ NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsFirstLetterFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsFirstLetterFrame) + #ifdef NS_DEBUG NS_IMETHODIMP nsFirstLetterFrame::GetFrameName(nsAString& aResult) const diff --git a/layout/generic/nsFirstLetterFrame.h b/layout/generic/nsFirstLetterFrame.h index 355e0854cc3..0a605c518df 100644 --- a/layout/generic/nsFirstLetterFrame.h +++ b/layout/generic/nsFirstLetterFrame.h @@ -46,6 +46,8 @@ class nsFirstLetterFrame : public nsFirstLetterFrameSuper { public: + NS_DECL_FRAMEARENA_HELPERS + nsFirstLetterFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext) {} NS_IMETHOD Init(nsIContent* aContent, diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 56207cf38dc..45ef52934f9 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -288,30 +288,6 @@ NS_NewEmptyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsFrame(aContext); } -// Overloaded new operator. Relies on an arena (which comes from the -// presShell) to perform the allocation. -void* -nsFrame::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW -{ - return aPresShell->AllocateFrame(sz, 0 /* dummy */); -} - -// Overridden to prevent the global delete from being called, since the memory -// came out of an nsIArena instead of the global delete operator's heap. -void -nsFrame::operator delete(void* aPtr, size_t sz) -{ - // Don't let the memory be freed, since it will be recycled - // instead. Don't call the global operator delete. - - // Stash the size of the object in the first four bytes of the - // freed up memory. The Destroy method can then use this information - // to recycle the object. - size_t* szPtr = (size_t*)aPtr; - *szPtr = sz; -} - - nsFrame::nsFrame(nsStyleContext* aContext) { MOZ_COUNT_CTOR(nsFrame); @@ -330,9 +306,19 @@ nsFrame::~nsFrame() mStyleContext->Release(); } +NS_IMPL_FRAMEARENA_HELPERS(nsFrame) + +// Dummy operator delete. Will never be called, but must be defined +// to satisfy some C++ ABIs. +void +nsFrame::operator delete(void *, size_t) +{ + NS_RUNTIMEABORT("nsFrame::operator delete should never be called"); +} + NS_QUERYFRAME_HEAD(nsFrame) NS_QUERYFRAME_ENTRY(nsIFrame) -NS_QUERYFRAME_TAIL +NS_QUERYFRAME_TAIL_INHERITANCE_ROOT ///////////////////////////////////////////////////////////////////////////// // nsIFrame @@ -470,14 +456,20 @@ nsFrame::Destroy() view->Destroy(); } - // Deleting the frame doesn't really free the memory, since we're using an - // arena for allocation, but we will get our destructors called. - delete this; + // Must retrieve the object size before calling destructors, so the + // vtable is still valid. + // + // Note to future tweakers: having the method that returns the + // object size call the destructor will not avoid an indirect call; + // the compiler cannot devirtualize the call to the destructor even + // if it's from a method defined in the same class. - // Now that we're totally cleaned out, we need to add ourselves to the presshell's - // recycler. - size_t* sz = (size_t*)this; - shell->FreeFrame(*sz, 0 /* dummy */, (void*)this); + size_t sz = GetAllocatedSize(); + this->~nsFrame(); + + // Now that we're totally cleaned out, we need to add ourselves to + // the presshell's recycler. + shell->FreeFrame(sz, 0 /* dummy */, (void*)this); } NS_IMETHODIMP diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index 9572054cf06..7d48c09be4c 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -110,6 +110,22 @@ #define NS_FRAME_TRACE_REFLOW_OUT(_method, _status) #endif +// Frame allocation boilerplate macros. Every subclass of nsFrame +// must define its own operator new and GetAllocatedSize. If they do +// not, the per-frame recycler lists in nsPresArena will not work +// correctly, with potentially catastrophic consequences (not enough +// memory is allocated for a frame object). + +#define NS_DECL_FRAMEARENA_HELPERS \ + NS_MUST_OVERRIDE void* operator new(size_t, nsIPresShell*); \ + virtual NS_MUST_OVERRIDE size_t GetAllocatedSize(); + +#define NS_IMPL_FRAMEARENA_HELPERS(class) \ + void* class::operator new(size_t sz, nsIPresShell* aShell) \ + { return aShell->AllocateFrame(sz, nsQueryFrame::class##_id); } \ + size_t class::GetAllocatedSize() \ + { return sizeof(class); } + //---------------------------------------------------------------------- struct nsBoxLayoutMetrics; @@ -131,10 +147,6 @@ public: friend nsIFrame* NS_NewEmptyFrame(nsIPresShell* aShell, nsStyleContext* aContext); - // Overloaded new operator. Relies on an arena (which comes from the - // presShell) to perform the allocation. - void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW; - private: // Left undefined; nsFrame objects are never allocated from the heap. void* operator new(size_t sz) CPP_THROW_NEW; @@ -156,6 +168,7 @@ public: // nsQueryFrame NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIFrame NS_IMETHOD Init(nsIContent* aContent, diff --git a/layout/generic/nsFrameFrame.cpp b/layout/generic/nsFrameFrame.cpp index 43e3b63b31d..1cdd8ccc820 100644 --- a/layout/generic/nsFrameFrame.cpp +++ b/layout/generic/nsFrameFrame.cpp @@ -113,6 +113,8 @@ class nsSubDocumentFrame : public nsLeafFrame, public nsIReflowCallback { public: + NS_DECL_FRAMEARENA_HELPERS + nsSubDocumentFrame(nsStyleContext* aContext); #ifdef DEBUG @@ -757,6 +759,8 @@ NS_NewSubDocumentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSubDocumentFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSubDocumentFrame) + void nsSubDocumentFrame::Destroy() { diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index 05d3ab4f6c2..b15ed7f9943 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -129,9 +129,11 @@ void nsFramesetDrag::UnSet() /******************************************************************************* * nsHTMLFramesetBorderFrame ******************************************************************************/ -class nsHTMLFramesetBorderFrame : public nsLeafFrame { - +class nsHTMLFramesetBorderFrame : public nsLeafFrame +{ public: + NS_DECL_FRAMEARENA_HELPERS + #ifdef DEBUG NS_IMETHOD GetFrameName(nsAString& aResult) const; #endif @@ -179,9 +181,11 @@ protected: /******************************************************************************* * nsHTMLFramesetBlankFrame ******************************************************************************/ -class nsHTMLFramesetBlankFrame : public nsLeafFrame { - +class nsHTMLFramesetBlankFrame : public nsLeafFrame +{ public: + NS_DECL_FRAMEARENA_HELPERS + #ifdef DEBUG NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const; #endif @@ -1603,6 +1607,8 @@ NS_NewHTMLFramesetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsHTMLFramesetFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsHTMLFramesetFrame) + /******************************************************************************* * nsHTMLFramesetBorderFrame ******************************************************************************/ @@ -1624,6 +1630,8 @@ nsHTMLFramesetBorderFrame::~nsHTMLFramesetBorderFrame() //printf("nsHTMLFramesetBorderFrame destructor %p \n", this); } +NS_IMPL_FRAMEARENA_HELPERS(nsHTMLFramesetBorderFrame) + nscoord nsHTMLFramesetBorderFrame::GetIntrinsicWidth() { // No intrinsic width @@ -1836,6 +1844,8 @@ NS_IMETHODIMP nsHTMLFramesetBorderFrame::GetFrameName(nsAString& aResult) const * nsHTMLFramesetBlankFrame ******************************************************************************/ +NS_IMPL_FRAMEARENA_HELPERS(nsHTMLFramesetBlankFrame) + nsHTMLFramesetBlankFrame::~nsHTMLFramesetBlankFrame() { //printf("nsHTMLFramesetBlankFrame destructor %p \n", this); diff --git a/layout/generic/nsFrameSetFrame.h b/layout/generic/nsFrameSetFrame.h index 4f31be1c1dd..7150f144a22 100644 --- a/layout/generic/nsFrameSetFrame.h +++ b/layout/generic/nsFrameSetFrame.h @@ -104,14 +104,14 @@ struct nsFramesetDrag { class nsHTMLFramesetFrame : public nsHTMLContainerFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsHTMLFramesetFrame) + NS_DECL_QUERYFRAME_TARGET(nsHTMLFramesetFrame) + NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS nsHTMLFramesetFrame(nsStyleContext* aContext); virtual ~nsHTMLFramesetFrame(); - NS_DECL_QUERYFRAME - NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow); diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 3d38845406b..366d1b37ff0 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -90,6 +90,8 @@ NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool return new (aPresShell) nsHTMLScrollFrame(aPresShell, aContext, aIsRoot); } +NS_IMPL_FRAMEARENA_HELPERS(nsHTMLScrollFrame) + nsHTMLScrollFrame::nsHTMLScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, PRBool aIsRoot) : nsHTMLContainerFrame(aContext), mInner(this, aIsRoot, PR_FALSE) @@ -945,6 +947,8 @@ NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool return new (aPresShell) nsXULScrollFrame(aPresShell, aContext, aIsRoot); } +NS_IMPL_FRAMEARENA_HELPERS(nsXULScrollFrame) + nsXULScrollFrame::nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, PRBool aIsRoot) : nsBoxFrame(aShell, aContext, aIsRoot), mInner(this, aIsRoot, PR_TRUE) diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index aef4933319d..dff2b0fcb90 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -251,6 +251,7 @@ public: friend nsIFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // Called to set the child frames. We typically have three: the scroll area, // the vertical scrollbar, and the horizontal scrollbar. @@ -436,6 +437,7 @@ class nsXULScrollFrame : public nsBoxFrame, public nsIStatefulFrame { public: NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS friend nsIFrame* NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot); diff --git a/layout/generic/nsHTMLCanvasFrame.cpp b/layout/generic/nsHTMLCanvasFrame.cpp index 772ec0a5190..6169348c4f1 100644 --- a/layout/generic/nsHTMLCanvasFrame.cpp +++ b/layout/generic/nsHTMLCanvasFrame.cpp @@ -92,6 +92,8 @@ NS_NewHTMLCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsHTMLCanvasFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsHTMLCanvasFrame) + nsHTMLCanvasFrame::~nsHTMLCanvasFrame() { } diff --git a/layout/generic/nsHTMLCanvasFrame.h b/layout/generic/nsHTMLCanvasFrame.h index 2294aab4629..e6cbc1a56dc 100644 --- a/layout/generic/nsHTMLCanvasFrame.h +++ b/layout/generic/nsHTMLCanvasFrame.h @@ -51,6 +51,8 @@ nsIFrame* NS_NewHTMLCanvasFrame (nsIPresShell* aPresShell, nsStyleContext* aCont class nsHTMLCanvasFrame : public nsSplittableFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsHTMLCanvasFrame(nsStyleContext* aContext) : nsSplittableFrame(aContext) {} NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, diff --git a/layout/generic/nsHTMLContainerFrame.cpp b/layout/generic/nsHTMLContainerFrame.cpp index 7cf435e91ba..2b708be778f 100644 --- a/layout/generic/nsHTMLContainerFrame.cpp +++ b/layout/generic/nsHTMLContainerFrame.cpp @@ -737,3 +737,5 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIFrame* aFrame, aFrame)); return NS_OK; } + +NS_IMPL_FRAMEARENA_HELPERS(nsHTMLContainerFrame) diff --git a/layout/generic/nsHTMLContainerFrame.h b/layout/generic/nsHTMLContainerFrame.h index 17501e37a7a..18c5640a2a2 100644 --- a/layout/generic/nsHTMLContainerFrame.h +++ b/layout/generic/nsHTMLContainerFrame.h @@ -69,6 +69,7 @@ class nsDisplayTextDecoration; // functionality. class nsHTMLContainerFrame : public nsContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS /** * Helper method to create next-in-flows if necessary. If aFrame diff --git a/layout/generic/nsHTMLFrame.cpp b/layout/generic/nsHTMLFrame.cpp index 00594344946..3ec22a611df 100644 --- a/layout/generic/nsHTMLFrame.cpp +++ b/layout/generic/nsHTMLFrame.cpp @@ -87,6 +87,7 @@ public: mAbsoluteContainer(nsGkAtoms::absoluteList) {} NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsISupports (nsIScrollPositionListener) NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); @@ -187,9 +188,11 @@ private: nsIFrame* NS_NewCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { - return new (aPresShell)CanvasFrame(aContext); + return new (aPresShell) CanvasFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(CanvasFrame) + NS_IMPL_QUERY_INTERFACE1(CanvasFrame, nsIScrollPositionListener) NS_QUERYFRAME_HEAD(CanvasFrame) diff --git a/layout/generic/nsIAnonymousContentCreator.h b/layout/generic/nsIAnonymousContentCreator.h index 7a62e905b8e..6c6dd4c6135 100644 --- a/layout/generic/nsIAnonymousContentCreator.h +++ b/layout/generic/nsIAnonymousContentCreator.h @@ -58,7 +58,7 @@ template class nsTArray; class nsIAnonymousContentCreator { public: - NS_DECLARE_FRAME_ACCESSOR(nsIAnonymousContentCreator) + NS_DECL_QUERYFRAME_TARGET(nsIAnonymousContentCreator) /** * Creates "native" anonymous content and adds the created content to diff --git a/layout/generic/nsICanvasFrame.h b/layout/generic/nsICanvasFrame.h index 0a7693af0c4..2a57a72f5eb 100644 --- a/layout/generic/nsICanvasFrame.h +++ b/layout/generic/nsICanvasFrame.h @@ -45,7 +45,7 @@ class nsICanvasFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsICanvasFrame) + NS_DECL_QUERYFRAME_TARGET(nsICanvasFrame) /** SetHasFocus tells the CanvasFrame to draw with focus ring * @param aHasFocus PR_TRUE to show focus ring, PR_FALSE to hide it diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 89018f24eb3..44713924cba 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -490,7 +490,7 @@ typedef PRBool nsDidReflowStatus; class nsIFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIFrame) + NS_DECL_QUERYFRAME_TARGET(nsIFrame) nsPresContext* PresContext() const { return GetStyleContext()->GetRuleNode()->GetPresContext(); diff --git a/layout/generic/nsIFrameFrame.h b/layout/generic/nsIFrameFrame.h index 7bcf14f1c14..6e99ea679cb 100644 --- a/layout/generic/nsIFrameFrame.h +++ b/layout/generic/nsIFrameFrame.h @@ -48,7 +48,7 @@ class nsIDocShell; class nsIFrameFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIFrameFrame) + NS_DECL_QUERYFRAME_TARGET(nsIFrameFrame) NS_IMETHOD GetDocShell(nsIDocShell **aDocShell) = 0; diff --git a/layout/generic/nsIImageFrame.h b/layout/generic/nsIImageFrame.h index d015ec6ed7a..bf0888561aa 100644 --- a/layout/generic/nsIImageFrame.h +++ b/layout/generic/nsIImageFrame.h @@ -51,7 +51,7 @@ class nsIImageMap; class nsIImageFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIImageFrame) + NS_DECL_QUERYFRAME_TARGET(nsIImageFrame) NS_IMETHOD GetIntrinsicImageSize(nsSize& aSize) = 0; diff --git a/layout/generic/nsIObjectFrame.h b/layout/generic/nsIObjectFrame.h index 003c930e4cd..7a1e30c6528 100644 --- a/layout/generic/nsIObjectFrame.h +++ b/layout/generic/nsIObjectFrame.h @@ -50,7 +50,7 @@ class nsIPluginInstance; class nsIObjectFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIObjectFrame) + NS_DECL_QUERYFRAME_TARGET(nsIObjectFrame) NS_IMETHOD GetPluginInstance(nsIPluginInstance*& aPluginInstance) = 0; diff --git a/layout/generic/nsIPageSequenceFrame.h b/layout/generic/nsIPageSequenceFrame.h index 5a008ab2097..f39e8687a96 100644 --- a/layout/generic/nsIPageSequenceFrame.h +++ b/layout/generic/nsIPageSequenceFrame.h @@ -51,7 +51,7 @@ class nsIPrintSettings; class nsIPageSequenceFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIPageSequenceFrame) + NS_DECL_QUERYFRAME_TARGET(nsIPageSequenceFrame) /** * Print the set of pages. diff --git a/layout/generic/nsIScrollableFrame.h b/layout/generic/nsIScrollableFrame.h index 21ec24816b2..0555c95b68b 100644 --- a/layout/generic/nsIScrollableFrame.h +++ b/layout/generic/nsIScrollableFrame.h @@ -55,7 +55,7 @@ class nsBoxLayoutState; class nsIScrollableFrame : public nsIScrollableViewProvider { public: - NS_DECLARE_FRAME_ACCESSOR(nsIScrollableFrame) + NS_DECL_QUERYFRAME_TARGET(nsIScrollableFrame) /** * Get the frame that we are scrolling within the scrollable frame. diff --git a/layout/generic/nsIScrollableViewProvider.h b/layout/generic/nsIScrollableViewProvider.h index eb229d01fef..71f24fc0111 100644 --- a/layout/generic/nsIScrollableViewProvider.h +++ b/layout/generic/nsIScrollableViewProvider.h @@ -46,7 +46,7 @@ class nsIScrollableView; class nsIScrollableViewProvider : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIScrollableViewProvider) + NS_DECL_QUERYFRAME_TARGET(nsIScrollableViewProvider) virtual nsIScrollableView* GetScrollableView() = 0; }; diff --git a/layout/generic/nsIStatefulFrame.h b/layout/generic/nsIStatefulFrame.h index ba2d870e833..980238797d4 100644 --- a/layout/generic/nsIStatefulFrame.h +++ b/layout/generic/nsIStatefulFrame.h @@ -14,7 +14,7 @@ class nsPresState; class nsIStatefulFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIStatefulFrame) + NS_DECL_QUERYFRAME_TARGET(nsIStatefulFrame) // If you create a special type stateful frame (e.g. scroll) that needs // to be captured outside of the standard pass through the frames, you'll need diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index a51c9d888fc..f881ecb0ac4 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -161,6 +161,8 @@ NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsImageFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsImageFrame) + nsImageFrame::nsImageFrame(nsStyleContext* aContext) : ImageFrameSuper(aContext), diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index 5358fd501be..f6f7100cb30 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -94,6 +94,8 @@ private: class nsImageFrame : public ImageFrameSuper, public nsIImageFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsImageFrame(nsStyleContext* aContext); NS_DECL_QUERYFRAME diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index ac5ad5d8629..cae060d13c7 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -73,6 +73,8 @@ NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsInlineFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsInlineFrame) + NS_QUERYFRAME_HEAD(nsInlineFrame) NS_QUERYFRAME_ENTRY(nsInlineFrame) NS_QUERYFRAME_TAIL_INHERITING(nsInlineFrameSuper) @@ -902,6 +904,8 @@ NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsFirstLineFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsFirstLineFrame) + #ifdef DEBUG NS_IMETHODIMP nsFirstLineFrame::GetFrameName(nsAString& aResult) const @@ -1080,6 +1084,8 @@ NS_NewPositionedInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsPositionedInlineFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsPositionedInlineFrame) + void nsPositionedInlineFrame::Destroy() { diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index da5875bf0f5..a678aabc6e4 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -76,8 +76,9 @@ class nsAnonymousBlockFrame; class nsInlineFrame : public nsInlineFrameSuper { public: - NS_DECLARE_FRAME_ACCESSOR(nsInlineFrame) + NS_DECL_QUERYFRAME_TARGET(nsInlineFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS friend nsIFrame* NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); @@ -213,6 +214,8 @@ protected: */ class nsFirstLineFrame : public nsInlineFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); #ifdef DEBUG @@ -247,6 +250,8 @@ protected: class nsPositionedInlineFrame : public nsInlineFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsPositionedInlineFrame(nsStyleContext* aContext) : nsInlineFrame(aContext) , mAbsoluteContainer(nsGkAtoms::absoluteList) diff --git a/layout/generic/nsLeafFrame.cpp b/layout/generic/nsLeafFrame.cpp index 7eceafe4092..65c6cfd8ff4 100644 --- a/layout/generic/nsLeafFrame.cpp +++ b/layout/generic/nsLeafFrame.cpp @@ -48,6 +48,8 @@ nsLeafFrame::~nsLeafFrame() { } +NS_IMPL_FRAMEARENA_HELPERS(nsLeafFrame) + /* virtual */ nscoord nsLeafFrame::GetMinWidth(nsIRenderingContext *aRenderingContext) { diff --git a/layout/generic/nsLeafFrame.h b/layout/generic/nsLeafFrame.h index a091397c800..73089dc6c2e 100644 --- a/layout/generic/nsLeafFrame.h +++ b/layout/generic/nsLeafFrame.h @@ -51,6 +51,7 @@ */ class nsLeafFrame : public nsFrame { public: + NS_DECL_FRAMEARENA_HELPERS // nsIFrame replacements NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index ed265378ae0..52a8eab92f2 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -2357,6 +2357,8 @@ NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsObjectFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsObjectFrame) + // nsPluginDOMContextMenuListener class implementation diff --git a/layout/generic/nsObjectFrame.h b/layout/generic/nsObjectFrame.h index 437631e2447..bcb7f33f4e6 100644 --- a/layout/generic/nsObjectFrame.h +++ b/layout/generic/nsObjectFrame.h @@ -63,6 +63,8 @@ class nsDisplayPlugin; class nsObjectFrame : public nsObjectFrameSuper, public nsIObjectFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_DECL_QUERYFRAME diff --git a/layout/generic/nsPageContentFrame.cpp b/layout/generic/nsPageContentFrame.cpp index 0d40859c6a3..7264c0165be 100644 --- a/layout/generic/nsPageContentFrame.cpp +++ b/layout/generic/nsPageContentFrame.cpp @@ -56,6 +56,8 @@ NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsPageContentFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsPageContentFrame) + /* virtual */ nsSize nsPageContentFrame::ComputeSize(nsIRenderingContext *aRenderingContext, nsSize aCBSize, nscoord aAvailableWidth, diff --git a/layout/generic/nsPageContentFrame.h b/layout/generic/nsPageContentFrame.h index f664a3c8a94..744df370d65 100644 --- a/layout/generic/nsPageContentFrame.h +++ b/layout/generic/nsPageContentFrame.h @@ -45,6 +45,8 @@ class nsSharedPageData; class nsPageContentFrame : public ViewportFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); friend class nsPageFrame; diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp index 2889fb19b88..3c4fc025596 100644 --- a/layout/generic/nsPageFrame.cpp +++ b/layout/generic/nsPageFrame.cpp @@ -71,6 +71,8 @@ NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsPageFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsPageFrame) + nsPageFrame::nsPageFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) { @@ -606,6 +608,8 @@ NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsPageBreakFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsPageBreakFrame) + nsPageBreakFrame::nsPageBreakFrame(nsStyleContext* aContext) : nsLeafFrame(aContext), mHaveReflowed(PR_FALSE) { diff --git a/layout/generic/nsPageFrame.h b/layout/generic/nsPageFrame.h index 1742f5c681c..d912083743f 100644 --- a/layout/generic/nsPageFrame.h +++ b/layout/generic/nsPageFrame.h @@ -46,6 +46,8 @@ class nsSharedPageData; class nsPageFrame : public nsContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD Reflow(nsPresContext* aPresContext, @@ -128,7 +130,9 @@ protected: }; -class nsPageBreakFrame : public nsLeafFrame { +class nsPageBreakFrame : public nsLeafFrame +{ + NS_DECL_FRAMEARENA_HELPERS nsPageBreakFrame(nsStyleContext* aContext); ~nsPageBreakFrame(); diff --git a/layout/generic/nsPlaceholderFrame.cpp b/layout/generic/nsPlaceholderFrame.cpp index 260fe3f4d67..4ef7238f3c0 100644 --- a/layout/generic/nsPlaceholderFrame.cpp +++ b/layout/generic/nsPlaceholderFrame.cpp @@ -56,6 +56,8 @@ NS_NewPlaceholderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsPlaceholderFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsPlaceholderFrame) + nsPlaceholderFrame::~nsPlaceholderFrame() { } diff --git a/layout/generic/nsPlaceholderFrame.h b/layout/generic/nsPlaceholderFrame.h index a436cd27cf2..cd751b4c422 100644 --- a/layout/generic/nsPlaceholderFrame.h +++ b/layout/generic/nsPlaceholderFrame.h @@ -85,6 +85,8 @@ nsIFrame* NS_NewPlaceholderFrame(nsIPresShell* aPresShell, nsStyleContext* aCont */ class nsPlaceholderFrame : public nsFrame { public: + NS_DECL_FRAMEARENA_HELPERS + /** * Create a new placeholder frame */ diff --git a/layout/generic/nsQueryFrame.h b/layout/generic/nsQueryFrame.h index e49c66e21fe..9adba67f844 100644 --- a/layout/generic/nsQueryFrame.h +++ b/layout/generic/nsQueryFrame.h @@ -40,23 +40,34 @@ #include "nscore.h" -#define NS_DECLARE_FRAME_ACCESSOR(classname) \ +#define NS_DECL_QUERYFRAME_TARGET(classname) \ static const nsQueryFrame::FrameIID kFrameIID = nsQueryFrame::classname##_id; -#define NS_DECL_QUERYFRAME \ +#define NS_DECL_QUERYFRAME \ virtual void* QueryFrame(FrameIID id); -#define NS_QUERYFRAME_HEAD(class) \ - void* class::QueryFrame(FrameIID id) { +#define NS_QUERYFRAME_HEAD(class) \ + void* class::QueryFrame(FrameIID id) { switch (id) { -#define NS_QUERYFRAME_ENTRY(class) \ - if (class::kFrameIID == id) \ - return static_cast(this); +#define NS_QUERYFRAME_ENTRY(class) \ + case class::kFrameIID: return static_cast(this); -#define NS_QUERYFRAME_TAIL_INHERITING(class) \ - return class::QueryFrame(id); } +#define NS_QUERYFRAME_ENTRY_CONDITIONAL(class, condition) \ + case class::kFrameIID: \ + if (condition) return static_cast(this); \ + break; -#define NS_QUERYFRAME_TAIL return nsnull; } +#define NS_QUERYFRAME_TAIL_INHERITING(class) \ + default: break; \ + } \ + return class::QueryFrame(id); \ +} + +#define NS_QUERYFRAME_TAIL_INHERITANCE_ROOT \ + default: break; \ + } \ + return nsnull; \ +} class nsQueryFrame { @@ -64,7 +75,6 @@ public: enum FrameIID { BRFrame_id, CanvasFrame_id, - nsAreaFrame_id, nsAutoRepeatBoxFrame_id, nsBCTableCellFrame_id, nsBlockFrame_id, @@ -148,6 +158,7 @@ public: nsMathMLmactionFrame_id, nsMathMLmathBlockFrame_id, nsMathMLmathInlineFrame_id, + nsMathMLmencloseFrame_id, nsMathMLmfencedFrame_id, nsMathMLmfracFrame_id, nsMathMLmmultiscriptsFrame_id, @@ -237,6 +248,7 @@ public: nsTreeBodyFrame_id, nsTreeColFrame_id, nsVideoFrame_id, + nsXULLabelFrame_id, nsXULScrollFrame_id, SpacerFrame_id, ViewportFrame_id diff --git a/layout/generic/nsSimplePageSequence.cpp b/layout/generic/nsSimplePageSequence.cpp index 19052481ae5..8fcb5172745 100644 --- a/layout/generic/nsSimplePageSequence.cpp +++ b/layout/generic/nsSimplePageSequence.cpp @@ -110,6 +110,8 @@ NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext return new (aPresShell) nsSimplePageSequenceFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSimplePageSequenceFrame) + nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsStyleContext* aContext) : nsContainerFrame(aContext), mTotalPages(-1), diff --git a/layout/generic/nsSimplePageSequence.h b/layout/generic/nsSimplePageSequence.h index dff725da741..e4748dbcdb3 100644 --- a/layout/generic/nsSimplePageSequence.h +++ b/layout/generic/nsSimplePageSequence.h @@ -85,6 +85,7 @@ public: friend nsIFrame* NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIFrame NS_IMETHOD Reflow(nsPresContext* aPresContext, diff --git a/layout/generic/nsSpacerFrame.cpp b/layout/generic/nsSpacerFrame.cpp index 5cdb3a5ad39..41c660d6abb 100644 --- a/layout/generic/nsSpacerFrame.cpp +++ b/layout/generic/nsSpacerFrame.cpp @@ -50,8 +50,11 @@ #define TYPE_LINE 1 // line-break + vertical space #define TYPE_IMAGE 2 // acts like a sized image with nothing to see -class SpacerFrame : public nsFrame { +class SpacerFrame : public nsFrame +{ public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewSpacerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); // nsIHTMLReflow @@ -82,6 +85,8 @@ NS_NewSpacerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) SpacerFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(SpacerFrame) + SpacerFrame::~SpacerFrame() { } diff --git a/layout/generic/nsSplittableFrame.cpp b/layout/generic/nsSplittableFrame.cpp index e97258a2b6d..c6ec7dbac1c 100644 --- a/layout/generic/nsSplittableFrame.cpp +++ b/layout/generic/nsSplittableFrame.cpp @@ -45,6 +45,8 @@ #include "nsPresContext.h" #include "nsStyleContext.h" +NS_IMPL_FRAMEARENA_HELPERS(nsSplittableFrame) + NS_IMETHODIMP nsSplittableFrame::Init(nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/generic/nsSplittableFrame.h b/layout/generic/nsSplittableFrame.h index 1d229af2186..1647fbd519f 100644 --- a/layout/generic/nsSplittableFrame.h +++ b/layout/generic/nsSplittableFrame.h @@ -49,6 +49,8 @@ class nsSplittableFrame : public nsFrame { public: + NS_DECL_FRAMEARENA_HELPERS + NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow); diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 6179ce51c30..4244f31ccb3 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -70,6 +70,8 @@ class PropertyProvider; class nsTextFrame : public nsFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend class nsContinuingTextFrame; nsTextFrame(nsStyleContext* aContext) : nsFrame(aContext) diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp index 2b8dcd45640..cdffc1735fe 100644 --- a/layout/generic/nsTextFrameThebes.cpp +++ b/layout/generic/nsTextFrameThebes.cpp @@ -3429,6 +3429,8 @@ nsTextFrame::Destroy() class nsContinuingTextFrame : public nsTextFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD Init(nsIContent* aContent, @@ -3682,12 +3684,16 @@ NS_NewTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTextFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTextFrame) + nsIFrame* NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsContinuingTextFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsContinuingTextFrame) + nsTextFrame::~nsTextFrame() { if (0 != (mState & TEXT_BLINK_ON_OR_PRINTING) && PresContext()->IsDynamic()) diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 71de6def1c1..ba98313b337 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -70,6 +70,8 @@ NS_NewHTMLVideoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsVideoFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsVideoFrame) + nsVideoFrame::nsVideoFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) { diff --git a/layout/generic/nsVideoFrame.h b/layout/generic/nsVideoFrame.h index 1476cf20a41..bc93cdf3d3a 100644 --- a/layout/generic/nsVideoFrame.h +++ b/layout/generic/nsVideoFrame.h @@ -58,7 +58,8 @@ public: nsVideoFrame(nsStyleContext* aContext); NS_DECL_QUERYFRAME - + NS_DECL_FRAMEARENA_HELPERS + NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, const nsDisplayListSet& aLists); diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index c6919dfaaf6..830fda71612 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -53,6 +53,8 @@ NS_NewViewportFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) ViewportFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(ViewportFrame) + NS_IMETHODIMP ViewportFrame::Init(nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/generic/nsViewportFrame.h b/layout/generic/nsViewportFrame.h index 5ba08a36541..b822ba4b347 100644 --- a/layout/generic/nsViewportFrame.h +++ b/layout/generic/nsViewportFrame.h @@ -57,6 +57,8 @@ */ class ViewportFrame : public nsContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + typedef nsContainerFrame Super; ViewportFrame(nsStyleContext* aContext) diff --git a/layout/mathml/nsIMathMLFrame.h b/layout/mathml/nsIMathMLFrame.h index 642ad5ffd0c..9beff41acb8 100644 --- a/layout/mathml/nsIMathMLFrame.h +++ b/layout/mathml/nsIMathMLFrame.h @@ -64,7 +64,7 @@ enum eMathMLFrameType { class nsIMathMLFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIMathMLFrame) + NS_DECL_QUERYFRAME_TARGET(nsIMathMLFrame) /* SUPPORT FOR PRECISE POSITIONING */ /*====================================================================*/ diff --git a/layout/mathml/nsMathMLContainerFrame.cpp b/layout/mathml/nsMathMLContainerFrame.cpp index 7c98d14511d..637716c46a6 100644 --- a/layout/mathml/nsMathMLContainerFrame.cpp +++ b/layout/mathml/nsMathMLContainerFrame.cpp @@ -69,6 +69,8 @@ // nsMathMLContainerFrame implementation // +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLContainerFrame) + NS_QUERYFRAME_HEAD(nsMathMLContainerFrame) NS_QUERYFRAME_ENTRY(nsMathMLFrame) NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame) @@ -1464,8 +1466,12 @@ NS_NewMathMLmathBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmathBlockFrame) + nsIFrame* NS_NewMathMLmathInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsMathMLmathInlineFrame(aContext); } + +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmathInlineFrame) diff --git a/layout/mathml/nsMathMLContainerFrame.h b/layout/mathml/nsMathMLContainerFrame.h index 7ef531ba930..fb9f1168131 100644 --- a/layout/mathml/nsMathMLContainerFrame.h +++ b/layout/mathml/nsMathMLContainerFrame.h @@ -72,6 +72,7 @@ public: nsMathMLContainerFrame(nsStyleContext* aContext) : nsHTMLContainerFrame(aContext) {} NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // -------------------------------------------------------------------------- // Overloaded nsMathMLFrame methods -- see documentation in nsIMathMLFrame.h @@ -391,6 +392,8 @@ private: // Issues: If/when mathml becomes a pluggable component, the separation will be needed. class nsMathMLmathBlockFrame : public nsBlockFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmathBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint32 aFlags); @@ -462,6 +465,8 @@ protected: class nsMathMLmathInlineFrame : public nsInlineFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmathInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLForeignFrameWrapper.cpp b/layout/mathml/nsMathMLForeignFrameWrapper.cpp index 171fb5fac53..537766a224b 100644 --- a/layout/mathml/nsMathMLForeignFrameWrapper.cpp +++ b/layout/mathml/nsMathMLForeignFrameWrapper.cpp @@ -64,6 +64,8 @@ NS_NewMathMLForeignFrameWrapper(nsIPresShell* aPresShell, nsStyleContext* aConte return new (aPresShell) nsMathMLForeignFrameWrapper(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLForeignFrameWrapper) + NS_IMETHODIMP nsMathMLForeignFrameWrapper::Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/layout/mathml/nsMathMLForeignFrameWrapper.h b/layout/mathml/nsMathMLForeignFrameWrapper.h index 0d623f1f081..8d0d3ba6a45 100644 --- a/layout/mathml/nsMathMLForeignFrameWrapper.h +++ b/layout/mathml/nsMathMLForeignFrameWrapper.h @@ -53,6 +53,7 @@ public: friend nsIFrame* NS_NewMathMLForeignFrameWrapper(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // Overloaded nsIMathMLFrame methods diff --git a/layout/mathml/nsMathMLTokenFrame.cpp b/layout/mathml/nsMathMLTokenFrame.cpp index 1131623622d..1425ae596b7 100644 --- a/layout/mathml/nsMathMLTokenFrame.cpp +++ b/layout/mathml/nsMathMLTokenFrame.cpp @@ -53,6 +53,9 @@ NS_NewMathMLTokenFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsMathMLTokenFrame(aContext); } + +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLTokenFrame) + nsMathMLTokenFrame::~nsMathMLTokenFrame() { } diff --git a/layout/mathml/nsMathMLTokenFrame.h b/layout/mathml/nsMathMLTokenFrame.h index 3a854737ff6..a2ef8fdae5b 100644 --- a/layout/mathml/nsMathMLTokenFrame.h +++ b/layout/mathml/nsMathMLTokenFrame.h @@ -48,6 +48,8 @@ class nsMathMLTokenFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLTokenFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual eMathMLFrameType GetMathMLFrameType(); diff --git a/layout/mathml/nsMathMLmactionFrame.cpp b/layout/mathml/nsMathMLmactionFrame.cpp index 9bf15c0098d..615303fe27e 100644 --- a/layout/mathml/nsMathMLmactionFrame.cpp +++ b/layout/mathml/nsMathMLmactionFrame.cpp @@ -96,6 +96,8 @@ NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmactionFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmactionFrame) + nsMathMLmactionFrame::~nsMathMLmactionFrame() { // unregister us as a mouse event listener ... diff --git a/layout/mathml/nsMathMLmactionFrame.h b/layout/mathml/nsMathMLmactionFrame.h index aa2cbba6694..73e54705f97 100644 --- a/layout/mathml/nsMathMLmactionFrame.h +++ b/layout/mathml/nsMathMLmactionFrame.h @@ -57,6 +57,8 @@ class nsMathMLmactionFrame : public nsMathMLContainerFrame, public nsIDOMMouseListener { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_DECL_ISUPPORTS_INHERITED diff --git a/layout/mathml/nsMathMLmencloseFrame.cpp b/layout/mathml/nsMathMLmencloseFrame.cpp index 45596b8fa42..82d493cf6e5 100644 --- a/layout/mathml/nsMathMLmencloseFrame.cpp +++ b/layout/mathml/nsMathMLmencloseFrame.cpp @@ -73,6 +73,8 @@ NS_NewMathMLmencloseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmencloseFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmencloseFrame) + nsMathMLmencloseFrame::nsMathMLmencloseFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext), mNotationsToDraw(0), mLongDivCharIndex(-1), mRadicalCharIndex(-1), mContentWidth(0) diff --git a/layout/mathml/nsMathMLmencloseFrame.h b/layout/mathml/nsMathMLmencloseFrame.h index e4cba9be9b9..c651706f9af 100644 --- a/layout/mathml/nsMathMLmencloseFrame.h +++ b/layout/mathml/nsMathMLmencloseFrame.h @@ -80,6 +80,8 @@ enum nsMencloseNotation class nsMathMLmencloseFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmencloseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/mathml/nsMathMLmfencedFrame.cpp b/layout/mathml/nsMathMLmfencedFrame.cpp index faea11a3cb7..33865a0fb22 100644 --- a/layout/mathml/nsMathMLmfencedFrame.cpp +++ b/layout/mathml/nsMathMLmfencedFrame.cpp @@ -59,6 +59,8 @@ NS_NewMathMLmfencedFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmfencedFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmfencedFrame) + nsMathMLmfencedFrame::~nsMathMLmfencedFrame() { RemoveFencesAndSeparators(); diff --git a/layout/mathml/nsMathMLmfencedFrame.h b/layout/mathml/nsMathMLmfencedFrame.h index 6d5e8c699e9..c9c786b3e4f 100644 --- a/layout/mathml/nsMathMLmfencedFrame.h +++ b/layout/mathml/nsMathMLmfencedFrame.h @@ -49,6 +49,8 @@ class nsMathMLmfencedFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmfencedFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual void diff --git a/layout/mathml/nsMathMLmfracFrame.cpp b/layout/mathml/nsMathMLmfracFrame.cpp index fc421ae1bdc..5a17db5500e 100644 --- a/layout/mathml/nsMathMLmfracFrame.cpp +++ b/layout/mathml/nsMathMLmfracFrame.cpp @@ -76,6 +76,8 @@ NS_NewMathMLmfracFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmfracFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmfracFrame) + nsMathMLmfracFrame::~nsMathMLmfracFrame() { if (mSlashChar) { diff --git a/layout/mathml/nsMathMLmfracFrame.h b/layout/mathml/nsMathMLmfracFrame.h index e189b651abe..d245f2fe5be 100644 --- a/layout/mathml/nsMathMLmfracFrame.h +++ b/layout/mathml/nsMathMLmfracFrame.h @@ -86,6 +86,8 @@ element. class nsMathMLmfracFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmfracFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual void diff --git a/layout/mathml/nsMathMLmmultiscriptsFrame.cpp b/layout/mathml/nsMathMLmmultiscriptsFrame.cpp index 37946a654c9..baddb4ff628 100644 --- a/layout/mathml/nsMathMLmmultiscriptsFrame.cpp +++ b/layout/mathml/nsMathMLmmultiscriptsFrame.cpp @@ -59,6 +59,8 @@ NS_NewMathMLmmultiscriptsFrame(nsIPresShell* aPresShell, nsStyleContext* aContex return new (aPresShell) nsMathMLmmultiscriptsFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmmultiscriptsFrame) + nsMathMLmmultiscriptsFrame::~nsMathMLmmultiscriptsFrame() { } diff --git a/layout/mathml/nsMathMLmmultiscriptsFrame.h b/layout/mathml/nsMathMLmmultiscriptsFrame.h index 5ec865c5454..e91c1cf0183 100644 --- a/layout/mathml/nsMathMLmmultiscriptsFrame.h +++ b/layout/mathml/nsMathMLmmultiscriptsFrame.h @@ -50,6 +50,8 @@ class nsMathMLmmultiscriptsFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmmultiscriptsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmoFrame.cpp b/layout/mathml/nsMathMLmoFrame.cpp index e274c9beb53..1b22cf109b1 100644 --- a/layout/mathml/nsMathMLmoFrame.cpp +++ b/layout/mathml/nsMathMLmoFrame.cpp @@ -65,6 +65,8 @@ NS_NewMathMLmoFrame(nsIPresShell* aPresShell, nsStyleContext *aContext) return new (aPresShell) nsMathMLmoFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmoFrame) + nsMathMLmoFrame::~nsMathMLmoFrame() { } diff --git a/layout/mathml/nsMathMLmoFrame.h b/layout/mathml/nsMathMLmoFrame.h index 48980d48343..590e7f13762 100644 --- a/layout/mathml/nsMathMLmoFrame.h +++ b/layout/mathml/nsMathMLmoFrame.h @@ -50,6 +50,8 @@ class nsMathMLmoFrame : public nsMathMLTokenFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual eMathMLFrameType GetMathMLFrameType(); diff --git a/layout/mathml/nsMathMLmoverFrame.cpp b/layout/mathml/nsMathMLmoverFrame.cpp index 6dcff9fdc94..c411251e1af 100644 --- a/layout/mathml/nsMathMLmoverFrame.cpp +++ b/layout/mathml/nsMathMLmoverFrame.cpp @@ -62,6 +62,8 @@ NS_NewMathMLmoverFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmoverFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmoverFrame) + nsMathMLmoverFrame::~nsMathMLmoverFrame() { } diff --git a/layout/mathml/nsMathMLmoverFrame.h b/layout/mathml/nsMathMLmoverFrame.h index 2eb8d44e672..f6bdba150e0 100644 --- a/layout/mathml/nsMathMLmoverFrame.h +++ b/layout/mathml/nsMathMLmoverFrame.h @@ -50,6 +50,8 @@ class nsMathMLmoverFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmoverFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual nsresult diff --git a/layout/mathml/nsMathMLmpaddedFrame.cpp b/layout/mathml/nsMathMLmpaddedFrame.cpp index f8c33b52b21..1238ba4dac1 100644 --- a/layout/mathml/nsMathMLmpaddedFrame.cpp +++ b/layout/mathml/nsMathMLmpaddedFrame.cpp @@ -73,6 +73,8 @@ NS_NewMathMLmpaddedFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmpaddedFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmpaddedFrame) + nsMathMLmpaddedFrame::~nsMathMLmpaddedFrame() { } diff --git a/layout/mathml/nsMathMLmpaddedFrame.h b/layout/mathml/nsMathMLmpaddedFrame.h index c08f66ff6fe..f13a871d4fe 100644 --- a/layout/mathml/nsMathMLmpaddedFrame.h +++ b/layout/mathml/nsMathMLmpaddedFrame.h @@ -50,6 +50,8 @@ class nsMathMLmpaddedFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmpaddedFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmphantomFrame.cpp b/layout/mathml/nsMathMLmphantomFrame.cpp index e761b82b9e4..2e81455cf97 100644 --- a/layout/mathml/nsMathMLmphantomFrame.cpp +++ b/layout/mathml/nsMathMLmphantomFrame.cpp @@ -57,6 +57,8 @@ NS_NewMathMLmphantomFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmphantomFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmphantomFrame) + nsMathMLmphantomFrame::~nsMathMLmphantomFrame() { } diff --git a/layout/mathml/nsMathMLmphantomFrame.h b/layout/mathml/nsMathMLmphantomFrame.h index dc4014933e1..044d6f4e74e 100644 --- a/layout/mathml/nsMathMLmphantomFrame.h +++ b/layout/mathml/nsMathMLmphantomFrame.h @@ -49,6 +49,8 @@ class nsMathMLmphantomFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmphantomFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmrootFrame.cpp b/layout/mathml/nsMathMLmrootFrame.cpp index 42881df08bc..27f82bf25a5 100644 --- a/layout/mathml/nsMathMLmrootFrame.cpp +++ b/layout/mathml/nsMathMLmrootFrame.cpp @@ -74,6 +74,8 @@ NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmrootFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmrootFrame) + nsMathMLmrootFrame::nsMathMLmrootFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext), mSqrChar(), diff --git a/layout/mathml/nsMathMLmrootFrame.h b/layout/mathml/nsMathMLmrootFrame.h index 17299ccc7a4..eb9785f3cb6 100644 --- a/layout/mathml/nsMathMLmrootFrame.h +++ b/layout/mathml/nsMathMLmrootFrame.h @@ -50,6 +50,8 @@ class nsMathMLmrootFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual void diff --git a/layout/mathml/nsMathMLmrowFrame.cpp b/layout/mathml/nsMathMLmrowFrame.cpp index 3b04ecc27d7..d3300fe8718 100644 --- a/layout/mathml/nsMathMLmrowFrame.cpp +++ b/layout/mathml/nsMathMLmrowFrame.cpp @@ -58,6 +58,8 @@ NS_NewMathMLmrowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmrowFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmrowFrame) + nsMathMLmrowFrame::~nsMathMLmrowFrame() { } diff --git a/layout/mathml/nsMathMLmrowFrame.h b/layout/mathml/nsMathMLmrowFrame.h index 4b8f1bdd31e..a31d6dc5e47 100644 --- a/layout/mathml/nsMathMLmrowFrame.h +++ b/layout/mathml/nsMathMLmrowFrame.h @@ -49,6 +49,8 @@ class nsMathMLmrowFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmrowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmspaceFrame.cpp b/layout/mathml/nsMathMLmspaceFrame.cpp index c728e403882..e1a9b2f6bfa 100644 --- a/layout/mathml/nsMathMLmspaceFrame.cpp +++ b/layout/mathml/nsMathMLmspaceFrame.cpp @@ -58,6 +58,8 @@ NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmspaceFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmspaceFrame) + nsMathMLmspaceFrame::~nsMathMLmspaceFrame() { } diff --git a/layout/mathml/nsMathMLmspaceFrame.h b/layout/mathml/nsMathMLmspaceFrame.h index 967a649530f..c781c865be0 100644 --- a/layout/mathml/nsMathMLmspaceFrame.h +++ b/layout/mathml/nsMathMLmspaceFrame.h @@ -48,6 +48,8 @@ class nsMathMLmspaceFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual PRBool IsLeaf() const; diff --git a/layout/mathml/nsMathMLmsqrtFrame.cpp b/layout/mathml/nsMathMLmsqrtFrame.cpp index 170a00e99cc..9eb11c52b68 100644 --- a/layout/mathml/nsMathMLmsqrtFrame.cpp +++ b/layout/mathml/nsMathMLmsqrtFrame.cpp @@ -61,6 +61,8 @@ NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmsqrtFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsqrtFrame) + nsMathMLmsqrtFrame::nsMathMLmsqrtFrame(nsStyleContext* aContext) : nsMathMLmencloseFrame(aContext) { diff --git a/layout/mathml/nsMathMLmsqrtFrame.h b/layout/mathml/nsMathMLmsqrtFrame.h index 0623e6c68b3..939888249ba 100644 --- a/layout/mathml/nsMathMLmsqrtFrame.h +++ b/layout/mathml/nsMathMLmsqrtFrame.h @@ -69,6 +69,8 @@ but can be set explicitly only on . (See Section 3.3.4.) class nsMathMLmsqrtFrame : public nsMathMLmencloseFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/mathml/nsMathMLmstyleFrame.cpp b/layout/mathml/nsMathMLmstyleFrame.cpp index 3d2619b1067..51622aedeba 100644 --- a/layout/mathml/nsMathMLmstyleFrame.cpp +++ b/layout/mathml/nsMathMLmstyleFrame.cpp @@ -59,6 +59,8 @@ NS_NewMathMLmstyleFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmstyleFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmstyleFrame) + nsMathMLmstyleFrame::~nsMathMLmstyleFrame() { } diff --git a/layout/mathml/nsMathMLmstyleFrame.h b/layout/mathml/nsMathMLmstyleFrame.h index 0bc9e2cd8d7..9acdb45d6fb 100644 --- a/layout/mathml/nsMathMLmstyleFrame.h +++ b/layout/mathml/nsMathMLmstyleFrame.h @@ -49,6 +49,8 @@ class nsMathMLmstyleFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmstyleFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmsubFrame.cpp b/layout/mathml/nsMathMLmsubFrame.cpp index be185061566..11bdc4ca51e 100644 --- a/layout/mathml/nsMathMLmsubFrame.cpp +++ b/layout/mathml/nsMathMLmsubFrame.cpp @@ -59,6 +59,8 @@ NS_NewMathMLmsubFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmsubFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsubFrame) + nsMathMLmsubFrame::~nsMathMLmsubFrame() { } diff --git a/layout/mathml/nsMathMLmsubFrame.h b/layout/mathml/nsMathMLmsubFrame.h index af3159e2435..79ec1b34472 100644 --- a/layout/mathml/nsMathMLmsubFrame.h +++ b/layout/mathml/nsMathMLmsubFrame.h @@ -50,6 +50,8 @@ class nsMathMLmsubFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmsubFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmsubsupFrame.cpp b/layout/mathml/nsMathMLmsubsupFrame.cpp index a18e7dde002..a54e8f96fd3 100644 --- a/layout/mathml/nsMathMLmsubsupFrame.cpp +++ b/layout/mathml/nsMathMLmsubsupFrame.cpp @@ -59,6 +59,8 @@ NS_NewMathMLmsubsupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmsubsupFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsubsupFrame) + nsMathMLmsubsupFrame::~nsMathMLmsubsupFrame() { } diff --git a/layout/mathml/nsMathMLmsubsupFrame.h b/layout/mathml/nsMathMLmsubsupFrame.h index 37c20ce0837..b0b68b7555d 100644 --- a/layout/mathml/nsMathMLmsubsupFrame.h +++ b/layout/mathml/nsMathMLmsubsupFrame.h @@ -50,6 +50,8 @@ class nsMathMLmsubsupFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmsubsupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmsupFrame.cpp b/layout/mathml/nsMathMLmsupFrame.cpp index ef4657c62c6..7f6f934a30e 100644 --- a/layout/mathml/nsMathMLmsupFrame.cpp +++ b/layout/mathml/nsMathMLmsupFrame.cpp @@ -58,6 +58,8 @@ NS_NewMathMLmsupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmsupFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsupFrame) + nsMathMLmsupFrame::~nsMathMLmsupFrame() { } diff --git a/layout/mathml/nsMathMLmsupFrame.h b/layout/mathml/nsMathMLmsupFrame.h index d209904acdc..1d954d8caca 100644 --- a/layout/mathml/nsMathMLmsupFrame.h +++ b/layout/mathml/nsMathMLmsupFrame.h @@ -50,6 +50,8 @@ class nsMathMLmsupFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmsupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD diff --git a/layout/mathml/nsMathMLmtableFrame.cpp b/layout/mathml/nsMathMLmtableFrame.cpp index ed101fa5df6..544a80ad85e 100644 --- a/layout/mathml/nsMathMLmtableFrame.cpp +++ b/layout/mathml/nsMathMLmtableFrame.cpp @@ -357,6 +357,8 @@ NS_NewMathMLmtableOuterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext return new (aPresShell) nsMathMLmtableOuterFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtableOuterFrame) + nsMathMLmtableOuterFrame::~nsMathMLmtableOuterFrame() { } @@ -651,6 +653,8 @@ NS_NewMathMLmtableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmtableFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtableFrame) + nsMathMLmtableFrame::~nsMathMLmtableFrame() { } @@ -685,6 +689,8 @@ NS_NewMathMLmtrFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmtrFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtrFrame) + nsMathMLmtrFrame::~nsMathMLmtrFrame() { } @@ -742,6 +748,8 @@ NS_NewMathMLmtdFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmtdFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtdFrame) + nsMathMLmtdFrame::~nsMathMLmtdFrame() { } @@ -828,6 +836,8 @@ NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmtdInnerFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtdInnerFrame) + nsMathMLmtdInnerFrame::~nsMathMLmtdInnerFrame() { } diff --git a/layout/mathml/nsMathMLmtableFrame.h b/layout/mathml/nsMathMLmtableFrame.h index abc9fef0290..06b0ba39d10 100644 --- a/layout/mathml/nsMathMLmtableFrame.h +++ b/layout/mathml/nsMathMLmtableFrame.h @@ -53,6 +53,7 @@ public: friend nsIFrame* NS_NewMathMLmtableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // Overloaded nsIMathMLFrame methods @@ -104,6 +105,8 @@ protected: class nsMathMLmtableFrame : public nsTableFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmtableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); // Overloaded nsTableFrame methods @@ -160,6 +163,8 @@ protected: class nsMathMLmtrFrame : public nsTableRowFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmtrFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); // overloaded nsTableRowFrame methods @@ -222,6 +227,8 @@ protected: class nsMathMLmtdFrame : public nsTableCellFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmtdFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); // overloaded nsTableCellFrame methods @@ -251,6 +258,7 @@ public: friend nsIFrame* NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // Overloaded nsIMathMLFrame methods diff --git a/layout/mathml/nsMathMLmunderFrame.cpp b/layout/mathml/nsMathMLmunderFrame.cpp index da75218026b..af40b6d89da 100644 --- a/layout/mathml/nsMathMLmunderFrame.cpp +++ b/layout/mathml/nsMathMLmunderFrame.cpp @@ -62,6 +62,8 @@ NS_NewMathMLmunderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmunderFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmunderFrame) + nsMathMLmunderFrame::~nsMathMLmunderFrame() { } diff --git a/layout/mathml/nsMathMLmunderFrame.h b/layout/mathml/nsMathMLmunderFrame.h index 991f11f5204..f73e4d8f2e9 100644 --- a/layout/mathml/nsMathMLmunderFrame.h +++ b/layout/mathml/nsMathMLmunderFrame.h @@ -50,6 +50,8 @@ class nsMathMLmunderFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmunderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual nsresult diff --git a/layout/mathml/nsMathMLmunderoverFrame.cpp b/layout/mathml/nsMathMLmunderoverFrame.cpp index 98bedeed65c..792f163bebd 100644 --- a/layout/mathml/nsMathMLmunderoverFrame.cpp +++ b/layout/mathml/nsMathMLmunderoverFrame.cpp @@ -62,6 +62,8 @@ NS_NewMathMLmunderoverFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMathMLmunderoverFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmunderoverFrame) + nsMathMLmunderoverFrame::~nsMathMLmunderoverFrame() { } diff --git a/layout/mathml/nsMathMLmunderoverFrame.h b/layout/mathml/nsMathMLmunderoverFrame.h index 39477dcf90d..63591d9358f 100644 --- a/layout/mathml/nsMathMLmunderoverFrame.h +++ b/layout/mathml/nsMathMLmunderoverFrame.h @@ -50,6 +50,8 @@ class nsMathMLmunderoverFrame : public nsMathMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewMathMLmunderoverFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual nsresult diff --git a/layout/style/nsICSSPseudoComparator.h b/layout/style/nsICSSPseudoComparator.h index ac8d5e38e10..af10aecc3d8 100644 --- a/layout/style/nsICSSPseudoComparator.h +++ b/layout/style/nsICSSPseudoComparator.h @@ -48,7 +48,7 @@ struct nsCSSSelector; class nsICSSPseudoComparator { public: - NS_DECLARE_FRAME_ACCESSOR(nsICSSPseudoComparator) + NS_DECL_QUERYFRAME_TARGET(nsICSSPseudoComparator) NS_IMETHOD PseudoMatches(nsIAtom* aTag, nsCSSSelector* aSelector, PRBool* aResult)=0; }; diff --git a/layout/svg/base/src/nsISVGChildFrame.h b/layout/svg/base/src/nsISVGChildFrame.h index c227187068e..1c202e5b511 100644 --- a/layout/svg/base/src/nsISVGChildFrame.h +++ b/layout/svg/base/src/nsISVGChildFrame.h @@ -53,7 +53,7 @@ class nsSVGRenderState; class nsISVGChildFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsISVGChildFrame) + NS_DECL_QUERYFRAME_TARGET(nsISVGChildFrame) // Paint this frame - aDirtyRect is the area being redrawn, in frame // offset pixel coordinates diff --git a/layout/svg/base/src/nsISVGGlyphFragmentLeaf.h b/layout/svg/base/src/nsISVGGlyphFragmentLeaf.h index 2d80de356d4..39037cb5e3d 100644 --- a/layout/svg/base/src/nsISVGGlyphFragmentLeaf.h +++ b/layout/svg/base/src/nsISVGGlyphFragmentLeaf.h @@ -49,7 +49,7 @@ class nsSVGTextPathFrame; class nsISVGGlyphFragmentLeaf : public nsISVGGlyphFragmentNode { public: - NS_DECLARE_FRAME_ACCESSOR(nsISVGGlyphFragmentLeaf) + NS_DECL_QUERYFRAME_TARGET(nsISVGGlyphFragmentLeaf) NS_IMETHOD GetStartPositionOfChar(PRUint32 charnum, nsIDOMSVGPoint **_retval)=0; NS_IMETHOD GetEndPositionOfChar(PRUint32 charnum, nsIDOMSVGPoint **_retval)=0; diff --git a/layout/svg/base/src/nsISVGGlyphFragmentNode.h b/layout/svg/base/src/nsISVGGlyphFragmentNode.h index 7131f3b641a..9aaba459e0b 100644 --- a/layout/svg/base/src/nsISVGGlyphFragmentNode.h +++ b/layout/svg/base/src/nsISVGGlyphFragmentNode.h @@ -53,7 +53,7 @@ class nsIDOMSVGPoint; class nsISVGGlyphFragmentNode : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsISVGGlyphFragmentNode) + NS_DECL_QUERYFRAME_TARGET(nsISVGGlyphFragmentNode) virtual PRUint32 GetNumberOfChars()=0; virtual float GetComputedTextLength()=0; diff --git a/layout/svg/base/src/nsISVGSVGFrame.h b/layout/svg/base/src/nsISVGSVGFrame.h index 8e1b5b0e485..e27e5824e2f 100644 --- a/layout/svg/base/src/nsISVGSVGFrame.h +++ b/layout/svg/base/src/nsISVGSVGFrame.h @@ -44,7 +44,7 @@ class nsISVGSVGFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsISVGSVGFrame) + NS_DECL_QUERYFRAME_TARGET(nsISVGSVGFrame) NS_IMETHOD SuspendRedraw()=0; NS_IMETHOD UnsuspendRedraw()=0; diff --git a/layout/svg/base/src/nsSVGAFrame.cpp b/layout/svg/base/src/nsSVGAFrame.cpp index 096545181af..40a19bb5d07 100644 --- a/layout/svg/base/src/nsSVGAFrame.cpp +++ b/layout/svg/base/src/nsSVGAFrame.cpp @@ -60,6 +60,8 @@ protected: nsSVGAFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, @@ -103,6 +105,8 @@ NS_NewSVGAFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGAFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGAFrame) + //---------------------------------------------------------------------- // nsIFrame methods #ifdef DEBUG diff --git a/layout/svg/base/src/nsSVGClipPathFrame.cpp b/layout/svg/base/src/nsSVGClipPathFrame.cpp index 7897881d996..c74499802ac 100644 --- a/layout/svg/base/src/nsSVGClipPathFrame.cpp +++ b/layout/svg/base/src/nsSVGClipPathFrame.cpp @@ -53,6 +53,8 @@ NS_NewSVGClipPathFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGClipPathFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGClipPathFrame) + nsresult nsSVGClipPathFrame::ClipPaint(nsSVGRenderState* aContext, nsIFrame* aParent, diff --git a/layout/svg/base/src/nsSVGClipPathFrame.h b/layout/svg/base/src/nsSVGClipPathFrame.h index 83365180649..cec50c547e8 100644 --- a/layout/svg/base/src/nsSVGClipPathFrame.h +++ b/layout/svg/base/src/nsSVGClipPathFrame.h @@ -53,6 +53,8 @@ protected: mInUse(PR_FALSE) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsSVGClipPathFrame methods: nsresult ClipPaint(nsSVGRenderState* aContext, nsIFrame* aParent, diff --git a/layout/svg/base/src/nsSVGContainerFrame.cpp b/layout/svg/base/src/nsSVGContainerFrame.cpp index 2cecdafa38f..7761279a880 100644 --- a/layout/svg/base/src/nsSVGContainerFrame.cpp +++ b/layout/svg/base/src/nsSVGContainerFrame.cpp @@ -54,6 +54,9 @@ NS_NewSVGContainerFrame(nsIPresShell* aPresShell, return new (aPresShell) nsSVGContainerFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGContainerFrame) +NS_IMPL_FRAMEARENA_HELPERS(nsSVGDisplayContainerFrame) + NS_IMETHODIMP nsSVGContainerFrame::AppendFrames(nsIAtom* aListName, nsFrameList& aFrameList) diff --git a/layout/svg/base/src/nsSVGContainerFrame.h b/layout/svg/base/src/nsSVGContainerFrame.h index d98c217b45b..18dc1a56b8c 100644 --- a/layout/svg/base/src/nsSVGContainerFrame.h +++ b/layout/svg/base/src/nsSVGContainerFrame.h @@ -54,9 +54,9 @@ protected: nsSVGContainerFrameBase(aContext) {} public: - NS_DECLARE_FRAME_ACCESSOR(nsSVGContainerFrame) - + NS_DECL_QUERYFRAME_TARGET(nsSVGContainerFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // Returns the transform to our gfxContext (to device pixels, not CSS px) virtual gfxMatrix GetCanvasTM() { return gfxMatrix(); } @@ -88,9 +88,9 @@ protected: nsSVGContainerFrame(aContext) {} public: - NS_DECLARE_FRAME_ACCESSOR(nsSVGDisplayContainerFrame) - + NS_DECL_QUERYFRAME_TARGET(nsSVGDisplayContainerFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIFrame: NS_IMETHOD InsertFrames(nsIAtom* aListName, diff --git a/layout/svg/base/src/nsSVGFilterFrame.cpp b/layout/svg/base/src/nsSVGFilterFrame.cpp index b480b78b972..02ceae12ff7 100644 --- a/layout/svg/base/src/nsSVGFilterFrame.cpp +++ b/layout/svg/base/src/nsSVGFilterFrame.cpp @@ -54,6 +54,8 @@ NS_NewSVGFilterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGFilterFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGFilterFrame) + static nsIntRect MapDeviceRectToFilterSpace(const gfxMatrix& aMatrix, const gfxIntSize& aFilterSize, diff --git a/layout/svg/base/src/nsSVGFilterFrame.h b/layout/svg/base/src/nsSVGFilterFrame.h index 0355ad6bedd..2dcf9300804 100644 --- a/layout/svg/base/src/nsSVGFilterFrame.h +++ b/layout/svg/base/src/nsSVGFilterFrame.h @@ -52,6 +52,8 @@ protected: nsSVGFilterFrame(nsStyleContext* aContext) : nsSVGFilterFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + nsresult FilterPaint(nsSVGRenderState *aContext, nsIFrame *aTarget, nsSVGFilterPaintCallback *aPaintCallback, const nsIntRect* aDirtyRect); diff --git a/layout/svg/base/src/nsSVGForeignObjectFrame.cpp b/layout/svg/base/src/nsSVGForeignObjectFrame.cpp index 063d9caa15d..655a63c3b62 100644 --- a/layout/svg/base/src/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/base/src/nsSVGForeignObjectFrame.cpp @@ -64,6 +64,8 @@ NS_NewSVGForeignObjectFrame(nsIPresShell *aPresShell, return new (aPresShell) nsSVGForeignObjectFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGForeignObjectFrame) + nsSVGForeignObjectFrame::nsSVGForeignObjectFrame(nsStyleContext* aContext) : nsSVGForeignObjectFrameBase(aContext), mInReflow(PR_FALSE) diff --git a/layout/svg/base/src/nsSVGForeignObjectFrame.h b/layout/svg/base/src/nsSVGForeignObjectFrame.h index 288ff8e38aa..b7054bfb0c9 100644 --- a/layout/svg/base/src/nsSVGForeignObjectFrame.h +++ b/layout/svg/base/src/nsSVGForeignObjectFrame.h @@ -58,11 +58,12 @@ class nsSVGForeignObjectFrame : public nsSVGForeignObjectFrameBase, NS_NewSVGForeignObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: nsSVGForeignObjectFrame(nsStyleContext* aContext); - + public: NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS - // nsIFrame: + // nsIFrame: NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow); diff --git a/layout/svg/base/src/nsSVGGFrame.cpp b/layout/svg/base/src/nsSVGGFrame.cpp index cdf56837bd2..867f0ad11da 100644 --- a/layout/svg/base/src/nsSVGGFrame.cpp +++ b/layout/svg/base/src/nsSVGGFrame.cpp @@ -53,6 +53,8 @@ NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGGFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGGFrame) + #ifdef DEBUG NS_IMETHODIMP nsSVGGFrame::Init(nsIContent* aContent, diff --git a/layout/svg/base/src/nsSVGGFrame.h b/layout/svg/base/src/nsSVGGFrame.h index d3434240c37..58f65144097 100644 --- a/layout/svg/base/src/nsSVGGFrame.h +++ b/layout/svg/base/src/nsSVGGFrame.h @@ -53,6 +53,8 @@ protected: nsSVGGFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/svg/base/src/nsSVGGenericContainerFrame.cpp b/layout/svg/base/src/nsSVGGenericContainerFrame.cpp index 7dc8995d052..7de96baeb7d 100644 --- a/layout/svg/base/src/nsSVGGenericContainerFrame.cpp +++ b/layout/svg/base/src/nsSVGGenericContainerFrame.cpp @@ -48,6 +48,8 @@ NS_NewSVGGenericContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContex return new (aPresShell) nsSVGGenericContainerFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGGenericContainerFrame) + //---------------------------------------------------------------------- // nsIFrame methods diff --git a/layout/svg/base/src/nsSVGGenericContainerFrame.h b/layout/svg/base/src/nsSVGGenericContainerFrame.h index 9d21ef9d7f5..210922882cd 100644 --- a/layout/svg/base/src/nsSVGGenericContainerFrame.h +++ b/layout/svg/base/src/nsSVGGenericContainerFrame.h @@ -55,6 +55,8 @@ protected: nsSVGGenericContainerFrame(nsStyleContext* aContext) : nsSVGGenericContainerFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame: NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID, nsIAtom* aAttribute, diff --git a/layout/svg/base/src/nsSVGGeometryFrame.cpp b/layout/svg/base/src/nsSVGGeometryFrame.cpp index dc4b377aec7..33de25c614e 100644 --- a/layout/svg/base/src/nsSVGGeometryFrame.cpp +++ b/layout/svg/base/src/nsSVGGeometryFrame.cpp @@ -42,6 +42,8 @@ #include "gfxContext.h" #include "nsSVGEffects.h" +NS_IMPL_FRAMEARENA_HELPERS(nsSVGGeometryFrame) + //---------------------------------------------------------------------- // nsIFrame methods diff --git a/layout/svg/base/src/nsSVGGeometryFrame.h b/layout/svg/base/src/nsSVGGeometryFrame.h index e1ad19ea783..60fb7591a5b 100644 --- a/layout/svg/base/src/nsSVGGeometryFrame.h +++ b/layout/svg/base/src/nsSVGGeometryFrame.h @@ -54,6 +54,8 @@ typedef nsFrame nsSVGGeometryFrameBase; class nsSVGGeometryFrame : public nsSVGGeometryFrameBase { protected: + NS_DECL_FRAMEARENA_HELPERS + nsSVGGeometryFrame(nsStyleContext *aContext) : nsSVGGeometryFrameBase(aContext) {} public: diff --git a/layout/svg/base/src/nsSVGGlyphFrame.cpp b/layout/svg/base/src/nsSVGGlyphFrame.cpp index 1583e8c043d..a6e414cb024 100644 --- a/layout/svg/base/src/nsSVGGlyphFrame.cpp +++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp @@ -190,6 +190,8 @@ NS_NewSVGGlyphFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGGlyphFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGGlyphFrame) + //---------------------------------------------------------------------- // nsQueryFrame methods diff --git a/layout/svg/base/src/nsSVGGlyphFrame.h b/layout/svg/base/src/nsSVGGlyphFrame.h index 0cee4802e7f..27d37e7874b 100644 --- a/layout/svg/base/src/nsSVGGlyphFrame.h +++ b/layout/svg/base/src/nsSVGGlyphFrame.h @@ -74,6 +74,7 @@ protected: public: NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIFrame interface: NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo); diff --git a/layout/svg/base/src/nsSVGGradientFrame.cpp b/layout/svg/base/src/nsSVGGradientFrame.cpp index 8c2914994b2..a8520d227b3 100644 --- a/layout/svg/base/src/nsSVGGradientFrame.cpp +++ b/layout/svg/base/src/nsSVGGradientFrame.cpp @@ -59,6 +59,8 @@ nsSVGGradientFrame::nsSVGGradientFrame(nsStyleContext* aContext) : { } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGGradientFrame) + //---------------------------------------------------------------------- // nsIFrame methods: @@ -616,9 +618,13 @@ NS_NewSVGLinearGradientFrame(nsIPresShell* aPresShell, return new (aPresShell) nsSVGLinearGradientFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGLinearGradientFrame) + nsIFrame* NS_NewSVGRadialGradientFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsSVGRadialGradientFrame(aContext); } + +NS_IMPL_FRAMEARENA_HELPERS(nsSVGRadialGradientFrame) diff --git a/layout/svg/base/src/nsSVGGradientFrame.h b/layout/svg/base/src/nsSVGGradientFrame.h index 0295d14c785..bc5da7e736a 100644 --- a/layout/svg/base/src/nsSVGGradientFrame.h +++ b/layout/svg/base/src/nsSVGGradientFrame.h @@ -58,6 +58,8 @@ protected: nsSVGGradientFrame(nsStyleContext* aContext); public: + NS_DECL_FRAMEARENA_HELPERS + // nsSVGPaintServerFrame methods: virtual PRBool SetupPaintServer(gfxContext *aContext, nsSVGGeometryFrame *aSource, @@ -153,6 +155,8 @@ protected: nsSVGLinearGradientFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame interface: #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, @@ -193,6 +197,8 @@ protected: nsSVGRadialGradientFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame interface: #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, diff --git a/layout/svg/base/src/nsSVGImageFrame.cpp b/layout/svg/base/src/nsSVGImageFrame.cpp index d9b146d0b8f..fad1bc66568 100644 --- a/layout/svg/base/src/nsSVGImageFrame.cpp +++ b/layout/svg/base/src/nsSVGImageFrame.cpp @@ -80,6 +80,8 @@ protected: virtual ~nsSVGImageFrame(); public: + NS_DECL_FRAMEARENA_HELPERS + // nsISVGChildFrame interface: NS_IMETHOD PaintSVG(nsSVGRenderState *aContext, const nsIntRect *aDirtyRect); NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint); @@ -129,6 +131,8 @@ NS_NewSVGImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGImageFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGImageFrame) + nsSVGImageFrame::~nsSVGImageFrame() { // set the frame to null so we don't send messages to a dead object. diff --git a/layout/svg/base/src/nsSVGInnerSVGFrame.cpp b/layout/svg/base/src/nsSVGInnerSVGFrame.cpp index 62aaedb8d9f..4cf9aae1cc9 100644 --- a/layout/svg/base/src/nsSVGInnerSVGFrame.cpp +++ b/layout/svg/base/src/nsSVGInnerSVGFrame.cpp @@ -52,6 +52,8 @@ NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGInnerSVGFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGInnerSVGFrame) + //---------------------------------------------------------------------- // nsIFrame methods diff --git a/layout/svg/base/src/nsSVGInnerSVGFrame.h b/layout/svg/base/src/nsSVGInnerSVGFrame.h index 0caca26d1ee..bbf64a284bf 100644 --- a/layout/svg/base/src/nsSVGInnerSVGFrame.h +++ b/layout/svg/base/src/nsSVGInnerSVGFrame.h @@ -52,9 +52,9 @@ protected: nsSVGInnerSVGFrameBase(aContext) {} public: - NS_DECLARE_FRAME_ACCESSOR(nsSVGInnerSVGFrame) - + NS_DECL_QUERYFRAME_TARGET(nsSVGInnerSVGFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // We don't define an AttributeChanged method since changes to the // 'x', 'y', 'width' and 'height' attributes of our content object diff --git a/layout/svg/base/src/nsSVGLeafFrame.cpp b/layout/svg/base/src/nsSVGLeafFrame.cpp index eecdaa81de4..16c75972a58 100644 --- a/layout/svg/base/src/nsSVGLeafFrame.cpp +++ b/layout/svg/base/src/nsSVGLeafFrame.cpp @@ -45,6 +45,8 @@ protected: nsSVGLeafFrame(nsStyleContext* aContext) : nsFrame(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + virtual PRBool IsFrameOfType(PRUint32 aFlags) const { return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG)); @@ -66,6 +68,8 @@ NS_NewSVGLeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGLeafFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGLeafFrame) + /* virtual */ void nsSVGLeafFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) { diff --git a/layout/svg/base/src/nsSVGMarkerFrame.cpp b/layout/svg/base/src/nsSVGMarkerFrame.cpp index c468b616ebc..cc3457e1ef5 100644 --- a/layout/svg/base/src/nsSVGMarkerFrame.cpp +++ b/layout/svg/base/src/nsSVGMarkerFrame.cpp @@ -50,6 +50,8 @@ NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGMarkerFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGMarkerFrame) + //---------------------------------------------------------------------- // nsIFrame methods: diff --git a/layout/svg/base/src/nsSVGMarkerFrame.h b/layout/svg/base/src/nsSVGMarkerFrame.h index bda2cc05ed6..3bca96dba8e 100644 --- a/layout/svg/base/src/nsSVGMarkerFrame.h +++ b/layout/svg/base/src/nsSVGMarkerFrame.h @@ -60,6 +60,8 @@ protected: mInUse2(PR_FALSE) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame interface: #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, diff --git a/layout/svg/base/src/nsSVGMaskFrame.cpp b/layout/svg/base/src/nsSVGMaskFrame.cpp index 26f865bcb3f..96c3dc4acd4 100644 --- a/layout/svg/base/src/nsSVGMaskFrame.cpp +++ b/layout/svg/base/src/nsSVGMaskFrame.cpp @@ -52,6 +52,8 @@ NS_NewSVGMaskFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGMaskFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGMaskFrame) + already_AddRefed nsSVGMaskFrame::ComputeMaskAlpha(nsSVGRenderState *aContext, nsIFrame* aParent, diff --git a/layout/svg/base/src/nsSVGMaskFrame.h b/layout/svg/base/src/nsSVGMaskFrame.h index 8d42862792b..c93052c8c33 100644 --- a/layout/svg/base/src/nsSVGMaskFrame.h +++ b/layout/svg/base/src/nsSVGMaskFrame.h @@ -56,6 +56,8 @@ protected: mInUse(PR_FALSE) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsSVGMaskFrame method: already_AddRefed ComputeMaskAlpha(nsSVGRenderState *aContext, nsIFrame* aParent, diff --git a/layout/svg/base/src/nsSVGOuterSVGFrame.cpp b/layout/svg/base/src/nsSVGOuterSVGFrame.cpp index c96c4732d2e..c7da52666ac 100644 --- a/layout/svg/base/src/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/base/src/nsSVGOuterSVGFrame.cpp @@ -139,6 +139,8 @@ NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGOuterSVGFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGOuterSVGFrame) + nsSVGOuterSVGFrame::nsSVGOuterSVGFrame(nsStyleContext* aContext) : nsSVGOuterSVGFrameBase(aContext) , mRedrawSuspendCount(0) diff --git a/layout/svg/base/src/nsSVGOuterSVGFrame.h b/layout/svg/base/src/nsSVGOuterSVGFrame.h index 4c00c4d298d..703cf72b99c 100644 --- a/layout/svg/base/src/nsSVGOuterSVGFrame.h +++ b/layout/svg/base/src/nsSVGOuterSVGFrame.h @@ -62,6 +62,7 @@ protected: public: NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS #ifdef DEBUG ~nsSVGOuterSVGFrame() { diff --git a/layout/svg/base/src/nsSVGPaintServerFrame.cpp b/layout/svg/base/src/nsSVGPaintServerFrame.cpp index b1b2cb9fc4f..652969692e9 100644 --- a/layout/svg/base/src/nsSVGPaintServerFrame.cpp +++ b/layout/svg/base/src/nsSVGPaintServerFrame.cpp @@ -35,3 +35,5 @@ * ***** END LICENSE BLOCK ***** */ #include "nsSVGPaintServerFrame.h" + +NS_IMPL_FRAMEARENA_HELPERS(nsSVGPaintServerFrame) diff --git a/layout/svg/base/src/nsSVGPaintServerFrame.h b/layout/svg/base/src/nsSVGPaintServerFrame.h index 72691be9c13..39ecce74205 100644 --- a/layout/svg/base/src/nsSVGPaintServerFrame.h +++ b/layout/svg/base/src/nsSVGPaintServerFrame.h @@ -51,6 +51,8 @@ protected: nsSVGPaintServerFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + /* * Configure paint server prior to rendering * @return PR_FALSE to skip rendering diff --git a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp index 603eda9184c..b148f3f04e8 100644 --- a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp +++ b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp @@ -57,6 +57,8 @@ NS_NewSVGPathGeometryFrame(nsIPresShell* aPresShell, return new (aPresShell) nsSVGPathGeometryFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGPathGeometryFrame) + //---------------------------------------------------------------------- // nsQueryFrame methods diff --git a/layout/svg/base/src/nsSVGPathGeometryFrame.h b/layout/svg/base/src/nsSVGPathGeometryFrame.h index 082f957c661..58ee5167f1c 100644 --- a/layout/svg/base/src/nsSVGPathGeometryFrame.h +++ b/layout/svg/base/src/nsSVGPathGeometryFrame.h @@ -68,6 +68,7 @@ protected: public: NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIFrame interface: NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID, diff --git a/layout/svg/base/src/nsSVGPatternFrame.cpp b/layout/svg/base/src/nsSVGPatternFrame.cpp index dbf992ddafb..f9e1ab2a6d9 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.cpp +++ b/layout/svg/base/src/nsSVGPatternFrame.cpp @@ -67,6 +67,8 @@ nsSVGPatternFrame::nsSVGPatternFrame(nsStyleContext* aContext) : { } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGPatternFrame) + //---------------------------------------------------------------------- // nsIFrame methods: diff --git a/layout/svg/base/src/nsSVGPatternFrame.h b/layout/svg/base/src/nsSVGPatternFrame.h index 62825efdb18..3c13ea643d3 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.h +++ b/layout/svg/base/src/nsSVGPatternFrame.h @@ -59,6 +59,8 @@ typedef nsSVGPaintServerFrame nsSVGPatternFrameBase; class nsSVGPatternFrame : public nsSVGPatternFrameBase { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewSVGPatternFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/svg/base/src/nsSVGStopFrame.cpp b/layout/svg/base/src/nsSVGStopFrame.cpp index 80fd081f0e7..9daead63984 100644 --- a/layout/svg/base/src/nsSVGStopFrame.cpp +++ b/layout/svg/base/src/nsSVGStopFrame.cpp @@ -56,6 +56,8 @@ protected: nsSVGStopFrame(nsStyleContext* aContext) : nsSVGStopFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame interface: #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, @@ -92,6 +94,8 @@ public: //---------------------------------------------------------------------- // Implementation +NS_IMPL_FRAMEARENA_HELPERS(nsSVGStopFrame) + //---------------------------------------------------------------------- // nsIFrame methods: diff --git a/layout/svg/base/src/nsSVGSwitchFrame.cpp b/layout/svg/base/src/nsSVGSwitchFrame.cpp index 4c3244519d2..7dafeed15b7 100644 --- a/layout/svg/base/src/nsSVGSwitchFrame.cpp +++ b/layout/svg/base/src/nsSVGSwitchFrame.cpp @@ -52,6 +52,8 @@ protected: nsSVGSwitchFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, nsIFrame* aParent, @@ -94,6 +96,8 @@ NS_NewSVGSwitchFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGSwitchFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGSwitchFrame) + #ifdef DEBUG NS_IMETHODIMP nsSVGSwitchFrame::Init(nsIContent* aContent, diff --git a/layout/svg/base/src/nsSVGTSpanFrame.cpp b/layout/svg/base/src/nsSVGTSpanFrame.cpp index 7d6c3428b7b..2db937e7704 100644 --- a/layout/svg/base/src/nsSVGTSpanFrame.cpp +++ b/layout/svg/base/src/nsSVGTSpanFrame.cpp @@ -51,6 +51,8 @@ NS_NewSVGTSpanFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGTSpanFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGTSpanFrame) + nsIAtom * nsSVGTSpanFrame::GetType() const { diff --git a/layout/svg/base/src/nsSVGTSpanFrame.h b/layout/svg/base/src/nsSVGTSpanFrame.h index 754d5a6c13a..060a9792ae6 100644 --- a/layout/svg/base/src/nsSVGTSpanFrame.h +++ b/layout/svg/base/src/nsSVGTSpanFrame.h @@ -56,6 +56,7 @@ protected: public: NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIFrame: #ifdef DEBUG diff --git a/layout/svg/base/src/nsSVGTextContainerFrame.cpp b/layout/svg/base/src/nsSVGTextContainerFrame.cpp index ce5fb392e98..bbd51c5ed9f 100644 --- a/layout/svg/base/src/nsSVGTextContainerFrame.cpp +++ b/layout/svg/base/src/nsSVGTextContainerFrame.cpp @@ -50,6 +50,8 @@ NS_QUERYFRAME_HEAD(nsSVGTextContainerFrame) NS_QUERYFRAME_ENTRY(nsSVGTextContainerFrame) NS_QUERYFRAME_TAIL_INHERITING(nsSVGDisplayContainerFrame) +NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextContainerFrame) + void nsSVGTextContainerFrame::NotifyGlyphMetricsChange() { diff --git a/layout/svg/base/src/nsSVGTextContainerFrame.h b/layout/svg/base/src/nsSVGTextContainerFrame.h index 6ba4f238a25..738c217c8a3 100644 --- a/layout/svg/base/src/nsSVGTextContainerFrame.h +++ b/layout/svg/base/src/nsSVGTextContainerFrame.h @@ -58,8 +58,9 @@ public: NS_IMETHOD_(already_AddRefed) GetDy(); public: + NS_DECL_QUERYFRAME_TARGET(nsSVGTextContainerFrame) NS_DECL_QUERYFRAME - NS_DECLARE_FRAME_ACCESSOR(nsSVGTextContainerFrame) + NS_DECL_FRAMEARENA_HELPERS // nsIFrame NS_IMETHOD InsertFrames(nsIAtom* aListName, diff --git a/layout/svg/base/src/nsSVGTextFrame.cpp b/layout/svg/base/src/nsSVGTextFrame.cpp index 87ba73942ba..03b838aefe5 100644 --- a/layout/svg/base/src/nsSVGTextFrame.cpp +++ b/layout/svg/base/src/nsSVGTextFrame.cpp @@ -63,6 +63,8 @@ NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGTextFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextFrame) + //---------------------------------------------------------------------- // nsIFrame methods #ifdef DEBUG diff --git a/layout/svg/base/src/nsSVGTextFrame.h b/layout/svg/base/src/nsSVGTextFrame.h index f53573e7824..a93f2358589 100644 --- a/layout/svg/base/src/nsSVGTextFrame.h +++ b/layout/svg/base/src/nsSVGTextFrame.h @@ -56,6 +56,8 @@ protected: mPositioningDirty(PR_TRUE) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame: #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, diff --git a/layout/svg/base/src/nsSVGTextPathFrame.cpp b/layout/svg/base/src/nsSVGTextPathFrame.cpp index 9099d437815..6c261b2c711 100644 --- a/layout/svg/base/src/nsSVGTextPathFrame.cpp +++ b/layout/svg/base/src/nsSVGTextPathFrame.cpp @@ -52,6 +52,8 @@ NS_NewSVGTextPathFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGTextPathFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextPathFrame) + #ifdef DEBUG NS_IMETHODIMP nsSVGTextPathFrame::Init(nsIContent* aContent, diff --git a/layout/svg/base/src/nsSVGTextPathFrame.h b/layout/svg/base/src/nsSVGTextPathFrame.h index c15323d9eff..0e3c4164040 100644 --- a/layout/svg/base/src/nsSVGTextPathFrame.h +++ b/layout/svg/base/src/nsSVGTextPathFrame.h @@ -50,6 +50,8 @@ protected: nsSVGTextPathFrame(nsStyleContext* aContext) : nsSVGTextPathFrameBase(aContext) {} public: + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame: #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, diff --git a/layout/svg/base/src/nsSVGUseFrame.cpp b/layout/svg/base/src/nsSVGUseFrame.cpp index 49288796a9b..54b041fb65d 100644 --- a/layout/svg/base/src/nsSVGUseFrame.cpp +++ b/layout/svg/base/src/nsSVGUseFrame.cpp @@ -55,7 +55,9 @@ protected: public: NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS + // nsIFrame interface: #ifdef DEBUG NS_IMETHOD Init(nsIContent* aContent, @@ -98,6 +100,8 @@ NS_NewSVGUseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsSVGUseFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsSVGUseFrame) + nsIAtom * nsSVGUseFrame::GetType() const { diff --git a/layout/tables/nsITableCellLayout.h b/layout/tables/nsITableCellLayout.h index f201d6bacc1..550bf6a334b 100644 --- a/layout/tables/nsITableCellLayout.h +++ b/layout/tables/nsITableCellLayout.h @@ -49,7 +49,7 @@ class nsITableCellLayout { public: - NS_DECLARE_FRAME_ACCESSOR(nsITableCellLayout) + NS_DECL_QUERYFRAME_TARGET(nsITableCellLayout) /** return the mapped cell's row and column indexes (starting at 0 for each) */ NS_IMETHOD GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex)=0; diff --git a/layout/tables/nsITableLayout.h b/layout/tables/nsITableLayout.h index 0d9e3aef874..9f9dd21c93f 100644 --- a/layout/tables/nsITableLayout.h +++ b/layout/tables/nsITableLayout.h @@ -51,7 +51,7 @@ class nsITableLayout { public: - NS_DECLARE_FRAME_ACCESSOR(nsITableLayout) + NS_DECL_QUERYFRAME_TARGET(nsITableLayout) /** return all the relevant layout information about a cell. * @param aRowIndex a row which the cell intersects diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 9c6a076d7f9..26ac5847e11 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -82,7 +82,9 @@ nsTableCellFrame::~nsTableCellFrame() { } -nsTableCellFrame* +NS_IMPL_FRAMEARENA_HELPERS(nsTableCellFrame) + +nsTableCellFrame* nsTableCellFrame::GetNextCell() const { nsIFrame* childFrame = GetNextSibling(); @@ -1024,6 +1026,8 @@ NS_NewTableCellFrame(nsIPresShell* aPresShell, return new (aPresShell) nsTableCellFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsBCTableCellFrame) + nsMargin* nsTableCellFrame::GetBorderWidth(nsMargin& aBorder) const { diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index 2732485bbb2..253100b6957 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -72,9 +72,9 @@ class nsTableCellFrame : public nsHTMLContainerFrame, public nsIPercentHeightObserver { public: - - NS_DECLARE_FRAME_ACCESSOR(nsTableCellFrame) + NS_DECL_QUERYFRAME_TARGET(nsTableCellFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // default constructor supplied by the compiler @@ -302,6 +302,7 @@ inline void nsTableCellFrame::SetHasPctOverHeight(PRBool aValue) class nsBCTableCellFrame : public nsTableCellFrame { public: + NS_DECL_FRAMEARENA_HELPERS nsBCTableCellFrame(nsStyleContext* aContext); diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp index ebad45a6e25..f79804cc718 100644 --- a/layout/tables/nsTableColFrame.cpp +++ b/layout/tables/nsTableColFrame.cpp @@ -188,6 +188,8 @@ NS_NewTableColFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTableColFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTableColFrame) + nsTableColFrame* nsTableColFrame::GetNextCol() const { diff --git a/layout/tables/nsTableColFrame.h b/layout/tables/nsTableColFrame.h index d4e9b6fdacd..02d63e66b49 100644 --- a/layout/tables/nsTableColFrame.h +++ b/layout/tables/nsTableColFrame.h @@ -53,6 +53,7 @@ enum nsTableColType { class nsTableColFrame : public nsSplittableFrame { public: + NS_DECL_FRAMEARENA_HELPERS enum {eWIDTH_SOURCE_NONE =0, // no cell has contributed to the width style eWIDTH_SOURCE_CELL =1, // a cell specified a width diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 5055f88719b..2560fe5c3ae 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -487,6 +487,8 @@ NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTableColGroupFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTableColGroupFrame) + nsIAtom* nsTableColGroupFrame::GetType() const { diff --git a/layout/tables/nsTableColGroupFrame.h b/layout/tables/nsTableColGroupFrame.h index 3e487c5e9a2..845c6c9bc65 100644 --- a/layout/tables/nsTableColGroupFrame.h +++ b/layout/tables/nsTableColGroupFrame.h @@ -59,6 +59,7 @@ enum nsTableColGroupType { class nsTableColGroupFrame : public nsHTMLContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS // default constructor supplied by the compiler diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index c134005d355..9d03cd53d06 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -3470,6 +3470,8 @@ NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTableFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTableFrame) + nsTableFrame* nsTableFrame::GetTableFrame(nsIFrame* aSourceFrame) { diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 2fc7589abf5..06a15699f5a 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -139,8 +139,8 @@ private: class nsTableFrame : public nsHTMLContainerFrame, public nsITableLayout { public: - NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS /** nsTableOuterFrame has intimate knowledge of the inner table frame */ friend class nsTableOuterFrame; diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 68c5b1f6453..c483249773e 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -174,6 +174,8 @@ NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTableCaptionFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTableCaptionFrame) + /* ----------- nsTableOuterFrame ---------- */ nsTableOuterFrame::nsTableOuterFrame(nsStyleContext* aContext): @@ -1258,6 +1260,8 @@ NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTableOuterFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTableOuterFrame) + #ifdef DEBUG NS_IMETHODIMP nsTableOuterFrame::GetFrameName(nsAString& aResult) const diff --git a/layout/tables/nsTableOuterFrame.h b/layout/tables/nsTableOuterFrame.h index 0d2a9e65aa0..ed0b03f7f28 100644 --- a/layout/tables/nsTableOuterFrame.h +++ b/layout/tables/nsTableOuterFrame.h @@ -48,6 +48,8 @@ class nsTableFrame; class nsTableCaptionFrame : public nsBlockFrame { public: + NS_DECL_FRAMEARENA_HELPERS + // nsISupports virtual nsIAtom* GetType() const; friend nsIFrame* NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); @@ -86,8 +88,8 @@ protected: class nsTableOuterFrame : public nsHTMLContainerFrame, public nsITableLayout { public: - NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS /** instantiate a new instance of nsTableRowFrame. * @param aPresShell the pres shell for this frame diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 9d882da9960..5d13f06f656 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -1430,6 +1430,8 @@ NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTableRowFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTableRowFrame) + #ifdef DEBUG NS_IMETHODIMP nsTableRowFrame::GetFrameName(nsAString& aResult) const diff --git a/layout/tables/nsTableRowFrame.h b/layout/tables/nsTableRowFrame.h index 5103e67c935..f3ee23965d9 100644 --- a/layout/tables/nsTableRowFrame.h +++ b/layout/tables/nsTableRowFrame.h @@ -67,9 +67,9 @@ struct nsTableCellReflowState; class nsTableRowFrame : public nsHTMLContainerFrame { public: - - NS_DECLARE_FRAME_ACCESSOR(nsTableRowFrame) + NS_DECL_QUERYFRAME_TARGET(nsTableRowFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS virtual ~nsTableRowFrame(); diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 65e1e8f7d3b..0c7c5ca029e 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -1587,6 +1587,8 @@ NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsTableRowGroupFrame(aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsTableRowGroupFrame) + #ifdef DEBUG NS_IMETHODIMP nsTableRowGroupFrame::GetFrameName(nsAString& aResult) const diff --git a/layout/tables/nsTableRowGroupFrame.h b/layout/tables/nsTableRowGroupFrame.h index 96eb0b32a7e..7192f8fb5e0 100644 --- a/layout/tables/nsTableRowGroupFrame.h +++ b/layout/tables/nsTableRowGroupFrame.h @@ -97,8 +97,9 @@ class nsTableRowGroupFrame , public nsILineIterator { public: - NS_DECLARE_FRAME_ACCESSOR(nsTableRowGroupFrame) + NS_DECL_QUERYFRAME_TARGET(nsTableRowGroupFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS /** instantiate a new instance of nsTableRowFrame. * @param aPresShell the pres shell for this frame diff --git a/layout/xul/base/public/nsIMenuFrame.h b/layout/xul/base/public/nsIMenuFrame.h index 68419dd5e41..aee0ec847e5 100644 --- a/layout/xul/base/public/nsIMenuFrame.h +++ b/layout/xul/base/public/nsIMenuFrame.h @@ -46,7 +46,7 @@ class nsIMenuFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIMenuFrame) + NS_DECL_QUERYFRAME_TARGET(nsIMenuFrame) virtual PRBool IsOpen() = 0; virtual PRBool IsMenu() = 0; diff --git a/layout/xul/base/public/nsIScrollbarMediator.h b/layout/xul/base/public/nsIScrollbarMediator.h index 465e1242abd..4d5a2fd93d3 100644 --- a/layout/xul/base/public/nsIScrollbarMediator.h +++ b/layout/xul/base/public/nsIScrollbarMediator.h @@ -47,7 +47,7 @@ class nsIScrollbarFrame; class nsIScrollbarMediator { public: - NS_DECLARE_FRAME_ACCESSOR(nsIScrollbarMediator) + NS_DECL_QUERYFRAME_TARGET(nsIScrollbarMediator) // The nsIFrame aScrollbar argument below denotes the // scrollbar that's firing the notification. It should be diff --git a/layout/xul/base/src/grid/nsGridRowGroupFrame.cpp b/layout/xul/base/src/grid/nsGridRowGroupFrame.cpp index bcf43e81a35..1defe9f3de9 100644 --- a/layout/xul/base/src/grid/nsGridRowGroupFrame.cpp +++ b/layout/xul/base/src/grid/nsGridRowGroupFrame.cpp @@ -60,7 +60,9 @@ NS_NewGridRowGroupFrame(nsIPresShell* aPresShell, } return new (aPresShell) nsGridRowGroupFrame(aPresShell, aContext, layout); -} +} + +NS_IMPL_FRAMEARENA_HELPERS(nsGridRowGroupFrame) /** diff --git a/layout/xul/base/src/grid/nsGridRowGroupFrame.h b/layout/xul/base/src/grid/nsGridRowGroupFrame.h index 00989ce5239..05870e2a44c 100644 --- a/layout/xul/base/src/grid/nsGridRowGroupFrame.h +++ b/layout/xul/base/src/grid/nsGridRowGroupFrame.h @@ -57,6 +57,7 @@ class nsGridRowGroupFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS #ifdef NS_DEBUG NS_IMETHOD GetFrameName(nsAString& aResult) const diff --git a/layout/xul/base/src/grid/nsGridRowLeafFrame.cpp b/layout/xul/base/src/grid/nsGridRowLeafFrame.cpp index 069e8395454..228b728dbb1 100644 --- a/layout/xul/base/src/grid/nsGridRowLeafFrame.cpp +++ b/layout/xul/base/src/grid/nsGridRowLeafFrame.cpp @@ -61,7 +61,9 @@ NS_NewGridRowLeafFrame(nsIPresShell* aPresShell, return new (aPresShell) nsGridRowLeafFrame(aPresShell, aContext, PR_FALSE, layout); -} +} + +NS_IMPL_FRAMEARENA_HELPERS(nsGridRowLeafFrame) /* * Our border and padding could be affected by our columns or rows. diff --git a/layout/xul/base/src/grid/nsGridRowLeafFrame.h b/layout/xul/base/src/grid/nsGridRowLeafFrame.h index 42c526c68d5..ac8b2d0490b 100644 --- a/layout/xul/base/src/grid/nsGridRowLeafFrame.h +++ b/layout/xul/base/src/grid/nsGridRowLeafFrame.h @@ -58,6 +58,7 @@ class nsGridRowLeafFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS friend nsIFrame* NS_NewGridRowLeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/xul/base/src/nsBoxFrame.cpp b/layout/xul/base/src/nsBoxFrame.cpp index d60b673834e..effaadf8bef 100644 --- a/layout/xul/base/src/nsBoxFrame.cpp +++ b/layout/xul/base/src/nsBoxFrame.cpp @@ -126,7 +126,7 @@ nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot, nsIBoxLayout* aLayoutManager) { return new (aPresShell) nsBoxFrame(aPresShell, aContext, aIsRoot, aLayoutManager); -} // NS_NewBoxFrame +} nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) @@ -134,6 +134,8 @@ NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsBoxFrame(aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsBoxFrame) + nsBoxFrame::nsBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot, diff --git a/layout/xul/base/src/nsBoxFrame.h b/layout/xul/base/src/nsBoxFrame.h index f6f943a88c3..a6e8a960e02 100644 --- a/layout/xul/base/src/nsBoxFrame.h +++ b/layout/xul/base/src/nsBoxFrame.h @@ -74,6 +74,7 @@ nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell, class nsBoxFrame : public nsContainerFrame { public: + NS_DECL_FRAMEARENA_HELPERS friend nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, diff --git a/layout/xul/base/src/nsButtonBoxFrame.cpp b/layout/xul/base/src/nsButtonBoxFrame.cpp index 2af0d004f30..425d7a5b0b4 100644 --- a/layout/xul/base/src/nsButtonBoxFrame.cpp +++ b/layout/xul/base/src/nsButtonBoxFrame.cpp @@ -62,7 +62,9 @@ nsIFrame* NS_NewButtonBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsButtonBoxFrame(aPresShell, aContext); -} // NS_NewXULButtonFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsButtonBoxFrame) NS_IMETHODIMP nsButtonBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, diff --git a/layout/xul/base/src/nsButtonBoxFrame.h b/layout/xul/base/src/nsButtonBoxFrame.h index 023db51c590..81f84937eb9 100644 --- a/layout/xul/base/src/nsButtonBoxFrame.h +++ b/layout/xul/base/src/nsButtonBoxFrame.h @@ -43,6 +43,8 @@ class nsButtonBoxFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewButtonBoxFrame(nsIPresShell* aPresShell); nsButtonBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) diff --git a/layout/xul/base/src/nsDeckFrame.cpp b/layout/xul/base/src/nsDeckFrame.cpp index deea1547250..1342da84fe1 100644 --- a/layout/xul/base/src/nsDeckFrame.cpp +++ b/layout/xul/base/src/nsDeckFrame.cpp @@ -62,7 +62,9 @@ nsIFrame* NS_NewDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsDeckFrame(aPresShell, aContext); -} // NS_NewDeckFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsDeckFrame) nsDeckFrame::nsDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) diff --git a/layout/xul/base/src/nsDeckFrame.h b/layout/xul/base/src/nsDeckFrame.h index d0b6df84f36..5ad00f002cf 100644 --- a/layout/xul/base/src/nsDeckFrame.h +++ b/layout/xul/base/src/nsDeckFrame.h @@ -51,6 +51,7 @@ class nsDeckFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS friend nsIFrame* NS_NewDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/xul/base/src/nsDocElementBoxFrame.cpp b/layout/xul/base/src/nsDocElementBoxFrame.cpp index 03de7d6eace..b721ec00970 100644 --- a/layout/xul/base/src/nsDocElementBoxFrame.cpp +++ b/layout/xul/base/src/nsDocElementBoxFrame.cpp @@ -72,6 +72,7 @@ public: :nsBoxFrame(aShell, aContext, PR_TRUE) {} NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIAnonymousContentCreator virtual nsresult CreateAnonymousContent(nsTArray& aElements); @@ -100,6 +101,8 @@ NS_NewDocElementBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsDocElementBoxFrame (aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsDocElementBoxFrame) + void nsDocElementBoxFrame::Destroy() { diff --git a/layout/xul/base/src/nsGroupBoxFrame.cpp b/layout/xul/base/src/nsGroupBoxFrame.cpp index 14e0df6a853..bd8f2dde0d6 100644 --- a/layout/xul/base/src/nsGroupBoxFrame.cpp +++ b/layout/xul/base/src/nsGroupBoxFrame.cpp @@ -44,6 +44,7 @@ class nsGroupBoxFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS nsGroupBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext): nsBoxFrame(aShell, aContext) {} @@ -102,6 +103,8 @@ NS_NewGroupBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsGroupBoxFrame(aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsGroupBoxFrame) + class nsDisplayXULGroupBackground : public nsDisplayItem { public: nsDisplayXULGroupBackground(nsGroupBoxFrame* aFrame) : nsDisplayItem(aFrame) { diff --git a/layout/xul/base/src/nsIRootBox.h b/layout/xul/base/src/nsIRootBox.h index 142a284bd6e..d04557bdea4 100644 --- a/layout/xul/base/src/nsIRootBox.h +++ b/layout/xul/base/src/nsIRootBox.h @@ -48,7 +48,7 @@ class nsIPresShell; class nsIRootBox { public: - NS_DECLARE_FRAME_ACCESSOR(nsIRootBox) + NS_DECL_QUERYFRAME_TARGET(nsIRootBox) virtual nsPopupSetFrame* GetPopupSetFrame() = 0; virtual void SetPopupSetFrame(nsPopupSetFrame* aPopupSet) = 0; diff --git a/layout/xul/base/src/nsIScrollbarFrame.h b/layout/xul/base/src/nsIScrollbarFrame.h index 74e5576d7f9..6783c868bef 100644 --- a/layout/xul/base/src/nsIScrollbarFrame.h +++ b/layout/xul/base/src/nsIScrollbarFrame.h @@ -46,7 +46,7 @@ class nsIScrollbarMediator; class nsIScrollbarFrame : public nsQueryFrame { public: - NS_DECLARE_FRAME_ACCESSOR(nsIScrollbarFrame) + NS_DECL_QUERYFRAME_TARGET(nsIScrollbarFrame) // Sets the scrollbar mediator content. We will try to get its primary frame // and then QI that to nsIScrollbarMediator as necessary. diff --git a/layout/xul/base/src/nsImageBoxFrame.cpp b/layout/xul/base/src/nsImageBoxFrame.cpp index 93462314c27..4db3ce7f236 100644 --- a/layout/xul/base/src/nsImageBoxFrame.cpp +++ b/layout/xul/base/src/nsImageBoxFrame.cpp @@ -158,7 +158,9 @@ nsIFrame* NS_NewImageBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsImageBoxFrame (aPresShell, aContext); -} // NS_NewTitledButtonFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsImageBoxFrame) NS_IMETHODIMP nsImageBoxFrame::AttributeChanged(PRInt32 aNameSpaceID, diff --git a/layout/xul/base/src/nsImageBoxFrame.h b/layout/xul/base/src/nsImageBoxFrame.h index 427341b3d24..0eaa25d7892 100644 --- a/layout/xul/base/src/nsImageBoxFrame.h +++ b/layout/xul/base/src/nsImageBoxFrame.h @@ -70,6 +70,7 @@ private: class nsImageBoxFrame : public nsLeafBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS // nsIBox virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState); diff --git a/layout/xul/base/src/nsLeafBoxFrame.cpp b/layout/xul/base/src/nsLeafBoxFrame.cpp index 7f28f960272..c1070f79881 100644 --- a/layout/xul/base/src/nsLeafBoxFrame.cpp +++ b/layout/xul/base/src/nsLeafBoxFrame.cpp @@ -70,7 +70,9 @@ nsIFrame* NS_NewLeafBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsLeafBoxFrame(aPresShell, aContext); -} // NS_NewLeafBoxFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsLeafBoxFrame) nsLeafBoxFrame::nsLeafBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext) : nsLeafFrame(aContext), mMouseThrough(unset) diff --git a/layout/xul/base/src/nsLeafBoxFrame.h b/layout/xul/base/src/nsLeafBoxFrame.h index da70e509d1f..0ddb2fef1f1 100644 --- a/layout/xul/base/src/nsLeafBoxFrame.h +++ b/layout/xul/base/src/nsLeafBoxFrame.h @@ -45,6 +45,7 @@ class nsAccessKeyInfo; class nsLeafBoxFrame : public nsLeafFrame { public: + NS_DECL_FRAMEARENA_HELPERS friend nsIFrame* NS_NewLeafBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/xul/base/src/nsListBoxBodyFrame.cpp b/layout/xul/base/src/nsListBoxBodyFrame.cpp index 4548c88d2b9..4261d2fc0a1 100644 --- a/layout/xul/base/src/nsListBoxBodyFrame.cpp +++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp @@ -1542,3 +1542,5 @@ NS_NewListBoxBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsListBoxBodyFrame(aPresShell, aContext, layout); } + +NS_IMPL_FRAMEARENA_HELPERS(nsListBoxBodyFrame) diff --git a/layout/xul/base/src/nsListBoxBodyFrame.h b/layout/xul/base/src/nsListBoxBodyFrame.h index 95b7616d249..69851ae037c 100644 --- a/layout/xul/base/src/nsListBoxBodyFrame.h +++ b/layout/xul/base/src/nsListBoxBodyFrame.h @@ -64,9 +64,9 @@ class nsListBoxBodyFrame : public nsBoxFrame, virtual ~nsListBoxBodyFrame(); public: - NS_DECLARE_FRAME_ACCESSOR(nsListBoxBodyFrame) - + NS_DECL_QUERYFRAME_TARGET(nsListBoxBodyFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // non-virtual nsIListBoxObject nsresult GetRowCount(PRInt32 *aResult); diff --git a/layout/xul/base/src/nsListItemFrame.cpp b/layout/xul/base/src/nsListItemFrame.cpp index 258b933b72d..a65a2801958 100644 --- a/layout/xul/base/src/nsListItemFrame.cpp +++ b/layout/xul/base/src/nsListItemFrame.cpp @@ -96,5 +96,6 @@ NS_NewListItemFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) } return new (aPresShell) nsListItemFrame(aPresShell, aContext, PR_FALSE, layout); -} // NS_NewListItemFrame +} +NS_IMPL_FRAMEARENA_HELPERS(nsListItemFrame) diff --git a/layout/xul/base/src/nsListItemFrame.h b/layout/xul/base/src/nsListItemFrame.h index bdd19f1af6a..5e89e432175 100644 --- a/layout/xul/base/src/nsListItemFrame.h +++ b/layout/xul/base/src/nsListItemFrame.h @@ -46,6 +46,8 @@ nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell, class nsListItemFrame : public nsGridRowLeafFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell, nsStyleContext *aContext); diff --git a/layout/xul/base/src/nsMenuBarFrame.cpp b/layout/xul/base/src/nsMenuBarFrame.cpp index 65ee6d1eab9..3d82b69cfab 100644 --- a/layout/xul/base/src/nsMenuBarFrame.cpp +++ b/layout/xul/base/src/nsMenuBarFrame.cpp @@ -78,6 +78,8 @@ NS_NewMenuBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMenuBarFrame (aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMenuBarFrame) + // // nsMenuBarFrame cntr // diff --git a/layout/xul/base/src/nsMenuBarFrame.h b/layout/xul/base/src/nsMenuBarFrame.h index 4160e72b838..d482ac4ffa2 100644 --- a/layout/xul/base/src/nsMenuBarFrame.h +++ b/layout/xul/base/src/nsMenuBarFrame.h @@ -60,6 +60,8 @@ nsIFrame* NS_NewMenuBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) class nsMenuBarFrame : public nsBoxFrame, public nsMenuParent { public: + NS_DECL_FRAMEARENA_HELPERS + nsMenuBarFrame(nsIPresShell* aShell, nsStyleContext* aContext); // nsMenuParent interface diff --git a/layout/xul/base/src/nsMenuFrame.cpp b/layout/xul/base/src/nsMenuFrame.cpp index 645b45176d6..b1429e303ee 100644 --- a/layout/xul/base/src/nsMenuFrame.cpp +++ b/layout/xul/base/src/nsMenuFrame.cpp @@ -177,6 +177,8 @@ NS_NewMenuItemFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsMenuFrame) + NS_QUERYFRAME_HEAD(nsMenuFrame) NS_QUERYFRAME_ENTRY(nsIMenuFrame) NS_QUERYFRAME_ENTRY(nsIScrollableViewProvider) diff --git a/layout/xul/base/src/nsMenuFrame.h b/layout/xul/base/src/nsMenuFrame.h index 1729ffb0f68..745de2fe28e 100644 --- a/layout/xul/base/src/nsMenuFrame.h +++ b/layout/xul/base/src/nsMenuFrame.h @@ -111,6 +111,7 @@ public: nsMenuFrame(nsIPresShell* aShell, nsStyleContext* aContext); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // nsIBox NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState); diff --git a/layout/xul/base/src/nsMenuPopupFrame.cpp b/layout/xul/base/src/nsMenuPopupFrame.cpp index f94496598d8..bdcf7929e63 100644 --- a/layout/xul/base/src/nsMenuPopupFrame.cpp +++ b/layout/xul/base/src/nsMenuPopupFrame.cpp @@ -100,6 +100,8 @@ NS_NewMenuPopupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsMenuPopupFrame (aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsMenuPopupFrame) + // // nsMenuPopupFrame ctor // diff --git a/layout/xul/base/src/nsMenuPopupFrame.h b/layout/xul/base/src/nsMenuPopupFrame.h index a02cbdfd00b..aa141756825 100644 --- a/layout/xul/base/src/nsMenuPopupFrame.h +++ b/layout/xul/base/src/nsMenuPopupFrame.h @@ -117,6 +117,8 @@ class nsMenuPopupFrame; class nsMenuPopupFrame : public nsBoxFrame, public nsMenuParent { public: + NS_DECL_FRAMEARENA_HELPERS + nsMenuPopupFrame(nsIPresShell* aShell, nsStyleContext* aContext); // nsMenuParent interface diff --git a/layout/xul/base/src/nsPopupSetFrame.cpp b/layout/xul/base/src/nsPopupSetFrame.cpp index 3bab01e7390..32be65702c8 100644 --- a/layout/xul/base/src/nsPopupSetFrame.cpp +++ b/layout/xul/base/src/nsPopupSetFrame.cpp @@ -67,6 +67,8 @@ NS_NewPopupSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsPopupSetFrame (aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsPopupSetFrame) + NS_IMETHODIMP nsPopupSetFrame::Init(nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/xul/base/src/nsPopupSetFrame.h b/layout/xul/base/src/nsPopupSetFrame.h index 63f0956eb83..69a747453b8 100644 --- a/layout/xul/base/src/nsPopupSetFrame.h +++ b/layout/xul/base/src/nsPopupSetFrame.h @@ -64,6 +64,8 @@ public: class nsPopupSetFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsPopupSetFrame(nsIPresShell* aShell, nsStyleContext* aContext): nsBoxFrame(aShell, aContext) {} diff --git a/layout/xul/base/src/nsProgressMeterFrame.cpp b/layout/xul/base/src/nsProgressMeterFrame.cpp index 599a7325826..71b34b48e99 100644 --- a/layout/xul/base/src/nsProgressMeterFrame.cpp +++ b/layout/xul/base/src/nsProgressMeterFrame.cpp @@ -61,7 +61,9 @@ nsIFrame* NS_NewProgressMeterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsProgressMeterFrame(aPresShell, aContext); -} // NS_NewProgressMeterFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsProgressMeterFrame) // // nsProgressMeterFrame dstr diff --git a/layout/xul/base/src/nsProgressMeterFrame.h b/layout/xul/base/src/nsProgressMeterFrame.h index c55dbb93994..66cfbce603b 100644 --- a/layout/xul/base/src/nsProgressMeterFrame.h +++ b/layout/xul/base/src/nsProgressMeterFrame.h @@ -56,6 +56,8 @@ class nsPresContext; class nsProgressMeterFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewProgressMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState); diff --git a/layout/xul/base/src/nsResizerFrame.cpp b/layout/xul/base/src/nsResizerFrame.cpp index e33d3e22d92..7687fdc5c8c 100644 --- a/layout/xul/base/src/nsResizerFrame.cpp +++ b/layout/xul/base/src/nsResizerFrame.cpp @@ -64,7 +64,9 @@ nsIFrame* NS_NewResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsResizerFrame(aPresShell, aContext); -} // NS_NewResizerFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsResizerFrame) nsResizerFrame::nsResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) :nsTitleBarFrame(aPresShell, aContext) diff --git a/layout/xul/base/src/nsResizerFrame.h b/layout/xul/base/src/nsResizerFrame.h index c1a97b87ee6..7b1a50e1ca8 100644 --- a/layout/xul/base/src/nsResizerFrame.h +++ b/layout/xul/base/src/nsResizerFrame.h @@ -49,6 +49,8 @@ protected: }; public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); nsResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/xul/base/src/nsRootBoxFrame.cpp b/layout/xul/base/src/nsRootBoxFrame.cpp index 8a2ad1ded6e..4269991cae3 100644 --- a/layout/xul/base/src/nsRootBoxFrame.cpp +++ b/layout/xul/base/src/nsRootBoxFrame.cpp @@ -81,6 +81,7 @@ public: nsRootBoxFrame(nsIPresShell* aShell, nsStyleContext *aContext); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS virtual nsPopupSetFrame* GetPopupSetFrame(); virtual void SetPopupSetFrame(nsPopupSetFrame* aPopupSet); @@ -142,6 +143,8 @@ NS_NewRootBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsRootBoxFrame (aPresShell, aContext); } +NS_IMPL_FRAMEARENA_HELPERS(nsRootBoxFrame) + nsRootBoxFrame::nsRootBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext): nsBoxFrame(aShell, aContext, PR_TRUE) { diff --git a/layout/xul/base/src/nsScrollBoxFrame.cpp b/layout/xul/base/src/nsScrollBoxFrame.cpp index a50ab1cb38b..79c75756457 100644 --- a/layout/xul/base/src/nsScrollBoxFrame.cpp +++ b/layout/xul/base/src/nsScrollBoxFrame.cpp @@ -49,6 +49,8 @@ class nsAutoRepeatBoxFrame : public nsButtonBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewAutoRepeatBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); @@ -94,7 +96,9 @@ nsIFrame* NS_NewAutoRepeatBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsAutoRepeatBoxFrame (aPresShell, aContext); -} // NS_NewScrollBarButtonFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsAutoRepeatBoxFrame) NS_IMETHODIMP nsAutoRepeatBoxFrame::HandleEvent(nsPresContext* aPresContext, diff --git a/layout/xul/base/src/nsScrollbarButtonFrame.cpp b/layout/xul/base/src/nsScrollbarButtonFrame.cpp index f046ad87853..31e24857377 100644 --- a/layout/xul/base/src/nsScrollbarButtonFrame.cpp +++ b/layout/xul/base/src/nsScrollbarButtonFrame.cpp @@ -64,7 +64,9 @@ nsIFrame* NS_NewScrollbarButtonFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsScrollbarButtonFrame(aPresShell, aContext); -} // NS_NewScrollBarButtonFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsScrollbarButtonFrame) NS_IMETHODIMP nsScrollbarButtonFrame::HandleEvent(nsPresContext* aPresContext, diff --git a/layout/xul/base/src/nsScrollbarButtonFrame.h b/layout/xul/base/src/nsScrollbarButtonFrame.h index 0f8c04946ec..d999e4f609e 100644 --- a/layout/xul/base/src/nsScrollbarButtonFrame.h +++ b/layout/xul/base/src/nsScrollbarButtonFrame.h @@ -54,6 +54,8 @@ class nsSliderFrame; class nsScrollbarButtonFrame : public nsButtonBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsScrollbarButtonFrame(nsIPresShell* aPresShell, nsStyleContext* aContext): nsButtonBoxFrame(aPresShell, aContext) {} diff --git a/layout/xul/base/src/nsScrollbarFrame.cpp b/layout/xul/base/src/nsScrollbarFrame.cpp index f4ad833fabe..6cda91c3ab4 100644 --- a/layout/xul/base/src/nsScrollbarFrame.cpp +++ b/layout/xul/base/src/nsScrollbarFrame.cpp @@ -57,7 +57,9 @@ nsIFrame* NS_NewScrollbarFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsScrollbarFrame (aPresShell, aContext); -} // NS_NewScrollbarFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsScrollbarFrame) NS_QUERYFRAME_HEAD(nsScrollbarFrame) NS_QUERYFRAME_ENTRY(nsIScrollbarFrame) diff --git a/layout/xul/base/src/nsScrollbarFrame.h b/layout/xul/base/src/nsScrollbarFrame.h index 63b299baa2d..e37c725fe79 100644 --- a/layout/xul/base/src/nsScrollbarFrame.h +++ b/layout/xul/base/src/nsScrollbarFrame.h @@ -67,6 +67,7 @@ public: PRInt32 aModType); NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS NS_IMETHOD HandlePress(nsPresContext* aPresContext, nsGUIEvent * aEvent, diff --git a/layout/xul/base/src/nsSliderFrame.cpp b/layout/xul/base/src/nsSliderFrame.cpp index 141a286153c..238caa52b70 100644 --- a/layout/xul/base/src/nsSliderFrame.cpp +++ b/layout/xul/base/src/nsSliderFrame.cpp @@ -90,7 +90,9 @@ nsIFrame* NS_NewSliderFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsSliderFrame(aPresShell, aContext); -} // NS_NewSliderFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsSliderFrame) nsSliderFrame::nsSliderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext): nsBoxFrame(aPresShell, aContext), diff --git a/layout/xul/base/src/nsSliderFrame.h b/layout/xul/base/src/nsSliderFrame.h index 18fd295f406..e84d4ac23f7 100644 --- a/layout/xul/base/src/nsSliderFrame.h +++ b/layout/xul/base/src/nsSliderFrame.h @@ -115,6 +115,8 @@ public: class nsSliderFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend class nsSliderMediator; nsSliderFrame(nsIPresShell* aShell, nsStyleContext* aContext); diff --git a/layout/xul/base/src/nsSplitterFrame.cpp b/layout/xul/base/src/nsSplitterFrame.cpp index e561634428c..08301579678 100644 --- a/layout/xul/base/src/nsSplitterFrame.cpp +++ b/layout/xul/base/src/nsSplitterFrame.cpp @@ -252,7 +252,9 @@ nsIFrame* NS_NewSplitterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsSplitterFrame(aPresShell, aContext); -} // NS_NewSplitterFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsSplitterFrame) nsSplitterFrame::nsSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) : nsBoxFrame(aPresShell, aContext), diff --git a/layout/xul/base/src/nsSplitterFrame.h b/layout/xul/base/src/nsSplitterFrame.h index 2c91e6e38f1..21d96dfa03e 100644 --- a/layout/xul/base/src/nsSplitterFrame.h +++ b/layout/xul/base/src/nsSplitterFrame.h @@ -52,6 +52,8 @@ nsIFrame* NS_NewSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext class nsSplitterFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsSplitterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); virtual void Destroy(); diff --git a/layout/xul/base/src/nsStackFrame.cpp b/layout/xul/base/src/nsStackFrame.cpp index abca2e79d76..4b62f75dc4f 100644 --- a/layout/xul/base/src/nsStackFrame.cpp +++ b/layout/xul/base/src/nsStackFrame.cpp @@ -58,7 +58,9 @@ nsIFrame* NS_NewStackFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsStackFrame(aPresShell, aContext); -} // NS_NewStackFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsStackFrame) nsStackFrame::nsStackFrame(nsIPresShell* aPresShell, nsStyleContext* aContext): nsBoxFrame(aPresShell, aContext) diff --git a/layout/xul/base/src/nsStackFrame.h b/layout/xul/base/src/nsStackFrame.h index 357c3e2b82b..eb882864b05 100644 --- a/layout/xul/base/src/nsStackFrame.h +++ b/layout/xul/base/src/nsStackFrame.h @@ -51,6 +51,7 @@ class nsStackFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS friend nsIFrame* NS_NewStackFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index 1c6f84e7569..a5e17291027 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -107,7 +107,9 @@ nsIFrame* NS_NewTextBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsTextBoxFrame (aPresShell, aContext); -} // NS_NewTextFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsTextBoxFrame) NS_IMETHODIMP diff --git a/layout/xul/base/src/nsTextBoxFrame.h b/layout/xul/base/src/nsTextBoxFrame.h index d4bc4de04ac..6e6f9d797a5 100644 --- a/layout/xul/base/src/nsTextBoxFrame.h +++ b/layout/xul/base/src/nsTextBoxFrame.h @@ -47,6 +47,7 @@ typedef nsLeafBoxFrame nsTextBoxFrameSuper; class nsTextBoxFrame : public nsTextBoxFrameSuper { public: + NS_DECL_FRAMEARENA_HELPERS // nsIBox virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState); diff --git a/layout/xul/base/src/nsTitleBarFrame.cpp b/layout/xul/base/src/nsTitleBarFrame.cpp index edbaa550f23..84f8c92a96c 100644 --- a/layout/xul/base/src/nsTitleBarFrame.cpp +++ b/layout/xul/base/src/nsTitleBarFrame.cpp @@ -63,7 +63,9 @@ nsIFrame* NS_NewTitleBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsTitleBarFrame(aPresShell, aContext); -} // NS_NewTitleBarFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsTitleBarFrame) nsTitleBarFrame::nsTitleBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) :nsBoxFrame(aPresShell, aContext, PR_FALSE) diff --git a/layout/xul/base/src/nsTitleBarFrame.h b/layout/xul/base/src/nsTitleBarFrame.h index 0e382836887..9667187e28f 100644 --- a/layout/xul/base/src/nsTitleBarFrame.h +++ b/layout/xul/base/src/nsTitleBarFrame.h @@ -42,8 +42,9 @@ class nsTitleBarFrame : public nsBoxFrame { - public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewTitleBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); nsTitleBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/xul/base/src/nsXULLabelFrame.cpp b/layout/xul/base/src/nsXULLabelFrame.cpp index e59f3333d2e..1dc03b826ea 100644 --- a/layout/xul/base/src/nsXULLabelFrame.cpp +++ b/layout/xul/base/src/nsXULLabelFrame.cpp @@ -53,6 +53,8 @@ NS_NewXULLabelFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return it; } +NS_IMPL_FRAMEARENA_HELPERS(nsXULLabelFrame) + // If you make changes to this function, check its counterparts // in nsBoxFrame and nsTextBoxFrame nsresult diff --git a/layout/xul/base/src/nsXULLabelFrame.h b/layout/xul/base/src/nsXULLabelFrame.h index f1dd9dc07fa..dd32268cfde 100644 --- a/layout/xul/base/src/nsXULLabelFrame.h +++ b/layout/xul/base/src/nsXULLabelFrame.h @@ -49,6 +49,8 @@ class nsXULLabelFrame : public nsBlockFrame { public: + NS_DECL_FRAMEARENA_HELPERS + friend nsIFrame* NS_NewXULLabelFrame(nsIPresShell* aPresShell, nsStyleContext *aContext); diff --git a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index 1e8905a6fa6..f4bfe01f8cb 100644 --- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -132,8 +132,9 @@ nsIFrame* NS_NewTreeBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsTreeBodyFrame(aPresShell, aContext); -} // NS_NewTreeFrame +} +NS_IMPL_FRAMEARENA_HELPERS(nsTreeBodyFrame) NS_QUERYFRAME_HEAD(nsTreeBodyFrame) NS_QUERYFRAME_ENTRY(nsICSSPseudoComparator) diff --git a/layout/xul/base/src/tree/src/nsTreeBodyFrame.h b/layout/xul/base/src/tree/src/nsTreeBodyFrame.h index c365747b0cb..c8c1ac0ad9a 100644 --- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.h +++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.h @@ -87,9 +87,9 @@ public: nsTreeBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); ~nsTreeBodyFrame(); - NS_DECLARE_FRAME_ACCESSOR(nsTreeBodyFrame) - + NS_DECL_QUERYFRAME_TARGET(nsTreeBodyFrame) NS_DECL_QUERYFRAME + NS_DECL_FRAMEARENA_HELPERS // non-virtual signatures like nsITreeBodyFrame nsresult GetColumns(nsITreeColumns **aColumns); diff --git a/layout/xul/base/src/tree/src/nsTreeColFrame.cpp b/layout/xul/base/src/tree/src/nsTreeColFrame.cpp index 01e05e12534..53d7d526fcf 100644 --- a/layout/xul/base/src/tree/src/nsTreeColFrame.cpp +++ b/layout/xul/base/src/tree/src/nsTreeColFrame.cpp @@ -62,7 +62,9 @@ nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { return new (aPresShell) nsTreeColFrame(aPresShell, aContext); -} // NS_NewTreeColFrame +} + +NS_IMPL_FRAMEARENA_HELPERS(nsTreeColFrame) // Destructor nsTreeColFrame::~nsTreeColFrame() diff --git a/layout/xul/base/src/tree/src/nsTreeColFrame.h b/layout/xul/base/src/tree/src/nsTreeColFrame.h index 6e741c14e96..cdf715e6daa 100644 --- a/layout/xul/base/src/tree/src/nsTreeColFrame.h +++ b/layout/xul/base/src/tree/src/nsTreeColFrame.h @@ -46,6 +46,8 @@ nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell, class nsTreeColFrame : public nsBoxFrame { public: + NS_DECL_FRAMEARENA_HELPERS + nsTreeColFrame(nsIPresShell* aPresShell, nsStyleContext* aContext): nsBoxFrame(aPresShell, aContext) {} diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h index 1ac05d3899b..c736658bbb8 100644 --- a/xpcom/base/nscore.h +++ b/xpcom/base/nscore.h @@ -38,7 +38,7 @@ #define nscore_h___ /** - * Make sure that we have the proper platform specific + * Make sure that we have the proper platform specific * c++ definitions needed by nscore.h */ #ifndef _XPCOM_CONFIG_H_ @@ -52,7 +52,7 @@ /* Core XPCOM declarations. */ -/** +/** * Macros defining the target platform... */ #ifdef _WIN32 @@ -145,7 +145,8 @@ * NS_HIDDEN_(int) NS_FASTCALL func2(char *foo); */ -#if defined(__i386__) && defined(__GNUC__) && (__GNUC__ >= 3) && !defined(XP_OS2) +#if defined(__i386__) && defined(__GNUC__) && \ + (__GNUC__ >= 3) && !defined(XP_OS2) #define NS_FASTCALL __attribute__ ((regparm (3), stdcall)) #define NS_CONSTRUCTOR_FASTCALL __attribute__ ((regparm (3), stdcall)) #elif defined(XP_WIN) @@ -160,7 +161,8 @@ * NS_DEFCALL undoes the effect of a global regparm/stdcall setting * so that xptcall works correctly. */ -#if defined(__i386__) && defined(__GNUC__) && (__GNUC__ >= 3) && !defined(XP_OS2) +#if defined(__i386__) && defined(__GNUC__) && \ + (__GNUC__ >= 3) && !defined(XP_OS2) #define NS_DEFCALL __attribute__ ((regparm (0), cdecl)) #else #define NS_DEFCALL @@ -398,8 +400,9 @@ typedef PRUint32 nsrefcnt; #endif /* - If the compiler doesn't support |explicit|, we'll just make it go away, trusting - that the builds under compilers that do have it will keep us on the straight and narrow. + If the compiler doesn't support |explicit|, we'll just make it go + away, trusting that the builds under compilers that do have it + will keep us on the straight and narrow. */ #ifndef HAVE_CPP_EXPLICIT #define explicit @@ -415,7 +418,7 @@ typedef PRUint32 nsrefcnt; #define NS_SPECIALIZE_TEMPLATE #endif -/* +/* * Use these macros to do 64bit safe pointer conversions. */ @@ -455,9 +458,9 @@ typedef PRUint32 nsrefcnt; #endif /* - * If we're being linked as standalone glue, we don't want a dynamic dependency - * on NSPR libs, so we skip the debug thread-safety checks, and we cannot use - * the THREADSAFE_ISUPPORTS macros. + * If we're being linked as standalone glue, we don't want a dynamic + * dependency on NSPR libs, so we skip the debug thread-safety + * checks, and we cannot use the THREADSAFE_ISUPPORTS macros. */ #if defined(XPCOM_GLUE) && !defined(XPCOM_GLUE_USE_NSPR) #define XPCOM_GLUE_AVOID_NSPR @@ -468,21 +471,34 @@ typedef PRUint32 nsrefcnt; * * NS_STACK_CLASS: a class which must only be instantiated on the stack * NS_FINAL_CLASS: a class which may not be subclassed + * + * NS_MUST_OVERRIDE: + * a method which every immediate subclass of this class must + * override. A subclass override can itself be NS_MUST_OVERRIDE, in + * which case its own subclasses must override the method as well. + * + * This is similar to, but not the same as, marking a method pure + * virtual. It has no effect on the class in which the annotation + * appears, you can still provide a definition for the method, and + * it objects to the mere existence of a subclass that doesn't + * override the method. See examples in analysis/must-override.js. */ #ifdef NS_STATIC_CHECKING #define NS_STACK_CLASS __attribute__((user("NS_stack"))) #define NS_OKONHEAP __attribute__((user("NS_okonheap"))) #define NS_SUPPRESS_STACK_CHECK __attribute__((user("NS_suppress_stackcheck"))) #define NS_FINAL_CLASS __attribute__((user("NS_final"))) +#define NS_MUST_OVERRIDE __attribute__((user("NS_must_override"))) #else #define NS_STACK_CLASS #define NS_OKONHEAP #define NS_SUPPRESS_STACK_CHECK #define NS_FINAL_CLASS +#define NS_MUST_OVERRIDE #endif /** - * Attributes defined to help Dehydra GCC analysis. + * Attributes defined to help Dehydra GCC analysis. */ #ifdef NS_STATIC_CHECKING # define NS_SCRIPTABLE __attribute__((user("NS_script")))