diff --git a/layout/forms/nsColorControlFrame.cpp b/layout/forms/nsColorControlFrame.cpp index bfde55cfca29..831fed903c0d 100644 --- a/layout/forms/nsColorControlFrame.cpp +++ b/layout/forms/nsColorControlFrame.cpp @@ -23,7 +23,7 @@ using mozilla::dom::HTMLInputElement; using mozilla::dom::CallerType; nsColorControlFrame::nsColorControlFrame(nsStyleContext* aContext) - : nsHTMLButtonControlFrame(aContext, LayoutFrameType::ColorControl) + : nsHTMLButtonControlFrame(aContext, kClassID, LayoutFrameType::ColorControl) { } diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 89ad3a06a03c..981e22139f1d 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -223,7 +223,7 @@ static int32_t gReflowInx = -1; //------------------------------------------------------ nsComboboxControlFrame::nsComboboxControlFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext, LayoutFrameType::ComboboxControl) + : nsBlockFrame(aContext, kClassID, LayoutFrameType::ComboboxControl) , mDisplayFrame(nullptr) , mButtonFrame(nullptr) , mDropdownFrame(nullptr) @@ -1286,7 +1286,7 @@ public: nsComboboxDisplayFrame(nsStyleContext* aContext, nsComboboxControlFrame* aComboBox) - : nsBlockFrame(aContext, LayoutFrameType::ComboboxDisplay) + : nsBlockFrame(aContext, kClassID, LayoutFrameType::ComboboxDisplay) , mComboBox(aComboBox) {} diff --git a/layout/forms/nsDateTimeControlFrame.cpp b/layout/forms/nsDateTimeControlFrame.cpp index 6fffa50fe052..16ad0d1eb50e 100644 --- a/layout/forms/nsDateTimeControlFrame.cpp +++ b/layout/forms/nsDateTimeControlFrame.cpp @@ -43,7 +43,7 @@ NS_QUERYFRAME_HEAD(nsDateTimeControlFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) nsDateTimeControlFrame::nsDateTimeControlFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::DateTimeControl) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::DateTimeControl) { } diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index bef2f08ec7de..f930c2f0abf2 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -32,7 +32,7 @@ NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsFieldSetFrame) nsFieldSetFrame::nsFieldSetFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::FieldSet) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::FieldSet) , mLegendRect(GetWritingMode()) { mLegendSpace = 0; diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp index b2529e2658d0..a654b438e154 100644 --- a/layout/forms/nsFileControlFrame.cpp +++ b/layout/forms/nsFileControlFrame.cpp @@ -39,7 +39,7 @@ NS_NewFileControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsFileControlFrame) nsFileControlFrame::nsFileControlFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext) + : nsBlockFrame(aContext, kClassID) { AddStateBits(NS_BLOCK_FLOAT_MGR); } diff --git a/layout/forms/nsFormControlFrame.cpp b/layout/forms/nsFormControlFrame.cpp index 46be54becd76..c3ec2f8b24cc 100644 --- a/layout/forms/nsFormControlFrame.cpp +++ b/layout/forms/nsFormControlFrame.cpp @@ -17,8 +17,9 @@ using namespace mozilla; //#define FCF_NOISY -nsFormControlFrame::nsFormControlFrame(nsStyleContext* aContext) - : nsAtomicContainerFrame(aContext, LayoutFrameType::FormControl) +nsFormControlFrame::nsFormControlFrame(nsStyleContext* aContext, + nsIFrame::ClassID aID) + : nsAtomicContainerFrame(aContext, aID, LayoutFrameType::FormControl) { } diff --git a/layout/forms/nsFormControlFrame.h b/layout/forms/nsFormControlFrame.h index 890631426aaf..a5376c452277 100644 --- a/layout/forms/nsFormControlFrame.h +++ b/layout/forms/nsFormControlFrame.h @@ -25,7 +25,7 @@ public: * @param aContent the content representing this frame * @param aParentFrame the parent frame */ - explicit nsFormControlFrame(nsStyleContext*); + explicit nsFormControlFrame(nsStyleContext*, nsIFrame::ClassID); virtual bool IsFrameOfType(uint32_t aFlags) const override { diff --git a/layout/forms/nsGfxButtonControlFrame.cpp b/layout/forms/nsGfxButtonControlFrame.cpp index b225d920d297..df5a882755dc 100644 --- a/layout/forms/nsGfxButtonControlFrame.cpp +++ b/layout/forms/nsGfxButtonControlFrame.cpp @@ -19,7 +19,7 @@ using namespace mozilla; nsGfxButtonControlFrame::nsGfxButtonControlFrame(nsStyleContext* aContext) - : nsHTMLButtonControlFrame(aContext, LayoutFrameType::GfxButtonControl) + : nsHTMLButtonControlFrame(aContext, kClassID, LayoutFrameType::GfxButtonControl) { } diff --git a/layout/forms/nsGfxCheckboxControlFrame.cpp b/layout/forms/nsGfxCheckboxControlFrame.cpp index eb4b0fd15190..101e3a4adf30 100644 --- a/layout/forms/nsGfxCheckboxControlFrame.cpp +++ b/layout/forms/nsGfxCheckboxControlFrame.cpp @@ -92,7 +92,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsGfxCheckboxControlFrame) //------------------------------------------------------------ // Initialize GFX-rendered state nsGfxCheckboxControlFrame::nsGfxCheckboxControlFrame(nsStyleContext* aContext) -: nsFormControlFrame(aContext) +: nsFormControlFrame(aContext, kClassID) { } diff --git a/layout/forms/nsGfxRadioControlFrame.cpp b/layout/forms/nsGfxRadioControlFrame.cpp index 54654f0fcca8..a01bf492ab8a 100644 --- a/layout/forms/nsGfxRadioControlFrame.cpp +++ b/layout/forms/nsGfxRadioControlFrame.cpp @@ -25,7 +25,7 @@ NS_NewGfxRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsGfxRadioControlFrame) nsGfxRadioControlFrame::nsGfxRadioControlFrame(nsStyleContext* aContext): - nsFormControlFrame(aContext) + nsFormControlFrame(aContext, kClassID) { } diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index 15ce2ba5e09f..2d6c2d86001b 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -27,8 +27,9 @@ NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsHTMLButtonControlFrame) nsHTMLButtonControlFrame::nsHTMLButtonControlFrame(nsStyleContext* aContext, + nsIFrame::ClassID aID, LayoutFrameType aType) - : nsContainerFrame(aContext, aType) + : nsContainerFrame(aContext, aID, aType) { } diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index 09b262a28183..d5dd58ec5aa6 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -19,7 +19,7 @@ class nsHTMLButtonControlFrame : public nsContainerFrame, { public: explicit nsHTMLButtonControlFrame(nsStyleContext* aContext) - : nsHTMLButtonControlFrame(aContext, + : nsHTMLButtonControlFrame(aContext, kClassID, mozilla::LayoutFrameType::HTMLButtonControl) {} @@ -106,7 +106,7 @@ public: nsStyleChangeList& aChangeList, nsChangeHint aHintForThisFrame) override; protected: - nsHTMLButtonControlFrame(nsStyleContext* aContext, + nsHTMLButtonControlFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, mozilla::LayoutFrameType aType); virtual bool IsInput() { return false; } diff --git a/layout/forms/nsImageControlFrame.cpp b/layout/forms/nsImageControlFrame.cpp index b6f10820aedb..37806f242a71 100644 --- a/layout/forms/nsImageControlFrame.cpp +++ b/layout/forms/nsImageControlFrame.cpp @@ -58,7 +58,7 @@ public: }; nsImageControlFrame::nsImageControlFrame(nsStyleContext* aContext) - : nsImageFrame(aContext, LayoutFrameType::ImageControl) + : nsImageFrame(aContext, kClassID, LayoutFrameType::ImageControl) { } diff --git a/layout/forms/nsLegendFrame.h b/layout/forms/nsLegendFrame.h index 6b0911a9eb69..50bc4769a852 100644 --- a/layout/forms/nsLegendFrame.h +++ b/layout/forms/nsLegendFrame.h @@ -16,7 +16,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsLegendFrame) explicit nsLegendFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext, mozilla::LayoutFrameType::Legend) + : nsBlockFrame(aContext, kClassID, mozilla::LayoutFrameType::Legend) {} virtual void Reflow(nsPresContext* aPresContext, diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index bfc0866c5f9a..55682749fe6a 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -92,7 +92,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsListControlFrame) //--------------------------------------------------------- nsListControlFrame::nsListControlFrame(nsStyleContext* aContext) - : nsHTMLScrollFrame(aContext, LayoutFrameType::ListControl, false) + : nsHTMLScrollFrame(aContext, kClassID, LayoutFrameType::ListControl, false) , mView(nullptr) , mMightNeedSecondPass(false) , mHasPendingInterruptAtStartOfReflow(false) diff --git a/layout/forms/nsMeterFrame.cpp b/layout/forms/nsMeterFrame.cpp index 27387a274537..fc5f9c292c47 100644 --- a/layout/forms/nsMeterFrame.cpp +++ b/layout/forms/nsMeterFrame.cpp @@ -39,7 +39,7 @@ NS_NewMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsMeterFrame) nsMeterFrame::nsMeterFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::Meter) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::Meter) , mBarDiv(nullptr) { } diff --git a/layout/forms/nsNumberControlFrame.cpp b/layout/forms/nsNumberControlFrame.cpp index e17642410dc5..84eaf13531a0 100644 --- a/layout/forms/nsNumberControlFrame.cpp +++ b/layout/forms/nsNumberControlFrame.cpp @@ -50,7 +50,7 @@ NS_QUERYFRAME_HEAD(nsNumberControlFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) nsNumberControlFrame::nsNumberControlFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::NumberControl) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::NumberControl) , mHandlingInputEvent(false) { } diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp index e07e988639de..04fe62c91e1d 100644 --- a/layout/forms/nsProgressFrame.cpp +++ b/layout/forms/nsProgressFrame.cpp @@ -38,7 +38,7 @@ NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsProgressFrame) nsProgressFrame::nsProgressFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::Progress) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::Progress) , mBarDiv(nullptr) { } diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp index 25991be34d75..224d4017afa0 100644 --- a/layout/forms/nsRangeFrame.cpp +++ b/layout/forms/nsRangeFrame.cpp @@ -47,7 +47,7 @@ NS_NewRangeFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) } nsRangeFrame::nsRangeFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::Range) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::Range) { } diff --git a/layout/forms/nsSelectsAreaFrame.h b/layout/forms/nsSelectsAreaFrame.h index a0ab33e36c04..f190608c76f1 100644 --- a/layout/forms/nsSelectsAreaFrame.h +++ b/layout/forms/nsSelectsAreaFrame.h @@ -34,7 +34,7 @@ public: protected: explicit nsSelectsAreaFrame(nsStyleContext* aContext) : - nsBlockFrame(aContext), + nsBlockFrame(aContext, kClassID), mBSizeOfARow(0) {} diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index c2da2a07cff4..6e046fac1db9 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -103,7 +103,7 @@ private: #endif nsTextControlFrame::nsTextControlFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::TextInput) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::TextInput) , mFirstBaseline(NS_INTRINSIC_WIDTH_UNKNOWN) , mEditorHasBeenInitialized(false) , mIsProcessing(false) diff --git a/layout/generic/BRFrame.cpp b/layout/generic/BRFrame.cpp index 1644736bd606..89b50e127bbf 100644 --- a/layout/generic/BRFrame.cpp +++ b/layout/generic/BRFrame.cpp @@ -64,7 +64,7 @@ public: protected: explicit BRFrame(nsStyleContext* aContext) - : nsFrame(aContext, LayoutFrameType::Br) + : nsFrame(aContext, kClassID, LayoutFrameType::Br) , mAscent(NS_INTRINSIC_WIDTH_UNKNOWN) {} diff --git a/layout/generic/DetailsFrame.cpp b/layout/generic/DetailsFrame.cpp index faf541ef5b17..31b62362b919 100644 --- a/layout/generic/DetailsFrame.cpp +++ b/layout/generic/DetailsFrame.cpp @@ -31,7 +31,7 @@ NS_NewDetailsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) namespace mozilla { DetailsFrame::DetailsFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext, LayoutFrameType::Details) + : nsBlockFrame(aContext, kClassID, LayoutFrameType::Details) { } diff --git a/layout/generic/ViewportFrame.h b/layout/generic/ViewportFrame.h index d63edc5e009a..ed0cef19c289 100644 --- a/layout/generic/ViewportFrame.h +++ b/layout/generic/ViewportFrame.h @@ -29,7 +29,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(ViewportFrame) explicit ViewportFrame(nsStyleContext* aContext) - : ViewportFrame(aContext, mozilla::LayoutFrameType::Viewport) + : ViewportFrame(aContext, kClassID, mozilla::LayoutFrameType::Viewport) {} virtual ~ViewportFrame() { } // useful for debugging @@ -77,8 +77,8 @@ public: #endif protected: - ViewportFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aType) + ViewportFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) + : nsContainerFrame(aContext, aID, aType) , mView(nullptr) {} diff --git a/layout/generic/nsAtomicContainerFrame.h b/layout/generic/nsAtomicContainerFrame.h index 9e13094d4035..c3a09f1ec93a 100644 --- a/layout/generic/nsAtomicContainerFrame.h +++ b/layout/generic/nsAtomicContainerFrame.h @@ -40,9 +40,9 @@ public: } protected: - nsAtomicContainerFrame(nsStyleContext* aContext, + nsAtomicContainerFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aType) + : nsContainerFrame(aContext, aID, aType) {} }; diff --git a/layout/generic/nsBackdropFrame.h b/layout/generic/nsBackdropFrame.h index 1dad584de9c9..d678ad52f2d3 100644 --- a/layout/generic/nsBackdropFrame.h +++ b/layout/generic/nsBackdropFrame.h @@ -17,7 +17,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsBackdropFrame) explicit nsBackdropFrame(nsStyleContext* aContext) - : nsFrame(aContext, mozilla::LayoutFrameType::Backdrop) + : nsFrame(aContext, kClassID, mozilla::LayoutFrameType::Backdrop) {} #ifdef DEBUG_FRAME_DUMP diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index 1f533ad06ffa..ab63d18d1358 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -396,8 +396,8 @@ public: }; protected: - nsBlockFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aType) + nsBlockFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) + : nsContainerFrame(aContext, aID, aType) , mMinWidth(NS_INTRINSIC_WIDTH_UNKNOWN) , mPrefWidth(NS_INTRINSIC_WIDTH_UNKNOWN) { @@ -406,8 +406,8 @@ protected: #endif } - explicit nsBlockFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext, mozilla::LayoutFrameType::Block) + explicit nsBlockFrame(nsStyleContext* aContext, ClassID aID = kClassID) + : nsBlockFrame(aContext, aID, mozilla::LayoutFrameType::Block) {} virtual ~nsBlockFrame(); diff --git a/layout/generic/nsBulletFrame.h b/layout/generic/nsBulletFrame.h index 9bd4bdc18df3..ed7af572bbee 100644 --- a/layout/generic/nsBulletFrame.h +++ b/layout/generic/nsBulletFrame.h @@ -53,7 +53,7 @@ public: #endif explicit nsBulletFrame(nsStyleContext* aContext) - : nsFrame(aContext, mozilla::LayoutFrameType::Bullet) + : nsFrame(aContext, kClassID, mozilla::LayoutFrameType::Bullet) , mPadding(GetWritingMode()) , mIntrinsicSize(GetWritingMode()) , mOrdinal(0) diff --git a/layout/generic/nsCanvasFrame.h b/layout/generic/nsCanvasFrame.h index 530ca98c09f7..22740ca24098 100644 --- a/layout/generic/nsCanvasFrame.h +++ b/layout/generic/nsCanvasFrame.h @@ -34,7 +34,7 @@ class nsCanvasFrame final : public nsContainerFrame, { public: explicit nsCanvasFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::Canvas) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::Canvas) , mDoPaintFocus(false) , mAddedScrollPositionListener(false) {} diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index 480d975938e8..fda57d05b8f4 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -129,7 +129,7 @@ NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrame NS_IMPL_FRAMEARENA_HELPERS(nsColumnSetFrame) nsColumnSetFrame::nsColumnSetFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::ColumnSet) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::ColumnSet) , mLastBalanceBSize(NS_INTRINSICSIZE) { } diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index 7241fc8b0c1c..542932174ea1 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -534,8 +534,8 @@ public: #endif protected: - nsContainerFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsSplittableFrame(aContext, aType) + nsContainerFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) + : nsSplittableFrame(aContext, aID, aType) {} ~nsContainerFrame(); diff --git a/layout/generic/nsFirstLetterFrame.h b/layout/generic/nsFirstLetterFrame.h index aae8553014f0..64a252e27d5a 100644 --- a/layout/generic/nsFirstLetterFrame.h +++ b/layout/generic/nsFirstLetterFrame.h @@ -17,7 +17,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsFirstLetterFrame) explicit nsFirstLetterFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::Letter) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::Letter) {} virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, diff --git a/layout/generic/nsFlexContainerFrame.h b/layout/generic/nsFlexContainerFrame.h index 1e9585d72cd7..6aa17af5577a 100644 --- a/layout/generic/nsFlexContainerFrame.h +++ b/layout/generic/nsFlexContainerFrame.h @@ -132,7 +132,7 @@ public: protected: // Protected constructor & destructor explicit nsFlexContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::FlexContainer) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::FlexContainer) , mBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN) , mLastBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN) {} diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index b48149bc90cf..14be265b2e68 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -448,11 +448,11 @@ WeakFrame::Init(nsIFrame* aFrame) nsIFrame* NS_NewEmptyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { - return new (aPresShell) nsFrame(aContext, LayoutFrameType::None); + return new (aPresShell) nsFrame(aContext); } -nsFrame::nsFrame(nsStyleContext* aContext, LayoutFrameType aType) - : nsBox(aType) +nsFrame::nsFrame(nsStyleContext* aContext, ClassID aID, LayoutFrameType aType) + : nsBox(aID, aType) { MOZ_COUNT_CTOR(nsFrame); @@ -570,6 +570,7 @@ nsFrame::Init(nsIContent* aContent, nsContainerFrame* aParent, nsIFrame* aPrevInFlow) { + MOZ_ASSERT(nsQueryFrame::FrameIID(mClass) == GetFrameId()); NS_PRECONDITION(!mContent, "Double-initing a frame?"); NS_ASSERTION(IsFrameOfType(eDEBUGAllFrames) && !IsFrameOfType(eDEBUGNoFrames), diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index 559532f039fe..9f354a027f4a 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -92,6 +92,7 @@ #define NS_DECL_FRAMEARENA_HELPERS(class) \ NS_DECL_QUERYFRAME_TARGET(class) \ + static constexpr nsIFrame::ClassID kClassID = nsIFrame::ClassID::class##_id; \ void* operator new(size_t, nsIPresShell*) MOZ_MUST_OVERRIDE; \ nsQueryFrame::FrameIID GetFrameId() override MOZ_MUST_OVERRIDE { \ return nsQueryFrame::class##_id; \ @@ -583,7 +584,9 @@ public: protected: // Protected constructor and destructor - explicit nsFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType); + nsFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType); + explicit nsFrame(nsStyleContext* aContext) + : nsFrame(aContext, ClassID::nsFrame_id, mozilla::LayoutFrameType::None) {} virtual ~nsFrame(); /** diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index 88b097bc3151..85c05e8a1bc6 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -158,7 +158,7 @@ public: protected: explicit nsHTMLFramesetBlankFrame(nsStyleContext* aContext) - : nsLeafFrame(aContext, LayoutFrameType::None) + : nsLeafFrame(aContext, kClassID, LayoutFrameType::None) {} virtual ~nsHTMLFramesetBlankFrame(); @@ -176,7 +176,7 @@ bool nsHTMLFramesetFrame::gDragInProgress = false; #define DEFAULT_BORDER_WIDTH_PX 6 nsHTMLFramesetFrame::nsHTMLFramesetFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::FrameSet) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::FrameSet) { mNumRows = 0; mNumCols = 0; @@ -1336,7 +1336,7 @@ nsHTMLFramesetBorderFrame::nsHTMLFramesetBorderFrame(nsStyleContext* aContext, int32_t aWidth, bool aVertical, bool aVisibility) - : nsLeafFrame(aContext, LayoutFrameType::None) + : nsLeafFrame(aContext, kClassID, LayoutFrameType::None) , mWidth(aWidth) , mVertical(aVertical) , mVisibility(aVisibility) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 90c6284f00fa..5de45ad50bbf 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -110,9 +110,10 @@ NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool a NS_IMPL_FRAMEARENA_HELPERS(nsHTMLScrollFrame) nsHTMLScrollFrame::nsHTMLScrollFrame(nsStyleContext* aContext, + nsIFrame::ClassID aID, LayoutFrameType aType, bool aIsRoot) - : nsContainerFrame(aContext, aType) + : nsContainerFrame(aContext, aID, aType) , mHelper(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot) { } @@ -1161,7 +1162,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsXULScrollFrame) nsXULScrollFrame::nsXULScrollFrame(nsStyleContext* aContext, bool aIsRoot, bool aClipAllDescendants) - : nsBoxFrame(aContext, LayoutFrameType::Scroll, aIsRoot) + : nsBoxFrame(aContext, kClassID, LayoutFrameType::Scroll, aIsRoot) , mHelper(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot) { SetXULLayoutManager(nullptr); diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index a5eeca49926c..cf7e5aaa64a2 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -1060,10 +1060,11 @@ public: protected: nsHTMLScrollFrame(nsStyleContext* aContext, bool aIsRoot) - : nsHTMLScrollFrame(aContext, mozilla::LayoutFrameType::Scroll, aIsRoot) + : nsHTMLScrollFrame(aContext, kClassID, mozilla::LayoutFrameType::Scroll, aIsRoot) {} nsHTMLScrollFrame(nsStyleContext* aContext, + nsIFrame::ClassID aID, mozilla::LayoutFrameType aType, bool aIsRoot); void SetSuppressScrollbarUpdate(bool aSuppress) { diff --git a/layout/generic/nsGridContainerFrame.h b/layout/generic/nsGridContainerFrame.h index e85907cf9fda..ffdc4887bd0d 100644 --- a/layout/generic/nsGridContainerFrame.h +++ b/layout/generic/nsGridContainerFrame.h @@ -257,7 +257,7 @@ protected: friend nsContainerFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); explicit nsGridContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::GridContainer) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::GridContainer) , mCachedMinISize(NS_INTRINSIC_WIDTH_UNKNOWN) , mCachedPrefISize(NS_INTRINSIC_WIDTH_UNKNOWN) { diff --git a/layout/generic/nsHTMLCanvasFrame.h b/layout/generic/nsHTMLCanvasFrame.h index 8bac0bb73cbe..9182a51b562c 100644 --- a/layout/generic/nsHTMLCanvasFrame.h +++ b/layout/generic/nsHTMLCanvasFrame.h @@ -36,7 +36,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsHTMLCanvasFrame) explicit nsHTMLCanvasFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::HTMLCanvas) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::HTMLCanvas) , mBorderPadding(GetWritingMode()) {} diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index f97963244444..5c346ada6b00 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -603,10 +603,11 @@ public: typedef mozilla::Sides Sides; typedef mozilla::LogicalSides LogicalSides; typedef mozilla::SmallPointerArray DisplayItemArray; + typedef nsQueryFrame::ClassID ClassID; NS_DECL_QUERYFRAME_TARGET(nsIFrame) - explicit nsIFrame(mozilla::LayoutFrameType aType) + explicit nsIFrame(ClassID aID, mozilla::LayoutFrameType aType) : mRect() , mContent(nullptr) , mStyleContext(nullptr) @@ -615,6 +616,7 @@ public: , mPrevSibling(nullptr) , mState(NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_DIRTY) , mType(aType) + , mClass(aID) { mozilla::PodZero(&mOverflow); } @@ -3902,6 +3904,9 @@ protected: /** The type of the frame. */ mozilla::LayoutFrameType mType; + /** The ClassID of the concrete class of this instance. */ + ClassID mClass; // 1 byte + // Helpers /** * Can we stop inside this frame when we're skipping non-rendered whitespace? diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 4745598f2432..0ff7ed3f113d 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -135,8 +135,8 @@ NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsImageFrame) -nsImageFrame::nsImageFrame(nsStyleContext* aContext, LayoutFrameType aType) - : nsAtomicContainerFrame(aContext, aType) +nsImageFrame::nsImageFrame(nsStyleContext* aContext, ClassID aID, LayoutFrameType aType) + : nsAtomicContainerFrame(aContext, aID, aType) , mComputedSize(0, 0) , mIntrinsicRatio(0, 0) , mDisplayingIcon(false) diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index 3a1e76ef51d6..d11555716a1b 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -72,8 +72,8 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsImageFrame) NS_DECL_QUERYFRAME - explicit nsImageFrame(nsStyleContext* aContext) - : nsImageFrame(aContext, mozilla::LayoutFrameType::Image) + explicit nsImageFrame(nsStyleContext* aContext, ClassID aID = kClassID) + : nsImageFrame(aContext, aID, mozilla::LayoutFrameType::Image) {} @@ -182,7 +182,7 @@ public: virtual void ReflowCallbackCanceled() override; protected: - nsImageFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType); + nsImageFrame(nsStyleContext* aContext, ClassID, mozilla::LayoutFrameType aType); virtual ~nsImageFrame(); diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index 8693b7a0cafb..b2f424881ab6 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -140,13 +140,13 @@ protected: } }; - nsInlineFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aType) + nsInlineFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) + : nsContainerFrame(aContext, aID, aType) , mBaseline(NS_INTRINSIC_WIDTH_UNKNOWN) {} - explicit nsInlineFrame(nsStyleContext* aContext) - : nsInlineFrame(aContext, mozilla::LayoutFrameType::Inline) + explicit nsInlineFrame(nsStyleContext* aContext, ClassID aID = kClassID) + : nsInlineFrame(aContext, aID, mozilla::LayoutFrameType::Inline) {} virtual LogicalSides GetLogicalSkipSides(const ReflowInput* aReflowInput = nullptr) const override; @@ -232,7 +232,7 @@ public: protected: explicit nsFirstLineFrame(nsStyleContext* aContext) - : nsInlineFrame(aContext, mozilla::LayoutFrameType::Line) + : nsInlineFrame(aContext, kClassID, mozilla::LayoutFrameType::Line) {} virtual nsIFrame* PullOneFrame(nsPresContext* aPresContext, diff --git a/layout/generic/nsLeafFrame.h b/layout/generic/nsLeafFrame.h index 93a27c42d992..b99ee1e6787c 100644 --- a/layout/generic/nsLeafFrame.h +++ b/layout/generic/nsLeafFrame.h @@ -77,8 +77,8 @@ public: } protected: - nsLeafFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsFrame(aContext, aType) + nsLeafFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) + : nsFrame(aContext, aID, aType) {} virtual ~nsLeafFrame(); diff --git a/layout/generic/nsPageContentFrame.h b/layout/generic/nsPageContentFrame.h index 8daa356236b0..b53edf829f26 100644 --- a/layout/generic/nsPageContentFrame.h +++ b/layout/generic/nsPageContentFrame.h @@ -44,7 +44,7 @@ public: protected: explicit nsPageContentFrame(nsStyleContext* aContext) - : ViewportFrame(aContext, mozilla::LayoutFrameType::PageContent) + : ViewportFrame(aContext, kClassID, mozilla::LayoutFrameType::PageContent) {} nsSharedPageData* mPD; diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp index 2752c848b852..65d2dd01a899 100644 --- a/layout/generic/nsPageFrame.cpp +++ b/layout/generic/nsPageFrame.cpp @@ -41,7 +41,7 @@ NS_QUERYFRAME_HEAD(nsPageFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) nsPageFrame::nsPageFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::Page) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::Page) { } @@ -682,7 +682,7 @@ NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsPageBreakFrame) nsPageBreakFrame::nsPageBreakFrame(nsStyleContext* aContext) - : nsLeafFrame(aContext, LayoutFrameType::PageBreak) + : nsLeafFrame(aContext, kClassID, LayoutFrameType::PageBreak) , mHaveReflowed(false) { } diff --git a/layout/generic/nsPlaceholderFrame.h b/layout/generic/nsPlaceholderFrame.h index 8c86e665ee7d..a8764ba6ea63 100644 --- a/layout/generic/nsPlaceholderFrame.h +++ b/layout/generic/nsPlaceholderFrame.h @@ -67,7 +67,7 @@ public: nsStyleContext* aContext, nsFrameState aTypeBit); nsPlaceholderFrame(nsStyleContext* aContext, nsFrameState aTypeBit) - : nsFrame(aContext, mozilla::LayoutFrameType::Placeholder) + : nsFrame(aContext, kClassID, mozilla::LayoutFrameType::Placeholder) , mOutOfFlowFrame(nullptr) { NS_PRECONDITION(aTypeBit == PLACEHOLDER_FOR_FLOAT || diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp index e194d94698a9..04b303083b8d 100644 --- a/layout/generic/nsPluginFrame.cpp +++ b/layout/generic/nsPluginFrame.cpp @@ -145,7 +145,7 @@ protected: }; nsPluginFrame::nsPluginFrame(nsStyleContext* aContext) - : nsFrame(aContext, LayoutFrameType::Object) + : nsFrame(aContext, kClassID, LayoutFrameType::Object) , mInstanceOwner(nullptr) , mOuterView(nullptr) , mInnerView(nullptr) diff --git a/layout/generic/nsQueryFrame.h b/layout/generic/nsQueryFrame.h index 9a49a3e447e6..7122da4511e1 100644 --- a/layout/generic/nsQueryFrame.h +++ b/layout/generic/nsQueryFrame.h @@ -68,6 +68,15 @@ public: NON_FRAME_MARKER }; + // A strict subset of FrameIID above for frame classes that we instantiate. + enum class ClassID : uint8_t { +#define FRAME_ID(classname, ...) classname##_id, +#define ABSTRACT_FRAME_ID(classname) +#include "nsFrameIdList.h" +#undef FRAME_ID +#undef ABSTRACT_FRAME_ID + }; + virtual void* QueryFrame(FrameIID id) = 0; }; diff --git a/layout/generic/nsRubyBaseContainerFrame.h b/layout/generic/nsRubyBaseContainerFrame.h index 48208be6f562..13b5330cdbd9 100644 --- a/layout/generic/nsRubyBaseContainerFrame.h +++ b/layout/generic/nsRubyBaseContainerFrame.h @@ -66,7 +66,7 @@ protected: nsStyleContext* aContext); explicit nsRubyBaseContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::RubyBaseContainer) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyBaseContainer) {} struct RubyReflowInput; diff --git a/layout/generic/nsRubyBaseFrame.h b/layout/generic/nsRubyBaseFrame.h index c6451302b313..404833cfaa03 100644 --- a/layout/generic/nsRubyBaseFrame.h +++ b/layout/generic/nsRubyBaseFrame.h @@ -32,7 +32,7 @@ protected: friend nsContainerFrame* NS_NewRubyBaseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); explicit nsRubyBaseFrame(nsStyleContext* aContext) - : nsRubyContentFrame(aContext, mozilla::LayoutFrameType::RubyBase) + : nsRubyContentFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyBase) {} }; diff --git a/layout/generic/nsRubyContentFrame.h b/layout/generic/nsRubyContentFrame.h index 3bd3f03cedb3..6c445b44dba8 100644 --- a/layout/generic/nsRubyContentFrame.h +++ b/layout/generic/nsRubyContentFrame.h @@ -28,8 +28,9 @@ public: protected: explicit nsRubyContentFrame(nsStyleContext* aContext, + ClassID aID, mozilla::LayoutFrameType aType) - : nsInlineFrame(aContext, aType) + : nsInlineFrame(aContext, aID, aType) {} }; diff --git a/layout/generic/nsRubyFrame.h b/layout/generic/nsRubyFrame.h index be729e384588..60cc730b4b63 100644 --- a/layout/generic/nsRubyFrame.h +++ b/layout/generic/nsRubyFrame.h @@ -48,7 +48,7 @@ protected: friend nsContainerFrame* NS_NewRubyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); explicit nsRubyFrame(nsStyleContext* aContext) - : nsInlineFrame(aContext, mozilla::LayoutFrameType::Ruby) + : nsInlineFrame(aContext, kClassID, mozilla::LayoutFrameType::Ruby) {} void ReflowSegment(nsPresContext* aPresContext, diff --git a/layout/generic/nsRubyTextContainerFrame.h b/layout/generic/nsRubyTextContainerFrame.h index 69621e3dbedf..2a86d39a8606 100644 --- a/layout/generic/nsRubyTextContainerFrame.h +++ b/layout/generic/nsRubyTextContainerFrame.h @@ -56,7 +56,7 @@ protected: nsStyleContext* aContext); explicit nsRubyTextContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::RubyTextContainer) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyTextContainer) , mISize(0) {} diff --git a/layout/generic/nsRubyTextFrame.h b/layout/generic/nsRubyTextFrame.h index 2dee03baadc9..30c1f944283b 100644 --- a/layout/generic/nsRubyTextFrame.h +++ b/layout/generic/nsRubyTextFrame.h @@ -49,7 +49,7 @@ protected: friend nsContainerFrame* NS_NewRubyTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); explicit nsRubyTextFrame(nsStyleContext* aContext) - : nsRubyContentFrame(aContext, mozilla::LayoutFrameType::RubyText) + : nsRubyContentFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyText) {} }; diff --git a/layout/generic/nsSimplePageSequenceFrame.cpp b/layout/generic/nsSimplePageSequenceFrame.cpp index ed3e3507540a..0da38322495b 100644 --- a/layout/generic/nsSimplePageSequenceFrame.cpp +++ b/layout/generic/nsSimplePageSequenceFrame.cpp @@ -45,7 +45,7 @@ NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext NS_IMPL_FRAMEARENA_HELPERS(nsSimplePageSequenceFrame) nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::Sequence) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::Sequence) , mTotalPages(-1) , mSelectionHeight(-1) , mYSelOffset(0) diff --git a/layout/generic/nsSplittableFrame.h b/layout/generic/nsSplittableFrame.h index c8b05fc16248..4718be862bc4 100644 --- a/layout/generic/nsSplittableFrame.h +++ b/layout/generic/nsSplittableFrame.h @@ -74,9 +74,9 @@ public: static void RemoveFromFlow(nsIFrame* aFrame); protected: - explicit nsSplittableFrame(nsStyleContext* aContext, + explicit nsSplittableFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsFrame(aContext, aType) + : nsFrame(aContext, aID, aType) , mPrevContinuation(nullptr) , mNextContinuation(nullptr) {} diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index e573c28a6cd0..2727e52dcc8d 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -59,7 +59,7 @@ GetDocumentFromView(nsView* aView) } nsSubDocumentFrame::nsSubDocumentFrame(nsStyleContext* aContext) - : nsAtomicContainerFrame(aContext, LayoutFrameType::SubDocument) + : nsAtomicContainerFrame(aContext, kClassID, LayoutFrameType::SubDocument) , mOuterView(nullptr) , mInnerView(nullptr) , mIsInline(false) diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index f8c176edf960..0872403b1c63 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -4437,7 +4437,7 @@ public: protected: explicit nsContinuingTextFrame(nsStyleContext* aContext) - : nsTextFrame(aContext) + : nsTextFrame(aContext, kClassID) {} nsTextFrame* mPrevContinuation; diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 825ce8fec27d..6ff5e1f9c0d6 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -50,8 +50,8 @@ class nsTextFrame : public nsFrame typedef gfxTextRun::Range Range; public: - explicit nsTextFrame(nsStyleContext* aContext) - : nsTextFrame(aContext, mozilla::LayoutFrameType::Text) + explicit nsTextFrame(nsStyleContext* aContext, ClassID aID = kClassID) + : nsTextFrame(aContext, aID, mozilla::LayoutFrameType::Text) {} NS_DECL_FRAMEARENA_HELPERS(nsTextFrame) @@ -648,8 +648,8 @@ public: uint32_t CountGraphemeClusters() const; protected: - nsTextFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsFrame(aContext, aType) + nsTextFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) + : nsFrame(aContext, aID, aType) , mNextContinuation(nullptr) , mContentOffset(0) , mContentLengthHint(0) diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 84371f9b702d..8f625b58eb4b 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -75,7 +75,7 @@ SwapScaleWidthHeightForRotation(IntSize& aSize, VideoInfo::Rotation aDegrees) } nsVideoFrame::nsVideoFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::HTMLVideo) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::HTMLVideo) { EnableVisibilityTracking(); } diff --git a/layout/mathml/nsMathMLContainerFrame.h b/layout/mathml/nsMathMLContainerFrame.h index 3c520812a92e..2068d8776961 100644 --- a/layout/mathml/nsMathMLContainerFrame.h +++ b/layout/mathml/nsMathMLContainerFrame.h @@ -32,8 +32,8 @@ class nsMathMLContainerFrame : public nsContainerFrame, { friend class nsMathMLmfencedFrame; public: - nsMathMLContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::None) + nsMathMLContainerFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID, mozilla::LayoutFrameType::None) , mIntrinsicWidth(NS_INTRINSIC_WIDTH_UNKNOWN) , mBlockStartAscent(0) {} @@ -469,7 +469,9 @@ public: } protected: - explicit nsMathMLmathBlockFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) { + explicit nsMathMLmathBlockFrame(nsStyleContext* aContext) + : nsBlockFrame(aContext, kClassID) + { // We should always have a float manager. Not that things can really try // to float out of us anyway, but we need one for line layout. // Bug 1301881: Do we still need to set NS_BLOCK_FLOAT_MGR? @@ -546,7 +548,7 @@ public: protected: explicit nsMathMLmathInlineFrame(nsStyleContext* aContext) - : nsInlineFrame(aContext) + : nsInlineFrame(aContext, kClassID) {} virtual ~nsMathMLmathInlineFrame() {} diff --git a/layout/mathml/nsMathMLSelectedFrame.h b/layout/mathml/nsMathMLSelectedFrame.h index e05b5e3d0be3..b1c6d67c16fd 100644 --- a/layout/mathml/nsMathMLSelectedFrame.h +++ b/layout/mathml/nsMathMLSelectedFrame.h @@ -48,8 +48,8 @@ public: virtual nsQueryFrame::FrameIID GetFrameId() override = 0; protected: - explicit nsMathMLSelectedFrame(nsStyleContext* aContext) : - nsMathMLContainerFrame(aContext), + nsMathMLSelectedFrame(nsStyleContext* aContext, ClassID aID) : + nsMathMLContainerFrame(aContext, aID), mSelectedFrame(nullptr), mInvalidMarkup(false) {} virtual ~nsMathMLSelectedFrame(); diff --git a/layout/mathml/nsMathMLTokenFrame.h b/layout/mathml/nsMathMLTokenFrame.h index 436caaeb1af8..d80b11f93daa 100644 --- a/layout/mathml/nsMathMLTokenFrame.h +++ b/layout/mathml/nsMathMLTokenFrame.h @@ -59,7 +59,8 @@ public: ReflowOutput& aDesiredSize) override; protected: - explicit nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {} + explicit nsMathMLTokenFrame(nsStyleContext* aContext, ClassID aID = kClassID) + : nsMathMLContainerFrame(aContext, aID) {} virtual ~nsMathMLTokenFrame(); void MarkTextFramesAsTokenMathML(); diff --git a/layout/mathml/nsMathMLmactionFrame.h b/layout/mathml/nsMathMLmactionFrame.h index b576b5548c4d..22440e9930c5 100644 --- a/layout/mathml/nsMathMLmactionFrame.h +++ b/layout/mathml/nsMathMLmactionFrame.h @@ -59,7 +59,7 @@ private: protected: explicit nsMathMLmactionFrame(nsStyleContext* aContext) : - nsMathMLSelectedFrame(aContext) {} + nsMathMLSelectedFrame(aContext, kClassID) {} virtual ~nsMathMLmactionFrame(); private: diff --git a/layout/mathml/nsMathMLmencloseFrame.cpp b/layout/mathml/nsMathMLmencloseFrame.cpp index fd069259f89d..8a96b8cd2690 100644 --- a/layout/mathml/nsMathMLmencloseFrame.cpp +++ b/layout/mathml/nsMathMLmencloseFrame.cpp @@ -47,8 +47,8 @@ NS_NewMathMLmencloseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmencloseFrame) -nsMathMLmencloseFrame::nsMathMLmencloseFrame(nsStyleContext* aContext) : - nsMathMLContainerFrame(aContext), mNotationsToDraw(0), +nsMathMLmencloseFrame::nsMathMLmencloseFrame(nsStyleContext* aContext, ClassID aID) : + nsMathMLContainerFrame(aContext, aID), mNotationsToDraw(0), mRuleThickness(0), mRadicalRuleThickness(0), mLongDivCharIndex(-1), mRadicalCharIndex(-1), mContentWidth(0) { diff --git a/layout/mathml/nsMathMLmencloseFrame.h b/layout/mathml/nsMathMLmencloseFrame.h index 8ae470ba4f93..4c5591660479 100644 --- a/layout/mathml/nsMathMLmencloseFrame.h +++ b/layout/mathml/nsMathMLmencloseFrame.h @@ -89,7 +89,7 @@ public: } protected: - explicit nsMathMLmencloseFrame(nsStyleContext* aContext); + explicit nsMathMLmencloseFrame(nsStyleContext* aContext, ClassID aID = kClassID); virtual ~nsMathMLmencloseFrame(); nsresult PlaceInternal(DrawTarget* aDrawTarget, diff --git a/layout/mathml/nsMathMLmfencedFrame.h b/layout/mathml/nsMathMLmfencedFrame.h index c37ede3dbd5f..3c6c07f0f72b 100644 --- a/layout/mathml/nsMathMLmfencedFrame.h +++ b/layout/mathml/nsMathMLmfencedFrame.h @@ -97,7 +97,7 @@ public: protected: explicit nsMathMLmfencedFrame(nsStyleContext* aContext) - : nsMathMLContainerFrame(aContext) + : nsMathMLContainerFrame(aContext, kClassID) , mOpenChar(nullptr) , mCloseChar(nullptr) , mSeparatorsChar(nullptr) diff --git a/layout/mathml/nsMathMLmfracFrame.h b/layout/mathml/nsMathMLmfracFrame.h index ef4a6fc09715..8e46bb2db360 100644 --- a/layout/mathml/nsMathMLmfracFrame.h +++ b/layout/mathml/nsMathMLmfracFrame.h @@ -96,7 +96,7 @@ public: protected: explicit nsMathMLmfracFrame(nsStyleContext* aContext) - : nsMathMLContainerFrame(aContext) + : nsMathMLContainerFrame(aContext, kClassID) , mLineRect() , mSlashChar(nullptr) , mLineThickness(0) diff --git a/layout/mathml/nsMathMLmmultiscriptsFrame.h b/layout/mathml/nsMathMLmmultiscriptsFrame.h index f0ab5659136c..bee5a1e32c6b 100644 --- a/layout/mathml/nsMathMLmmultiscriptsFrame.h +++ b/layout/mathml/nsMathMLmmultiscriptsFrame.h @@ -44,7 +44,8 @@ public: ScriptIncrement(nsIFrame* aFrame) override; protected: - explicit nsMathMLmmultiscriptsFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {} + explicit nsMathMLmmultiscriptsFrame(nsStyleContext* aContext) + : nsMathMLContainerFrame(aContext, kClassID) {} virtual ~nsMathMLmmultiscriptsFrame(); diff --git a/layout/mathml/nsMathMLmoFrame.h b/layout/mathml/nsMathMLmoFrame.h index 2473e4baa553..481776d58ada 100644 --- a/layout/mathml/nsMathMLmoFrame.h +++ b/layout/mathml/nsMathMLmoFrame.h @@ -81,7 +81,7 @@ public: protected: explicit nsMathMLmoFrame(nsStyleContext* aContext) : - nsMathMLTokenFrame(aContext), mFlags(0), mMinSize(0), mMaxSize(0) {} + nsMathMLTokenFrame(aContext, kClassID), mFlags(0), mMinSize(0), mMaxSize(0) {} virtual ~nsMathMLmoFrame(); nsMathMLChar mMathMLChar; // Here is the MathMLChar that will deal with the operator. diff --git a/layout/mathml/nsMathMLmpaddedFrame.h b/layout/mathml/nsMathMLmpaddedFrame.h index 3102f9d87cfe..629bf3cd56b8 100644 --- a/layout/mathml/nsMathMLmpaddedFrame.h +++ b/layout/mathml/nsMathMLmpaddedFrame.h @@ -46,7 +46,7 @@ public: protected: explicit nsMathMLmpaddedFrame(nsStyleContext* aContext) - : nsMathMLContainerFrame(aContext) + : nsMathMLContainerFrame(aContext, kClassID) , mWidthSign(0) , mHeightSign(0) , mDepthSign(0) diff --git a/layout/mathml/nsMathMLmrootFrame.cpp b/layout/mathml/nsMathMLmrootFrame.cpp index fea24e00209f..f5516db1e5a2 100644 --- a/layout/mathml/nsMathMLmrootFrame.cpp +++ b/layout/mathml/nsMathMLmrootFrame.cpp @@ -29,7 +29,7 @@ NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmrootFrame) nsMathMLmrootFrame::nsMathMLmrootFrame(nsStyleContext* aContext) : - nsMathMLContainerFrame(aContext), + nsMathMLContainerFrame(aContext, kClassID), mSqrChar(), mBarRect() { diff --git a/layout/mathml/nsMathMLmrowFrame.h b/layout/mathml/nsMathMLmrowFrame.h index 118d3cd8579e..fbc747580153 100644 --- a/layout/mathml/nsMathMLmrowFrame.h +++ b/layout/mathml/nsMathMLmrowFrame.h @@ -47,7 +47,8 @@ public: } protected: - explicit nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {} + explicit nsMathMLmrowFrame(nsStyleContext* aContext) + : nsMathMLContainerFrame(aContext, kClassID) {} virtual ~nsMathMLmrowFrame(); }; diff --git a/layout/mathml/nsMathMLmspaceFrame.h b/layout/mathml/nsMathMLmspaceFrame.h index 0bca9f5ebbf6..361632876d7a 100644 --- a/layout/mathml/nsMathMLmspaceFrame.h +++ b/layout/mathml/nsMathMLmspaceFrame.h @@ -37,7 +37,7 @@ public: protected: explicit nsMathMLmspaceFrame(nsStyleContext* aContext) : - nsMathMLContainerFrame(aContext), mWidth(0), mHeight(0), mDepth(0) {} + nsMathMLContainerFrame(aContext, kClassID), mWidth(0), mHeight(0), mDepth(0) {} virtual ~nsMathMLmspaceFrame(); virtual nsresult diff --git a/layout/mathml/nsMathMLmsqrtFrame.cpp b/layout/mathml/nsMathMLmsqrtFrame.cpp index 096d5476935a..deb77ee408b8 100644 --- a/layout/mathml/nsMathMLmsqrtFrame.cpp +++ b/layout/mathml/nsMathMLmsqrtFrame.cpp @@ -19,7 +19,7 @@ NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsqrtFrame) nsMathMLmsqrtFrame::nsMathMLmsqrtFrame(nsStyleContext* aContext) : - nsMathMLmencloseFrame(aContext) + nsMathMLmencloseFrame(aContext, kClassID) { } diff --git a/layout/mathml/nsMathMLmtableFrame.cpp b/layout/mathml/nsMathMLmtableFrame.cpp index 4e7df59a4075..e56dd2c43177 100644 --- a/layout/mathml/nsMathMLmtableFrame.cpp +++ b/layout/mathml/nsMathMLmtableFrame.cpp @@ -1305,7 +1305,7 @@ NS_NewMathMLmtdInnerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtdInnerFrame) nsMathMLmtdInnerFrame::nsMathMLmtdInnerFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext) + : nsBlockFrame(aContext, kClassID) { // Make a copy of the parent nsStyleText for later modification. mUniqueStyleText = new (PresContext()) nsStyleText(*StyleText()); diff --git a/layout/mathml/nsMathMLmtableFrame.h b/layout/mathml/nsMathMLmtableFrame.h index 262cf1c14956..2b0a3cae3274 100644 --- a/layout/mathml/nsMathMLmtableFrame.h +++ b/layout/mathml/nsMathMLmtableFrame.h @@ -49,7 +49,7 @@ public: protected: explicit nsMathMLmtableWrapperFrame(nsStyleContext* aContext) - : nsTableWrapperFrame(aContext) + : nsTableWrapperFrame(aContext, kClassID) {} virtual ~nsMathMLmtableWrapperFrame(); @@ -157,7 +157,7 @@ public: protected: explicit nsMathMLmtableFrame(nsStyleContext* aContext) - : nsTableFrame(aContext) + : nsTableFrame(aContext, kClassID) , mFrameSpacingX(0) , mFrameSpacingY(0) , mUseCSSSpacing(false) @@ -232,7 +232,7 @@ public: protected: explicit nsMathMLmtrFrame(nsStyleContext* aContext) - : nsTableRowFrame(aContext) + : nsTableRowFrame(aContext, kClassID) {} virtual ~nsMathMLmtrFrame(); @@ -279,7 +279,7 @@ public: protected: nsMathMLmtdFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame) - : nsTableCellFrame(aContext, aTableFrame) + : nsTableCellFrame(aContext, aTableFrame, kClassID) { } diff --git a/layout/mathml/nsMathMLmunderoverFrame.h b/layout/mathml/nsMathMLmunderoverFrame.h index e2875e2b77c3..375c26b4da9a 100644 --- a/layout/mathml/nsMathMLmunderoverFrame.h +++ b/layout/mathml/nsMathMLmunderoverFrame.h @@ -49,7 +49,7 @@ public: protected: explicit nsMathMLmunderoverFrame(nsStyleContext* aContext) - : nsMathMLContainerFrame(aContext) + : nsMathMLContainerFrame(aContext, kClassID) , mIncrementUnder(false) , mIncrementOver(false) {} diff --git a/layout/mathml/nsMathMLsemanticsFrame.h b/layout/mathml/nsMathMLsemanticsFrame.h index 1944c12a3d76..a7fb16e364d2 100644 --- a/layout/mathml/nsMathMLsemanticsFrame.h +++ b/layout/mathml/nsMathMLsemanticsFrame.h @@ -22,7 +22,7 @@ public: protected: explicit nsMathMLsemanticsFrame(nsStyleContext* aContext) : - nsMathMLSelectedFrame(aContext) {} + nsMathMLSelectedFrame(aContext, kClassID) {} virtual ~nsMathMLsemanticsFrame(); nsIFrame* GetSelectedFrame() override; diff --git a/layout/svg/SVGFEContainerFrame.cpp b/layout/svg/SVGFEContainerFrame.cpp index 2a48abba39b1..1a1bff533ead 100644 --- a/layout/svg/SVGFEContainerFrame.cpp +++ b/layout/svg/SVGFEContainerFrame.cpp @@ -21,7 +21,7 @@ class SVGFEContainerFrame : public nsContainerFrame NS_NewSVGFEContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit SVGFEContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::SVGFEContainer) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGFEContainer) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/SVGFEImageFrame.cpp b/layout/svg/SVGFEImageFrame.cpp index 457c86145212..f5109139199f 100644 --- a/layout/svg/SVGFEImageFrame.cpp +++ b/layout/svg/SVGFEImageFrame.cpp @@ -23,7 +23,7 @@ class SVGFEImageFrame final : public nsFrame NS_NewSVGFEImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit SVGFEImageFrame(nsStyleContext* aContext) - : nsFrame(aContext, LayoutFrameType::SVGFEImage) + : nsFrame(aContext, kClassID, LayoutFrameType::SVGFEImage) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); diff --git a/layout/svg/SVGFELeafFrame.cpp b/layout/svg/SVGFELeafFrame.cpp index d16fc03f9372..06be20aa2c36 100644 --- a/layout/svg/SVGFELeafFrame.cpp +++ b/layout/svg/SVGFELeafFrame.cpp @@ -20,7 +20,7 @@ class SVGFELeafFrame final : public nsFrame NS_NewSVGFELeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit SVGFELeafFrame(nsStyleContext* aContext) - : nsFrame(aContext, LayoutFrameType::SVGFELeaf) + : nsFrame(aContext, kClassID, LayoutFrameType::SVGFELeaf) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/SVGFEUnstyledLeafFrame.cpp b/layout/svg/SVGFEUnstyledLeafFrame.cpp index 89d8cf567ac2..ac9ad75b6e6b 100644 --- a/layout/svg/SVGFEUnstyledLeafFrame.cpp +++ b/layout/svg/SVGFEUnstyledLeafFrame.cpp @@ -16,7 +16,7 @@ class SVGFEUnstyledLeafFrame : public nsFrame NS_NewSVGFEUnstyledLeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit SVGFEUnstyledLeafFrame(nsStyleContext* aContext) - : nsFrame(aContext, LayoutFrameType::SVGFEUnstyledLeaf) + : nsFrame(aContext, kClassID, LayoutFrameType::SVGFEUnstyledLeaf) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/SVGGeometryFrame.h b/layout/svg/SVGGeometryFrame.h index b3c1fce4fd07..9b9f381c2a93 100644 --- a/layout/svg/SVGGeometryFrame.h +++ b/layout/svg/SVGGeometryFrame.h @@ -49,14 +49,14 @@ class SVGGeometryFrame : public nsFrame friend class ::nsDisplaySVGGeometry; protected: - SVGGeometryFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsFrame(aContext, aType) + SVGGeometryFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, mozilla::LayoutFrameType aType) + : nsFrame(aContext, aID, aType) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_MAY_BE_TRANSFORMED); } explicit SVGGeometryFrame(nsStyleContext* aContext) - : SVGGeometryFrame(aContext, mozilla::LayoutFrameType::SVGGeometry) + : SVGGeometryFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGGeometry) {} public: diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h index 0dc347bc92c2..861afbfc3283 100644 --- a/layout/svg/SVGTextFrame.h +++ b/layout/svg/SVGTextFrame.h @@ -193,7 +193,7 @@ class SVGTextFrame final : public nsSVGDisplayContainerFrame protected: explicit SVGTextFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, mozilla::LayoutFrameType::SVGText) + : nsSVGDisplayContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGText) , mTrailingUndisplayedCharacters(0) , mFontSizeScaleFactor(1.0f) , mLastContextScale(1.0f) diff --git a/layout/svg/SVGViewFrame.cpp b/layout/svg/SVGViewFrame.cpp index 97e99d70427f..c10f0c0b8135 100644 --- a/layout/svg/SVGViewFrame.cpp +++ b/layout/svg/SVGViewFrame.cpp @@ -24,7 +24,7 @@ class SVGViewFrame : public nsFrame NS_NewSVGViewFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit SVGViewFrame(nsStyleContext* aContext) - : nsFrame(aContext, LayoutFrameType::SVGView) + : nsFrame(aContext, kClassID, LayoutFrameType::SVGView) { AddStateBits(NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/nsSVGAFrame.cpp b/layout/svg/nsSVGAFrame.cpp index 379f0449a57a..a928d23c170f 100644 --- a/layout/svg/nsSVGAFrame.cpp +++ b/layout/svg/nsSVGAFrame.cpp @@ -21,7 +21,7 @@ class nsSVGAFrame : public nsSVGDisplayContainerFrame NS_NewSVGAFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit nsSVGAFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, LayoutFrameType::SVGA) + : nsSVGDisplayContainerFrame(aContext, kClassID, LayoutFrameType::SVGA) {} public: diff --git a/layout/svg/nsSVGClipPathFrame.h b/layout/svg/nsSVGClipPathFrame.h index f620a1fc25f9..05e6cb5eb92a 100644 --- a/layout/svg/nsSVGClipPathFrame.h +++ b/layout/svg/nsSVGClipPathFrame.h @@ -25,7 +25,7 @@ class nsSVGClipPathFrame final : public nsSVGContainerFrame protected: explicit nsSVGClipPathFrame(nsStyleContext* aContext) - : nsSVGContainerFrame(aContext, mozilla::LayoutFrameType::SVGClipPath) + : nsSVGContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGClipPath) , mIsBeingProcessed(false) { AddStateBits(NS_FRAME_IS_NONDISPLAY); diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index e1c04c9ccf6b..d4ab78d92b86 100644 --- a/layout/svg/nsSVGContainerFrame.cpp +++ b/layout/svg/nsSVGContainerFrame.cpp @@ -34,7 +34,7 @@ NS_NewSVGContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) { nsIFrame* frame = - new (aPresShell) nsSVGContainerFrame(aContext, LayoutFrameType::None); + new (aPresShell) nsSVGContainerFrame(aContext, nsSVGContainerFrame::kClassID, LayoutFrameType::None); // If we were called directly, then the frame is for a or // an unknown element type. In both cases we prevent the content // from displaying directly. @@ -43,7 +43,6 @@ NS_NewSVGContainerFrame(nsIPresShell* aPresShell, } NS_IMPL_FRAMEARENA_HELPERS(nsSVGContainerFrame) -NS_IMPL_FRAMEARENA_HELPERS(nsSVGDisplayContainerFrame) void nsSVGContainerFrame::AppendFrames(ChildListID aListID, diff --git a/layout/svg/nsSVGContainerFrame.h b/layout/svg/nsSVGContainerFrame.h index 410d2fb60728..9a9566cce109 100644 --- a/layout/svg/nsSVGContainerFrame.h +++ b/layout/svg/nsSVGContainerFrame.h @@ -40,8 +40,8 @@ class nsSVGContainerFrame : public nsContainerFrame friend nsIFrame* NS_NewSVGContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: - nsSVGContainerFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aType) + nsSVGContainerFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) + : nsContainerFrame(aContext, aID, aType) { AddStateBits(NS_FRAME_SVG_LAYOUT); } @@ -110,16 +110,17 @@ class nsSVGDisplayContainerFrame : public nsSVGContainerFrame, public nsSVGDisplayableFrame { protected: - nsSVGDisplayContainerFrame(nsStyleContext* aContext, + nsSVGDisplayContainerFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, mozilla::LayoutFrameType aType) - : nsSVGContainerFrame(aContext, aType) + : nsSVGContainerFrame(aContext, aID, aType) { AddStateBits(NS_FRAME_MAY_BE_TRANSFORMED); } public: NS_DECL_QUERYFRAME - NS_DECL_FRAMEARENA_HELPERS(nsSVGDisplayContainerFrame) + NS_DECL_QUERYFRAME_TARGET(nsSVGDisplayContainerFrame) + NS_DECL_ABSTRACT_FRAME(nsSVGDisplayContainerFrame) // nsIFrame: virtual void InsertFrames(ChildListID aListID, diff --git a/layout/svg/nsSVGFilterFrame.h b/layout/svg/nsSVGFilterFrame.h index d1887a57b662..e344a940b4fe 100644 --- a/layout/svg/nsSVGFilterFrame.h +++ b/layout/svg/nsSVGFilterFrame.h @@ -33,7 +33,7 @@ class nsSVGFilterFrame : public nsSVGContainerFrame NS_NewSVGFilterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit nsSVGFilterFrame(nsStyleContext* aContext) - : nsSVGContainerFrame(aContext, mozilla::LayoutFrameType::SVGFilter) + : nsSVGContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGFilter) , mLoopFlag(false) , mNoHRefURI(false) { diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp index 4d5215bec6e6..267bbe0cbd45 100644 --- a/layout/svg/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/nsSVGForeignObjectFrame.cpp @@ -40,7 +40,7 @@ NS_NewSVGForeignObjectFrame(nsIPresShell *aPresShell, NS_IMPL_FRAMEARENA_HELPERS(nsSVGForeignObjectFrame) nsSVGForeignObjectFrame::nsSVGForeignObjectFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::SVGForeignObject) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::SVGForeignObject) , mInReflow(false) { AddStateBits(NS_FRAME_REFLOW_ROOT | NS_FRAME_MAY_BE_TRANSFORMED | diff --git a/layout/svg/nsSVGGFrame.h b/layout/svg/nsSVGGFrame.h index 2525f02ef0f2..67cb0addca3d 100644 --- a/layout/svg/nsSVGGFrame.h +++ b/layout/svg/nsSVGGFrame.h @@ -16,12 +16,12 @@ class nsSVGGFrame : public nsSVGDisplayContainerFrame friend nsIFrame* NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: - nsSVGGFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType) - : nsSVGDisplayContainerFrame(aContext, aType) + nsSVGGFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, mozilla::LayoutFrameType aType) + : nsSVGDisplayContainerFrame(aContext, aID, aType) {} - explicit nsSVGGFrame(nsStyleContext* aContext) - : nsSVGGFrame(aContext, mozilla::LayoutFrameType::SVGG) + explicit nsSVGGFrame(nsStyleContext* aContext, nsIFrame::ClassID aID = kClassID) + : nsSVGGFrame(aContext, aID, mozilla::LayoutFrameType::SVGG) {} public: diff --git a/layout/svg/nsSVGGenericContainerFrame.h b/layout/svg/nsSVGGenericContainerFrame.h index 4664e4f8e7c7..f918dcc975f9 100644 --- a/layout/svg/nsSVGGenericContainerFrame.h +++ b/layout/svg/nsSVGGenericContainerFrame.h @@ -25,7 +25,7 @@ class nsSVGGenericContainerFrame final : public nsSVGDisplayContainerFrame protected: explicit nsSVGGenericContainerFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, + : nsSVGDisplayContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGGenericContainer) {} diff --git a/layout/svg/nsSVGGradientFrame.cpp b/layout/svg/nsSVGGradientFrame.cpp index 1863e7ac312d..dcee35cf31ee 100644 --- a/layout/svg/nsSVGGradientFrame.cpp +++ b/layout/svg/nsSVGGradientFrame.cpp @@ -26,8 +26,9 @@ using namespace mozilla::gfx; // Implementation nsSVGGradientFrame::nsSVGGradientFrame(nsStyleContext* aContext, + ClassID aID, LayoutFrameType aType) - : nsSVGPaintServerFrame(aContext, aType) + : nsSVGPaintServerFrame(aContext, aID, aType) , mSource(nullptr) , mLoopFlag(false) , mNoHRefURI(false) diff --git a/layout/svg/nsSVGGradientFrame.h b/layout/svg/nsSVGGradientFrame.h index 8ab05a2c3b95..cbe9d1baeaf8 100644 --- a/layout/svg/nsSVGGradientFrame.h +++ b/layout/svg/nsSVGGradientFrame.h @@ -40,7 +40,7 @@ class nsSVGGradientFrame : public nsSVGPaintServerFrame typedef mozilla::gfx::ExtendMode ExtendMode; protected: - nsSVGGradientFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType); + nsSVGGradientFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType); public: NS_DECL_ABSTRACT_FRAME(nsSVGGradientFrame) @@ -127,7 +127,7 @@ class nsSVGLinearGradientFrame : public nsSVGGradientFrame nsStyleContext* aContext); protected: explicit nsSVGLinearGradientFrame(nsStyleContext* aContext) - : nsSVGGradientFrame(aContext, mozilla::LayoutFrameType::SVGLinearGradient) + : nsSVGGradientFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGLinearGradient) {} public: @@ -169,7 +169,7 @@ class nsSVGRadialGradientFrame : public nsSVGGradientFrame nsStyleContext* aContext); protected: explicit nsSVGRadialGradientFrame(nsStyleContext* aContext) - : nsSVGGradientFrame(aContext, mozilla::LayoutFrameType::SVGRadialGradient) + : nsSVGGradientFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGRadialGradient) {} public: diff --git a/layout/svg/nsSVGImageFrame.h b/layout/svg/nsSVGImageFrame.h index da554d7703ac..fe7343d6f2c9 100644 --- a/layout/svg/nsSVGImageFrame.h +++ b/layout/svg/nsSVGImageFrame.h @@ -59,7 +59,7 @@ class nsSVGImageFrame final protected: explicit nsSVGImageFrame(nsStyleContext* aContext) - : SVGGeometryFrame(aContext, LayoutFrameType::SVGImage) + : SVGGeometryFrame(aContext, kClassID, LayoutFrameType::SVGImage) , mReflowCallbackPosted(false) , mForceSyncDecoding(false) { diff --git a/layout/svg/nsSVGInnerSVGFrame.h b/layout/svg/nsSVGInnerSVGFrame.h index cab4ecc7751d..5a60f1d578d7 100644 --- a/layout/svg/nsSVGInnerSVGFrame.h +++ b/layout/svg/nsSVGInnerSVGFrame.h @@ -21,7 +21,7 @@ class nsSVGInnerSVGFrame final NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit nsSVGInnerSVGFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, + : nsSVGDisplayContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGInnerSVG) { } diff --git a/layout/svg/nsSVGMarkerFrame.h b/layout/svg/nsSVGMarkerFrame.h index ed9bf54261bd..728fd82f0da8 100644 --- a/layout/svg/nsSVGMarkerFrame.h +++ b/layout/svg/nsSVGMarkerFrame.h @@ -35,7 +35,7 @@ class nsSVGMarkerFrame final : public nsSVGContainerFrame NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit nsSVGMarkerFrame(nsStyleContext* aContext) - : nsSVGContainerFrame(aContext, mozilla::LayoutFrameType::SVGMarker) + : nsSVGContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGMarker) , mMarkedFrame(nullptr) , mInUse(false) , mInUse2(false) @@ -141,7 +141,7 @@ class nsSVGMarkerAnonChildFrame final : public nsSVGDisplayContainerFrame nsStyleContext* aContext); explicit nsSVGMarkerAnonChildFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, + : nsSVGDisplayContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGMarkerAnonChild) {} diff --git a/layout/svg/nsSVGMaskFrame.h b/layout/svg/nsSVGMaskFrame.h index 40ec0dabf417..371607807f80 100644 --- a/layout/svg/nsSVGMaskFrame.h +++ b/layout/svg/nsSVGMaskFrame.h @@ -42,7 +42,7 @@ class nsSVGMaskFrame final : public nsSVGContainerFrame protected: explicit nsSVGMaskFrame(nsStyleContext* aContext) - : nsSVGContainerFrame(aContext, mozilla::LayoutFrameType::SVGMask) + : nsSVGContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGMask) , mInUse(false) { AddStateBits(NS_FRAME_IS_NONDISPLAY); diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index 9ddff17b2ecb..52c4a26c8568 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -65,7 +65,7 @@ NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsSVGOuterSVGFrame) nsSVGOuterSVGFrame::nsSVGOuterSVGFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, LayoutFrameType::SVGOuterSVG) + : nsSVGDisplayContainerFrame(aContext, kClassID, LayoutFrameType::SVGOuterSVG) , mCallingReflowSVG(false) , mFullZoom(aContext->PresContext()->GetFullZoom()) , mViewportInitialized(false) diff --git a/layout/svg/nsSVGOuterSVGFrame.h b/layout/svg/nsSVGOuterSVGFrame.h index e79234e717aa..17fd30f1ea5c 100644 --- a/layout/svg/nsSVGOuterSVGFrame.h +++ b/layout/svg/nsSVGOuterSVGFrame.h @@ -233,7 +233,7 @@ class nsSVGOuterSVGAnonChildFrame final : public nsSVGDisplayContainerFrame nsStyleContext* aContext); explicit nsSVGOuterSVGAnonChildFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, + : nsSVGDisplayContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGOuterSVGAnonChild) {} diff --git a/layout/svg/nsSVGPaintServerFrame.h b/layout/svg/nsSVGPaintServerFrame.h index 5d698e7b7106..e387f4d99bb2 100644 --- a/layout/svg/nsSVGPaintServerFrame.h +++ b/layout/svg/nsSVGPaintServerFrame.h @@ -57,9 +57,9 @@ class nsSVGPaintServerFrame : public nsSVGContainerFrame protected: typedef mozilla::gfx::DrawTarget DrawTarget; - explicit nsSVGPaintServerFrame(nsStyleContext* aContext, + explicit nsSVGPaintServerFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsSVGContainerFrame(aContext, aType) + : nsSVGContainerFrame(aContext, aID, aType) { AddStateBits(NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/nsSVGPatternFrame.cpp b/layout/svg/nsSVGPatternFrame.cpp index 23cf00d317e8..298876920a13 100644 --- a/layout/svg/nsSVGPatternFrame.cpp +++ b/layout/svg/nsSVGPatternFrame.cpp @@ -34,7 +34,7 @@ using namespace mozilla::image; // Implementation nsSVGPatternFrame::nsSVGPatternFrame(nsStyleContext* aContext) - : nsSVGPaintServerFrame(aContext, LayoutFrameType::SVGPattern) + : nsSVGPaintServerFrame(aContext, kClassID, LayoutFrameType::SVGPattern) , mSource(nullptr) , mLoopFlag(false) , mNoHRefURI(false) diff --git a/layout/svg/nsSVGStopFrame.cpp b/layout/svg/nsSVGStopFrame.cpp index a7ed123c4464..934e226fcadf 100644 --- a/layout/svg/nsSVGStopFrame.cpp +++ b/layout/svg/nsSVGStopFrame.cpp @@ -20,7 +20,7 @@ class nsSVGStopFrame : public nsFrame NS_NewSVGStopFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit nsSVGStopFrame(nsStyleContext* aContext) - : nsFrame(aContext, LayoutFrameType::SVGStop) + : nsFrame(aContext, kClassID, LayoutFrameType::SVGStop) { AddStateBits(NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp index 23f8611f7c4d..72b03b9f9f05 100644 --- a/layout/svg/nsSVGSwitchFrame.cpp +++ b/layout/svg/nsSVGSwitchFrame.cpp @@ -19,7 +19,7 @@ class nsSVGSwitchFrame final : public nsSVGGFrame NS_NewSVGSwitchFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit nsSVGSwitchFrame(nsStyleContext* aContext) - : nsSVGGFrame(aContext, LayoutFrameType::SVGSwitch) + : nsSVGGFrame(aContext, kClassID, LayoutFrameType::SVGSwitch) {} public: diff --git a/layout/svg/nsSVGUseFrame.cpp b/layout/svg/nsSVGUseFrame.cpp index 21f4f2a3d3e4..a2848a132cea 100644 --- a/layout/svg/nsSVGUseFrame.cpp +++ b/layout/svg/nsSVGUseFrame.cpp @@ -21,7 +21,7 @@ class nsSVGUseFrame final protected: explicit nsSVGUseFrame(nsStyleContext* aContext) - : nsSVGGFrame(aContext, LayoutFrameType::SVGUse) + : nsSVGGFrame(aContext, kClassID, LayoutFrameType::SVGUse) , mHasValidDimensions(true) {} diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 1e94e6da430a..4f34bb3c8579 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -43,8 +43,9 @@ using namespace mozilla::image; nsTableCellFrame::nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame, + ClassID aID, LayoutFrameType aType) - : nsContainerFrame(aContext, aType) + : nsContainerFrame(aContext, aID, aType) , mDesiredSize(aTableFrame->GetWritingMode()) { mColIndex = 0; @@ -1086,7 +1087,7 @@ nsTableCellFrame::GetFrameName(nsAString& aResult) const nsBCTableCellFrame::nsBCTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame) - : nsTableCellFrame(aContext, aTableFrame, LayoutFrameType::BCTableCell) + : nsTableCellFrame(aContext, aTableFrame, kClassID, LayoutFrameType::BCTableCell) { mBStartBorder = mIEndBorder = mBEndBorder = mIStartBorder = 0; } diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index d93638fdcb15..c5f537cc128f 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -48,9 +48,9 @@ public: // default constructor supplied by the compiler - nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame) - : nsTableCellFrame(aContext, - aTableFrame, + nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame, + ClassID aID = kClassID) + : nsTableCellFrame(aContext, aTableFrame, aID, mozilla::LayoutFrameType::TableCell) {} @@ -234,6 +234,7 @@ public: protected: nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame, + ClassID aID, mozilla::LayoutFrameType aType); virtual LogicalSides diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp index be401bedd09c..585e30108890 100644 --- a/layout/tables/nsTableColFrame.cpp +++ b/layout/tables/nsTableColFrame.cpp @@ -24,7 +24,7 @@ using namespace mozilla; using namespace mozilla; nsTableColFrame::nsTableColFrame(nsStyleContext* aContext) - : nsSplittableFrame(aContext, LayoutFrameType::TableCol) + : nsSplittableFrame(aContext, kClassID, LayoutFrameType::TableCol) , mMinCoord(0) , mPrefCoord(0) , mSpanMinCoord(0) diff --git a/layout/tables/nsTableColGroupFrame.h b/layout/tables/nsTableColGroupFrame.h index dc98f7c4622d..ee4bf97421f9 100644 --- a/layout/tables/nsTableColGroupFrame.h +++ b/layout/tables/nsTableColGroupFrame.h @@ -221,7 +221,7 @@ protected: }; inline nsTableColGroupFrame::nsTableColGroupFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, mozilla::LayoutFrameType::TableColGroup) + : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::TableColGroup) , mColCount(0) , mStartColIndex(0) { diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 4bd33e3f26dc..a90391ac891b 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -146,8 +146,8 @@ nsTableFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const return GetParent()->DoGetParentStyleContext(aProviderFrame); } -nsTableFrame::nsTableFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::Table) +nsTableFrame::nsTableFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID, LayoutFrameType::Table) , mCellMap(nullptr) , mTableLayoutStrategy(nullptr) { diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 5e0840cb4364..c1450093a354 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -603,7 +603,7 @@ protected: /** protected constructor. * @see NewFrame */ - explicit nsTableFrame(nsStyleContext* aContext); + explicit nsTableFrame(nsStyleContext* aContext, ClassID aID = kClassID); /** destructor, responsible for mColumnLayoutData */ virtual ~nsTableFrame(); diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 9dead7481d1b..5b5fe89dda84 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -129,8 +129,8 @@ NS_QUERYFRAME_HEAD(nsTableRowFrame) NS_QUERYFRAME_ENTRY(nsTableRowFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) -nsTableRowFrame::nsTableRowFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::TableRow) +nsTableRowFrame::nsTableRowFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID, LayoutFrameType::TableRow) , mContentBSize(0) , mStylePctBSize(0) , mStyleFixedBSize(0) diff --git a/layout/tables/nsTableRowFrame.h b/layout/tables/nsTableRowFrame.h index 884b5fecc07c..2bf54b384afa 100644 --- a/layout/tables/nsTableRowFrame.h +++ b/layout/tables/nsTableRowFrame.h @@ -254,7 +254,7 @@ protected: /** protected constructor. * @see NewFrame */ - explicit nsTableRowFrame(nsStyleContext *aContext); + explicit nsTableRowFrame(nsStyleContext* aContext, ClassID aID = kClassID); void InitChildReflowInput(nsPresContext& aPresContext, const mozilla::LogicalSize& aAvailSize, diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 121bd64ccfcb..5d13e0d54cd0 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -54,7 +54,7 @@ struct TableRowGroupReflowInput { } // namespace mozilla nsTableRowGroupFrame::nsTableRowGroupFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::TableRowGroup) + : nsContainerFrame(aContext, kClassID, LayoutFrameType::TableRowGroup) { SetRepeatable(false); } diff --git a/layout/tables/nsTableWrapperFrame.cpp b/layout/tables/nsTableWrapperFrame.cpp index 0cdfcde1ec92..307e6bccdfdb 100644 --- a/layout/tables/nsTableWrapperFrame.cpp +++ b/layout/tables/nsTableWrapperFrame.cpp @@ -42,8 +42,8 @@ nsTableWrapperFrame::GetLogicalBaseline(WritingMode aWritingMode) const kid->BStart(aWritingMode, mRect.Size()); } -nsTableWrapperFrame::nsTableWrapperFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, LayoutFrameType::TableWrapper) +nsTableWrapperFrame::nsTableWrapperFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID, LayoutFrameType::TableWrapper) { } diff --git a/layout/tables/nsTableWrapperFrame.h b/layout/tables/nsTableWrapperFrame.h index 8bcc2745c5b0..b9720a74a20a 100644 --- a/layout/tables/nsTableWrapperFrame.h +++ b/layout/tables/nsTableWrapperFrame.h @@ -196,7 +196,7 @@ public: protected: - explicit nsTableWrapperFrame(nsStyleContext* aContext); + explicit nsTableWrapperFrame(nsStyleContext* aContext, ClassID aID = kClassID); virtual ~nsTableWrapperFrame(); void InitChildReflowInput(nsPresContext& aPresContext, diff --git a/layout/xul/grid/nsGridRowGroupFrame.h b/layout/xul/grid/nsGridRowGroupFrame.h index 15f4a79e665c..01300b6399cc 100644 --- a/layout/xul/grid/nsGridRowGroupFrame.h +++ b/layout/xul/grid/nsGridRowGroupFrame.h @@ -37,7 +37,7 @@ public: nsGridRowGroupFrame(nsStyleContext* aContext, nsBoxLayout* aLayoutManager): - nsBoxFrame(aContext, false, aLayoutManager) {} + nsBoxFrame(aContext, kClassID, false, aLayoutManager) {} virtual nscoord GetXULFlex() override; diff --git a/layout/xul/grid/nsGridRowLeafFrame.h b/layout/xul/grid/nsGridRowLeafFrame.h index 1636afa24ba4..3a18c96dd444 100644 --- a/layout/xul/grid/nsGridRowLeafFrame.h +++ b/layout/xul/grid/nsGridRowLeafFrame.h @@ -41,8 +41,9 @@ public: nsGridRowLeafFrame(nsStyleContext* aContext, bool aIsRoot, - nsBoxLayout* aLayoutManager): - nsBoxFrame(aContext, aIsRoot, aLayoutManager) {} + nsBoxLayout* aLayoutManager, + ClassID aID = kClassID) : + nsBoxFrame(aContext, aID, aIsRoot, aLayoutManager) {} virtual nsresult GetXULBorderAndPadding(nsMargin& aBorderAndPadding) override; diff --git a/layout/xul/nsBox.cpp b/layout/xul/nsBox.cpp index 36661b060ce0..9d76c1e3ad13 100644 --- a/layout/xul/nsBox.cpp +++ b/layout/xul/nsBox.cpp @@ -176,8 +176,8 @@ nsBox::EndXULLayout(nsBoxLayoutState& aState) bool nsBox::gGotTheme = false; nsITheme* nsBox::gTheme = nullptr; -nsBox::nsBox(LayoutFrameType aType) - : nsIFrame(aType) +nsBox::nsBox(ClassID aID, LayoutFrameType aType) + : nsIFrame(aID, aType) { MOZ_COUNT_CTOR(nsBox); //mX = 0; diff --git a/layout/xul/nsBox.h b/layout/xul/nsBox.h index 0a1ec0f3976f..3d47305294bc 100644 --- a/layout/xul/nsBox.h +++ b/layout/xul/nsBox.h @@ -50,7 +50,7 @@ public: void PropagateDebug(nsBoxLayoutState& aState); #endif - explicit nsBox(mozilla::LayoutFrameType); + nsBox(ClassID aID, mozilla::LayoutFrameType); virtual ~nsBox(); /** diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp index 95ae86266f2a..3fa6bfbf9a3c 100644 --- a/layout/xul/nsBoxFrame.cpp +++ b/layout/xul/nsBoxFrame.cpp @@ -98,7 +98,8 @@ nsIFrame* nsBoxFrame::mDebugChild = nullptr; nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot, nsBoxLayout* aLayoutManager) { - return new (aPresShell) nsBoxFrame(aContext, aIsRoot, aLayoutManager); + return new (aPresShell) nsBoxFrame(aContext, nsBoxFrame::kClassID, + aIsRoot, aLayoutManager); } nsIFrame* @@ -116,10 +117,11 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) #endif nsBoxFrame::nsBoxFrame(nsStyleContext* aContext, + ClassID aID, LayoutFrameType aType, bool aIsRoot, nsBoxLayout* aLayoutManager) - : nsContainerFrame(aContext, aType) + : nsContainerFrame(aContext, aID, aType) , mFlex(0) , mAscent(0) { diff --git a/layout/xul/nsBoxFrame.h b/layout/xul/nsBoxFrame.h index 492970c68058..e7e6d92053de 100644 --- a/layout/xul/nsBoxFrame.h +++ b/layout/xul/nsBoxFrame.h @@ -141,9 +141,10 @@ public: virtual ~nsBoxFrame(); explicit nsBoxFrame(nsStyleContext* aContext, + ClassID aID = kClassID, bool aIsRoot = false, nsBoxLayout* aLayoutManager = nullptr) - : nsBoxFrame(aContext, + : nsBoxFrame(aContext, aID, mozilla::LayoutFrameType::Box, aIsRoot, aLayoutManager) @@ -184,6 +185,7 @@ public: protected: nsBoxFrame(nsStyleContext* aContext, + ClassID aID, mozilla::LayoutFrameType aType, bool aIsRoot = false, nsBoxLayout* aLayoutManager = nullptr); diff --git a/layout/xul/nsButtonBoxFrame.cpp b/layout/xul/nsButtonBoxFrame.cpp index 7a3ee9a6e037..124e39ad84a8 100644 --- a/layout/xul/nsButtonBoxFrame.cpp +++ b/layout/xul/nsButtonBoxFrame.cpp @@ -59,8 +59,8 @@ NS_NewButtonBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsButtonBoxFrame) -nsButtonBoxFrame::nsButtonBoxFrame(nsStyleContext* aContext) : - nsBoxFrame(aContext, false), +nsButtonBoxFrame::nsButtonBoxFrame(nsStyleContext* aContext, ClassID aID) : + nsBoxFrame(aContext, aID, false), mButtonBoxListener(nullptr), mIsHandlingKeyEvent(false) { diff --git a/layout/xul/nsButtonBoxFrame.h b/layout/xul/nsButtonBoxFrame.h index 9ccc9587b9fc..e5a44f0d70ad 100644 --- a/layout/xul/nsButtonBoxFrame.h +++ b/layout/xul/nsButtonBoxFrame.h @@ -16,7 +16,7 @@ public: friend nsIFrame* NS_NewButtonBoxFrame(nsIPresShell* aPresShell); - explicit nsButtonBoxFrame(nsStyleContext* aContext); + explicit nsButtonBoxFrame(nsStyleContext* aContext, ClassID = kClassID); virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, diff --git a/layout/xul/nsDeckFrame.cpp b/layout/xul/nsDeckFrame.cpp index 026799c3da32..1719d8c1417f 100644 --- a/layout/xul/nsDeckFrame.cpp +++ b/layout/xul/nsDeckFrame.cpp @@ -44,7 +44,7 @@ NS_QUERYFRAME_HEAD(nsDeckFrame) NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) nsDeckFrame::nsDeckFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext, LayoutFrameType::Deck) + : nsBoxFrame(aContext, kClassID, LayoutFrameType::Deck) , mIndex(0) { nsCOMPtr layout; diff --git a/layout/xul/nsDocElementBoxFrame.cpp b/layout/xul/nsDocElementBoxFrame.cpp index a846bf87a1f3..525772a8d670 100644 --- a/layout/xul/nsDocElementBoxFrame.cpp +++ b/layout/xul/nsDocElementBoxFrame.cpp @@ -36,7 +36,7 @@ public: nsStyleContext* aContext); explicit nsDocElementBoxFrame(nsStyleContext* aContext) - :nsBoxFrame(aContext, true) {} + :nsBoxFrame(aContext, kClassID, true) {} NS_DECL_QUERYFRAME NS_DECL_FRAMEARENA_HELPERS(nsDocElementBoxFrame) diff --git a/layout/xul/nsGroupBoxFrame.cpp b/layout/xul/nsGroupBoxFrame.cpp index 51c5323eb198..da9305410542 100644 --- a/layout/xul/nsGroupBoxFrame.cpp +++ b/layout/xul/nsGroupBoxFrame.cpp @@ -24,7 +24,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsGroupBoxFrame) explicit nsGroupBoxFrame(nsStyleContext* aContext): - nsBoxFrame(aContext) {} + nsBoxFrame(aContext, kClassID) {} virtual nsresult GetXULBorderAndPadding(nsMargin& aBorderAndPadding) override; diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp index 9ac541400f71..62e106bdc43f 100644 --- a/layout/xul/nsImageBoxFrame.cpp +++ b/layout/xul/nsImageBoxFrame.cpp @@ -151,7 +151,7 @@ nsImageBoxFrame::AttributeChanged(int32_t aNameSpaceID, } nsImageBoxFrame::nsImageBoxFrame(nsStyleContext* aContext) - : nsLeafBoxFrame(aContext, LayoutFrameType::ImageBox) + : nsLeafBoxFrame(aContext, kClassID, LayoutFrameType::ImageBox) , mIntrinsicSize(0, 0) , mLoadFlags(nsIRequest::LOAD_NORMAL) , mRequestRegistered(false) diff --git a/layout/xul/nsLeafBoxFrame.cpp b/layout/xul/nsLeafBoxFrame.cpp index 7f9459a8fec7..85274d39dfc4 100644 --- a/layout/xul/nsLeafBoxFrame.cpp +++ b/layout/xul/nsLeafBoxFrame.cpp @@ -40,8 +40,8 @@ NS_NewLeafBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsLeafBoxFrame) -nsLeafBoxFrame::nsLeafBoxFrame(nsStyleContext* aContext, LayoutFrameType aType) - : nsLeafFrame(aContext, aType) +nsLeafBoxFrame::nsLeafBoxFrame(nsStyleContext* aContext, ClassID aID, LayoutFrameType aType) + : nsLeafFrame(aContext, aID, aType) { } diff --git a/layout/xul/nsLeafBoxFrame.h b/layout/xul/nsLeafBoxFrame.h index 11bce4cc31f1..c557050762d5 100644 --- a/layout/xul/nsLeafBoxFrame.h +++ b/layout/xul/nsLeafBoxFrame.h @@ -82,11 +82,11 @@ protected: virtual nscoord GetIntrinsicISize() override; - explicit nsLeafBoxFrame(nsStyleContext* aContext) - : nsLeafBoxFrame(aContext, mozilla::LayoutFrameType::LeafBox) + explicit nsLeafBoxFrame(nsStyleContext* aContext, ClassID aID = kClassID) + : nsLeafBoxFrame(aContext, aID, mozilla::LayoutFrameType::LeafBox) {} - nsLeafBoxFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType); + nsLeafBoxFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType); private: diff --git a/layout/xul/nsListBoxBodyFrame.cpp b/layout/xul/nsListBoxBodyFrame.cpp index 620f37e21dd3..9a6a2ea47957 100644 --- a/layout/xul/nsListBoxBodyFrame.cpp +++ b/layout/xul/nsListBoxBodyFrame.cpp @@ -151,7 +151,7 @@ nsListScrollSmoother::Stop() nsListBoxBodyFrame::nsListBoxBodyFrame(nsStyleContext* aContext, nsBoxLayout* aLayoutManager) - : nsBoxFrame(aContext, false, aLayoutManager), + : nsBoxFrame(aContext, kClassID, false, aLayoutManager), mTopFrame(nullptr), mBottomFrame(nullptr), mLinkupFrame(nullptr), diff --git a/layout/xul/nsListItemFrame.cpp b/layout/xul/nsListItemFrame.cpp index 1776f1b6cb2b..bb1075fed60b 100644 --- a/layout/xul/nsListItemFrame.cpp +++ b/layout/xul/nsListItemFrame.cpp @@ -17,7 +17,7 @@ nsListItemFrame::nsListItemFrame(nsStyleContext* aContext, bool aIsRoot, nsBoxLayout* aLayoutManager) - : nsGridRowLeafFrame(aContext, aIsRoot, aLayoutManager) + : nsGridRowLeafFrame(aContext, aIsRoot, aLayoutManager, kClassID) { } diff --git a/layout/xul/nsMenuBarFrame.cpp b/layout/xul/nsMenuBarFrame.cpp index eeb72d28c8fb..1687128cb7bd 100644 --- a/layout/xul/nsMenuBarFrame.cpp +++ b/layout/xul/nsMenuBarFrame.cpp @@ -51,7 +51,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) // nsMenuBarFrame cntr // nsMenuBarFrame::nsMenuBarFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext) + : nsBoxFrame(aContext, kClassID) , mStayActive(false) , mIsActive(false) , mActiveByKeyboard(false) diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index 059ac5ef149c..72a8c76d0ed6 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -170,7 +170,7 @@ NS_QUERYFRAME_HEAD(nsMenuFrame) NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) nsMenuFrame::nsMenuFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext, LayoutFrameType::Menu) + : nsBoxFrame(aContext, kClassID, LayoutFrameType::Menu) , mIsMenu(false) , mChecked(false) , mIgnoreAccelTextChange(false) diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index bf882e03ae36..ac8877258186 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -95,7 +95,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) // nsMenuPopupFrame ctor // nsMenuPopupFrame::nsMenuPopupFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext, LayoutFrameType::MenuPopup) + : nsBoxFrame(aContext, kClassID, LayoutFrameType::MenuPopup) , mCurrentMenu(nullptr) , mView(nullptr) , mPrefSize(-1, -1) diff --git a/layout/xul/nsPopupSetFrame.h b/layout/xul/nsPopupSetFrame.h index 2950502ec674..5449c20ed7ae 100644 --- a/layout/xul/nsPopupSetFrame.h +++ b/layout/xul/nsPopupSetFrame.h @@ -19,7 +19,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsPopupSetFrame) explicit nsPopupSetFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext, mozilla::LayoutFrameType::PopupSet) + : nsBoxFrame(aContext, kClassID, mozilla::LayoutFrameType::PopupSet) {} ~nsPopupSetFrame() {} diff --git a/layout/xul/nsProgressMeterFrame.h b/layout/xul/nsProgressMeterFrame.h index e19c903fa40f..0f097aea723a 100644 --- a/layout/xul/nsProgressMeterFrame.h +++ b/layout/xul/nsProgressMeterFrame.h @@ -39,7 +39,7 @@ public: protected: explicit nsProgressMeterFrame(nsStyleContext* aContext) : - nsBoxFrame(aContext), mNeedsReflowCallback(true) {} + nsBoxFrame(aContext, kClassID), mNeedsReflowCallback(true) {} virtual ~nsProgressMeterFrame(); bool mNeedsReflowCallback; diff --git a/layout/xul/nsResizerFrame.cpp b/layout/xul/nsResizerFrame.cpp index e825473857e9..2be942ffb109 100644 --- a/layout/xul/nsResizerFrame.cpp +++ b/layout/xul/nsResizerFrame.cpp @@ -46,7 +46,7 @@ NS_NewResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsResizerFrame) nsResizerFrame::nsResizerFrame(nsStyleContext* aContext) -:nsTitleBarFrame(aContext) + : nsTitleBarFrame(aContext, kClassID) { } diff --git a/layout/xul/nsRootBoxFrame.cpp b/layout/xul/nsRootBoxFrame.cpp index 55cf439c7111..655aee3679f5 100644 --- a/layout/xul/nsRootBoxFrame.cpp +++ b/layout/xul/nsRootBoxFrame.cpp @@ -108,7 +108,7 @@ NS_NewRootBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsRootBoxFrame) nsRootBoxFrame::nsRootBoxFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext, LayoutFrameType::Root, true) + : nsBoxFrame(aContext, kClassID, LayoutFrameType::Root, true) , mPopupSetFrame(nullptr) , mDefaultTooltip(nullptr) { diff --git a/layout/xul/nsScrollBoxFrame.cpp b/layout/xul/nsScrollBoxFrame.cpp index 1dea94d036b6..7e3ad897bef2 100644 --- a/layout/xul/nsScrollBoxFrame.cpp +++ b/layout/xul/nsScrollBoxFrame.cpp @@ -42,7 +42,7 @@ public: protected: explicit nsAutoRepeatBoxFrame(nsStyleContext* aContext): - nsButtonBoxFrame(aContext) {} + nsButtonBoxFrame(aContext, kClassID) {} void StartRepeat() { if (IsActivatedOnHover()) { diff --git a/layout/xul/nsScrollbarButtonFrame.h b/layout/xul/nsScrollbarButtonFrame.h index 4abee4c47f00..e6bac231b598 100644 --- a/layout/xul/nsScrollbarButtonFrame.h +++ b/layout/xul/nsScrollbarButtonFrame.h @@ -24,7 +24,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsScrollbarButtonFrame) explicit nsScrollbarButtonFrame(nsStyleContext* aContext): - nsButtonBoxFrame(aContext), mCursorOnThis(false) {} + nsButtonBoxFrame(aContext, kClassID), mCursorOnThis(false) {} // Overrides virtual void DestroyFrom(nsIFrame* aDestructRoot) override; diff --git a/layout/xul/nsScrollbarFrame.h b/layout/xul/nsScrollbarFrame.h index b167bc611f3b..758fb612da22 100644 --- a/layout/xul/nsScrollbarFrame.h +++ b/layout/xul/nsScrollbarFrame.h @@ -21,7 +21,7 @@ class nsScrollbarFrame final : public nsBoxFrame { public: explicit nsScrollbarFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext, mozilla::LayoutFrameType::Scrollbar) + : nsBoxFrame(aContext, kClassID, mozilla::LayoutFrameType::Scrollbar) , mIncrement(0) , mSmoothScroll(false) , mScrollbarMediator(nullptr) diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp index 970e3129ef59..f57ca27a96ad 100644 --- a/layout/xul/nsSliderFrame.cpp +++ b/layout/xul/nsSliderFrame.cpp @@ -84,7 +84,7 @@ NS_QUERYFRAME_HEAD(nsSliderFrame) NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) nsSliderFrame::nsSliderFrame(nsStyleContext* aContext) - : nsBoxFrame(aContext, LayoutFrameType::Slider) + : nsBoxFrame(aContext, kClassID, LayoutFrameType::Slider) , mRatio(0.0f) , mDragStart(0) , mThumbStart(0) diff --git a/layout/xul/nsSplitterFrame.cpp b/layout/xul/nsSplitterFrame.cpp index a1abccee4657..de14a35124cc 100644 --- a/layout/xul/nsSplitterFrame.cpp +++ b/layout/xul/nsSplitterFrame.cpp @@ -203,7 +203,7 @@ NS_NewSplitterFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsSplitterFrame) nsSplitterFrame::nsSplitterFrame(nsStyleContext* aContext) -: nsBoxFrame(aContext), +: nsBoxFrame(aContext, kClassID), mInner(0) { } diff --git a/layout/xul/nsStackFrame.cpp b/layout/xul/nsStackFrame.cpp index 437d558f910c..e75ae050de75 100644 --- a/layout/xul/nsStackFrame.cpp +++ b/layout/xul/nsStackFrame.cpp @@ -30,7 +30,7 @@ NS_NewStackFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsStackFrame) nsStackFrame::nsStackFrame(nsStyleContext* aContext): - nsBoxFrame(aContext) + nsBoxFrame(aContext, kClassID) { nsCOMPtr layout; NS_NewStackLayout(layout); diff --git a/layout/xul/nsTextBoxFrame.cpp b/layout/xul/nsTextBoxFrame.cpp index 263a3253ee34..923dbfa26b65 100644 --- a/layout/xul/nsTextBoxFrame.cpp +++ b/layout/xul/nsTextBoxFrame.cpp @@ -100,7 +100,7 @@ nsTextBoxFrame::AttributeChanged(int32_t aNameSpaceID, } nsTextBoxFrame::nsTextBoxFrame(nsStyleContext* aContext) - : nsLeafBoxFrame(aContext) + : nsLeafBoxFrame(aContext, kClassID) , mAccessKeyInfo(nullptr) , mCropType(CropRight) , mAscent(0) diff --git a/layout/xul/nsTitleBarFrame.cpp b/layout/xul/nsTitleBarFrame.cpp index 2792403dcc02..c0ca37df0258 100644 --- a/layout/xul/nsTitleBarFrame.cpp +++ b/layout/xul/nsTitleBarFrame.cpp @@ -33,8 +33,8 @@ NS_NewTitleBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsTitleBarFrame) -nsTitleBarFrame::nsTitleBarFrame(nsStyleContext* aContext) -:nsBoxFrame(aContext, false) +nsTitleBarFrame::nsTitleBarFrame(nsStyleContext* aContext, ClassID aID) + : nsBoxFrame(aContext, aID, false) { mTrackingMouseMove = false; UpdateMouseThrough(); diff --git a/layout/xul/nsTitleBarFrame.h b/layout/xul/nsTitleBarFrame.h index e4d6f5fc1e62..975ee2e533d4 100644 --- a/layout/xul/nsTitleBarFrame.h +++ b/layout/xul/nsTitleBarFrame.h @@ -16,7 +16,7 @@ public: friend nsIFrame* NS_NewTitleBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); - explicit nsTitleBarFrame(nsStyleContext* aContext); + explicit nsTitleBarFrame(nsStyleContext* aContext, ClassID = kClassID); virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, diff --git a/layout/xul/nsXULLabelFrame.h b/layout/xul/nsXULLabelFrame.h index 591ef4be97d9..880517d97ccd 100644 --- a/layout/xul/nsXULLabelFrame.h +++ b/layout/xul/nsXULLabelFrame.h @@ -40,7 +40,7 @@ public: protected: explicit nsXULLabelFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext, mozilla::LayoutFrameType::XULLabel) + : nsBlockFrame(aContext, kClassID, mozilla::LayoutFrameType::XULLabel) {} nsresult RegUnregAccessKey(bool aDoReg); diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp index 00a068cd779b..9b74252ce7da 100644 --- a/layout/xul/tree/nsTreeBodyFrame.cpp +++ b/layout/xul/tree/nsTreeBodyFrame.cpp @@ -114,7 +114,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsLeafBoxFrame) // Constructor nsTreeBodyFrame::nsTreeBodyFrame(nsStyleContext* aContext) -:nsLeafBoxFrame(aContext), +:nsLeafBoxFrame(aContext, kClassID), mSlots(nullptr), mImageCache(), mTopRowIndex(0), diff --git a/layout/xul/tree/nsTreeColFrame.h b/layout/xul/tree/nsTreeColFrame.h index 12f927bd1998..95e8e8dadf32 100644 --- a/layout/xul/tree/nsTreeColFrame.h +++ b/layout/xul/tree/nsTreeColFrame.h @@ -17,7 +17,7 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsTreeColFrame) explicit nsTreeColFrame(nsStyleContext* aContext): - nsBoxFrame(aContext) {} + nsBoxFrame(aContext, kClassID) {} virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,