diff --git a/layout/forms/nsColorControlFrame.cpp b/layout/forms/nsColorControlFrame.cpp index 831fed903c0d..7282800b212c 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, kClassID, LayoutFrameType::ColorControl) + : nsHTMLButtonControlFrame(aContext, kClassID) { } diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 981e22139f1d..08be1b238237 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, kClassID, LayoutFrameType::ComboboxControl) + : nsBlockFrame(aContext, kClassID) , mDisplayFrame(nullptr) , mButtonFrame(nullptr) , mDropdownFrame(nullptr) @@ -1286,7 +1286,7 @@ public: nsComboboxDisplayFrame(nsStyleContext* aContext, nsComboboxControlFrame* aComboBox) - : nsBlockFrame(aContext, kClassID, LayoutFrameType::ComboboxDisplay) + : nsBlockFrame(aContext, kClassID) , mComboBox(aComboBox) {} diff --git a/layout/forms/nsDateTimeControlFrame.cpp b/layout/forms/nsDateTimeControlFrame.cpp index 16ad0d1eb50e..51c5c37f9f96 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, kClassID, LayoutFrameType::DateTimeControl) + : nsContainerFrame(aContext, kClassID) { } diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index f930c2f0abf2..83ba3d49724c 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, kClassID, LayoutFrameType::FieldSet) + : nsContainerFrame(aContext, kClassID) , mLegendRect(GetWritingMode()) { mLegendSpace = 0; diff --git a/layout/forms/nsFormControlFrame.cpp b/layout/forms/nsFormControlFrame.cpp index c3ec2f8b24cc..a5d0180413d0 100644 --- a/layout/forms/nsFormControlFrame.cpp +++ b/layout/forms/nsFormControlFrame.cpp @@ -19,7 +19,7 @@ using namespace mozilla; nsFormControlFrame::nsFormControlFrame(nsStyleContext* aContext, nsIFrame::ClassID aID) - : nsAtomicContainerFrame(aContext, aID, LayoutFrameType::FormControl) + : nsAtomicContainerFrame(aContext, aID) { } diff --git a/layout/forms/nsFormControlFrame.h b/layout/forms/nsFormControlFrame.h index a5376c452277..ecfdaa4f3683 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*, nsIFrame::ClassID); + 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 df5a882755dc..23e9ea744eb5 100644 --- a/layout/forms/nsGfxButtonControlFrame.cpp +++ b/layout/forms/nsGfxButtonControlFrame.cpp @@ -19,7 +19,7 @@ using namespace mozilla; nsGfxButtonControlFrame::nsGfxButtonControlFrame(nsStyleContext* aContext) - : nsHTMLButtonControlFrame(aContext, kClassID, LayoutFrameType::GfxButtonControl) + : nsHTMLButtonControlFrame(aContext, kClassID) { } diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index 2d6c2d86001b..2d04562eef09 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -27,9 +27,8 @@ NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsHTMLButtonControlFrame) nsHTMLButtonControlFrame::nsHTMLButtonControlFrame(nsStyleContext* aContext, - nsIFrame::ClassID aID, - LayoutFrameType aType) - : nsContainerFrame(aContext, aID, aType) + nsIFrame::ClassID aID) + : nsContainerFrame(aContext, aID) { } diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index d5dd58ec5aa6..6736b5596efc 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -19,8 +19,7 @@ class nsHTMLButtonControlFrame : public nsContainerFrame, { public: explicit nsHTMLButtonControlFrame(nsStyleContext* aContext) - : nsHTMLButtonControlFrame(aContext, kClassID, - mozilla::LayoutFrameType::HTMLButtonControl) + : nsHTMLButtonControlFrame(aContext, kClassID) {} ~nsHTMLButtonControlFrame(); @@ -106,8 +105,7 @@ public: nsStyleChangeList& aChangeList, nsChangeHint aHintForThisFrame) override; protected: - nsHTMLButtonControlFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, - mozilla::LayoutFrameType aType); + nsHTMLButtonControlFrame(nsStyleContext* aContext, nsIFrame::ClassID aID); virtual bool IsInput() { return false; } diff --git a/layout/forms/nsImageControlFrame.cpp b/layout/forms/nsImageControlFrame.cpp index 37806f242a71..f5d000b82b2a 100644 --- a/layout/forms/nsImageControlFrame.cpp +++ b/layout/forms/nsImageControlFrame.cpp @@ -58,7 +58,7 @@ public: }; nsImageControlFrame::nsImageControlFrame(nsStyleContext* aContext) - : nsImageFrame(aContext, kClassID, LayoutFrameType::ImageControl) + : nsImageFrame(aContext, kClassID) { } diff --git a/layout/forms/nsLegendFrame.h b/layout/forms/nsLegendFrame.h index 50bc4769a852..fbfa771fa4af 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, kClassID, mozilla::LayoutFrameType::Legend) + : nsBlockFrame(aContext, kClassID) {} virtual void Reflow(nsPresContext* aPresContext, diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 55682749fe6a..9f77627a1cd4 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, kClassID, LayoutFrameType::ListControl, false) + : nsHTMLScrollFrame(aContext, kClassID, false) , mView(nullptr) , mMightNeedSecondPass(false) , mHasPendingInterruptAtStartOfReflow(false) diff --git a/layout/forms/nsMeterFrame.cpp b/layout/forms/nsMeterFrame.cpp index fc5f9c292c47..4683c30b1ff3 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, kClassID, LayoutFrameType::Meter) + : nsContainerFrame(aContext, kClassID) , mBarDiv(nullptr) { } diff --git a/layout/forms/nsNumberControlFrame.cpp b/layout/forms/nsNumberControlFrame.cpp index 84eaf13531a0..7db5c30190ec 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, kClassID, LayoutFrameType::NumberControl) + : nsContainerFrame(aContext, kClassID) , mHandlingInputEvent(false) { } diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp index 04fe62c91e1d..73e686716ef6 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, kClassID, LayoutFrameType::Progress) + : nsContainerFrame(aContext, kClassID) , mBarDiv(nullptr) { } diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp index 224d4017afa0..52c7f84cbf86 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, kClassID, LayoutFrameType::Range) + : nsContainerFrame(aContext, kClassID) { } diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index 6e046fac1db9..9f4e78fbcc70 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -103,7 +103,7 @@ private: #endif nsTextControlFrame::nsTextControlFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, kClassID, LayoutFrameType::TextInput) + : nsContainerFrame(aContext, kClassID) , mFirstBaseline(NS_INTRINSIC_WIDTH_UNKNOWN) , mEditorHasBeenInitialized(false) , mIsProcessing(false) diff --git a/layout/generic/BRFrame.cpp b/layout/generic/BRFrame.cpp index 89b50e127bbf..ca83fc17b50b 100644 --- a/layout/generic/BRFrame.cpp +++ b/layout/generic/BRFrame.cpp @@ -64,7 +64,7 @@ public: protected: explicit BRFrame(nsStyleContext* aContext) - : nsFrame(aContext, kClassID, LayoutFrameType::Br) + : nsFrame(aContext, kClassID) , mAscent(NS_INTRINSIC_WIDTH_UNKNOWN) {} diff --git a/layout/generic/DetailsFrame.cpp b/layout/generic/DetailsFrame.cpp index 31b62362b919..a401d6745212 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, kClassID, LayoutFrameType::Details) + : nsBlockFrame(aContext, kClassID) { } diff --git a/layout/generic/ViewportFrame.h b/layout/generic/ViewportFrame.h index ed0cef19c289..e77b0c5b6546 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, kClassID, mozilla::LayoutFrameType::Viewport) + : ViewportFrame(aContext, kClassID) {} virtual ~ViewportFrame() { } // useful for debugging @@ -77,8 +77,8 @@ public: #endif protected: - ViewportFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aID, aType) + ViewportFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID) , mView(nullptr) {} diff --git a/layout/generic/nsAtomicContainerFrame.h b/layout/generic/nsAtomicContainerFrame.h index c3a09f1ec93a..89ebb07608dc 100644 --- a/layout/generic/nsAtomicContainerFrame.h +++ b/layout/generic/nsAtomicContainerFrame.h @@ -40,9 +40,8 @@ public: } protected: - nsAtomicContainerFrame(nsStyleContext* aContext, ClassID aID, - mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aID, aType) + nsAtomicContainerFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID) {} }; diff --git a/layout/generic/nsBackdropFrame.h b/layout/generic/nsBackdropFrame.h index d678ad52f2d3..3289473b7175 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, kClassID, mozilla::LayoutFrameType::Backdrop) + : nsFrame(aContext, kClassID) {} #ifdef DEBUG_FRAME_DUMP diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index ab63d18d1358..5bfaad61dda8 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -396,8 +396,8 @@ public: }; protected: - nsBlockFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aID, aType) + explicit nsBlockFrame(nsStyleContext* aContext, ClassID aID = kClassID) + : nsContainerFrame(aContext, aID) , mMinWidth(NS_INTRINSIC_WIDTH_UNKNOWN) , mPrefWidth(NS_INTRINSIC_WIDTH_UNKNOWN) { @@ -406,10 +406,6 @@ protected: #endif } - explicit nsBlockFrame(nsStyleContext* aContext, ClassID aID = kClassID) - : nsBlockFrame(aContext, aID, mozilla::LayoutFrameType::Block) - {} - virtual ~nsBlockFrame(); #ifdef DEBUG diff --git a/layout/generic/nsBulletFrame.h b/layout/generic/nsBulletFrame.h index ed7af572bbee..b0b029a95a33 100644 --- a/layout/generic/nsBulletFrame.h +++ b/layout/generic/nsBulletFrame.h @@ -53,7 +53,7 @@ public: #endif explicit nsBulletFrame(nsStyleContext* aContext) - : nsFrame(aContext, kClassID, mozilla::LayoutFrameType::Bullet) + : nsFrame(aContext, kClassID) , mPadding(GetWritingMode()) , mIntrinsicSize(GetWritingMode()) , mOrdinal(0) diff --git a/layout/generic/nsCanvasFrame.h b/layout/generic/nsCanvasFrame.h index 22740ca24098..ce92d53db08b 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, kClassID, mozilla::LayoutFrameType::Canvas) + : nsContainerFrame(aContext, kClassID) , mDoPaintFocus(false) , mAddedScrollPositionListener(false) {} diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index fda57d05b8f4..4be16cb3eaab 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, kClassID, LayoutFrameType::ColumnSet) + : nsContainerFrame(aContext, kClassID) , mLastBalanceBSize(NS_INTRINSICSIZE) { } diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index 542932174ea1..f4bcdd537a35 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -534,8 +534,8 @@ public: #endif protected: - nsContainerFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsSplittableFrame(aContext, aID, aType) + nsContainerFrame(nsStyleContext* aContext, ClassID aID) + : nsSplittableFrame(aContext, aID) {} ~nsContainerFrame(); diff --git a/layout/generic/nsFirstLetterFrame.h b/layout/generic/nsFirstLetterFrame.h index 64a252e27d5a..80e00ba650b9 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, kClassID, mozilla::LayoutFrameType::Letter) + : nsContainerFrame(aContext, kClassID) {} virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, diff --git a/layout/generic/nsFlexContainerFrame.h b/layout/generic/nsFlexContainerFrame.h index 6aa17af5577a..06f4b0976b6c 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, kClassID, mozilla::LayoutFrameType::FlexContainer) + : nsContainerFrame(aContext, kClassID) , mBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN) , mLastBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN) {} diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 00be4a4187a5..1ada3d52903b 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -465,8 +465,8 @@ NS_NewEmptyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) return new (aPresShell) nsFrame(aContext); } -nsFrame::nsFrame(nsStyleContext* aContext, ClassID aID, LayoutFrameType aType) - : nsBox(aID, aType) +nsFrame::nsFrame(nsStyleContext* aContext, ClassID aID) + : nsBox(aID) { MOZ_COUNT_CTOR(nsFrame); diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index 9f354a027f4a..14d41abb0219 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -584,9 +584,9 @@ public: protected: // Protected constructor and destructor - nsFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType); + nsFrame(nsStyleContext* aContext, ClassID aID); explicit nsFrame(nsStyleContext* aContext) - : nsFrame(aContext, ClassID::nsFrame_id, mozilla::LayoutFrameType::None) {} + : nsFrame(aContext, ClassID::nsFrame_id) {} virtual ~nsFrame(); /** diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index 85c05e8a1bc6..3b3a83a537a9 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -158,7 +158,7 @@ public: protected: explicit nsHTMLFramesetBlankFrame(nsStyleContext* aContext) - : nsLeafFrame(aContext, kClassID, LayoutFrameType::None) + : nsLeafFrame(aContext, kClassID) {} virtual ~nsHTMLFramesetBlankFrame(); @@ -176,7 +176,7 @@ bool nsHTMLFramesetFrame::gDragInProgress = false; #define DEFAULT_BORDER_WIDTH_PX 6 nsHTMLFramesetFrame::nsHTMLFramesetFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, kClassID, LayoutFrameType::FrameSet) + : nsContainerFrame(aContext, kClassID) { mNumRows = 0; mNumCols = 0; @@ -1336,7 +1336,7 @@ nsHTMLFramesetBorderFrame::nsHTMLFramesetBorderFrame(nsStyleContext* aContext, int32_t aWidth, bool aVertical, bool aVisibility) - : nsLeafFrame(aContext, kClassID, LayoutFrameType::None) + : nsLeafFrame(aContext, kClassID) , mWidth(aWidth) , mVertical(aVertical) , mVisibility(aVisibility) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 5de45ad50bbf..52335d850b1e 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -111,9 +111,8 @@ NS_IMPL_FRAMEARENA_HELPERS(nsHTMLScrollFrame) nsHTMLScrollFrame::nsHTMLScrollFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, - LayoutFrameType aType, bool aIsRoot) - : nsContainerFrame(aContext, aID, aType) + : nsContainerFrame(aContext, aID) , mHelper(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot) { } @@ -1162,7 +1161,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsXULScrollFrame) nsXULScrollFrame::nsXULScrollFrame(nsStyleContext* aContext, bool aIsRoot, bool aClipAllDescendants) - : nsBoxFrame(aContext, kClassID, LayoutFrameType::Scroll, aIsRoot) + : nsBoxFrame(aContext, kClassID, aIsRoot) , mHelper(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot) { SetXULLayoutManager(nullptr); diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index cf7e5aaa64a2..51da2f25f67e 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -1060,12 +1060,11 @@ public: protected: nsHTMLScrollFrame(nsStyleContext* aContext, bool aIsRoot) - : nsHTMLScrollFrame(aContext, kClassID, mozilla::LayoutFrameType::Scroll, aIsRoot) + : nsHTMLScrollFrame(aContext, kClassID, aIsRoot) {} nsHTMLScrollFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, - mozilla::LayoutFrameType aType, bool aIsRoot); void SetSuppressScrollbarUpdate(bool aSuppress) { mHelper.mSupppressScrollbarUpdate = aSuppress; @@ -1112,7 +1111,7 @@ public: typedef mozilla::CSSIntPoint CSSIntPoint; NS_DECL_QUERYFRAME - NS_DECL_FRAMEARENA_HELPERS(nsXULScrollFrame) + NS_DECL_FRAMEARENA_HELPERS(nsXULScrollFrame) friend nsXULScrollFrame* NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, diff --git a/layout/generic/nsGridContainerFrame.h b/layout/generic/nsGridContainerFrame.h index ffdc4887bd0d..b1f860ca649c 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, kClassID, mozilla::LayoutFrameType::GridContainer) + : nsContainerFrame(aContext, kClassID) , mCachedMinISize(NS_INTRINSIC_WIDTH_UNKNOWN) , mCachedPrefISize(NS_INTRINSIC_WIDTH_UNKNOWN) { diff --git a/layout/generic/nsHTMLCanvasFrame.h b/layout/generic/nsHTMLCanvasFrame.h index 9182a51b562c..084fdb49d830 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, kClassID, mozilla::LayoutFrameType::HTMLCanvas) + : nsContainerFrame(aContext, kClassID) , mBorderPadding(GetWritingMode()) {} diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 883615770cd0..ce4aee7a7683 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -607,7 +607,7 @@ public: NS_DECL_QUERYFRAME_TARGET(nsIFrame) - explicit nsIFrame(ClassID aID, mozilla::LayoutFrameType aType) + explicit nsIFrame(ClassID aID) : mRect() , mContent(nullptr) , mStyleContext(nullptr) diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 0ff7ed3f113d..0d424068503c 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, ClassID aID, LayoutFrameType aType) - : nsAtomicContainerFrame(aContext, aID, aType) +nsImageFrame::nsImageFrame(nsStyleContext* aContext, ClassID aID) + : nsAtomicContainerFrame(aContext, aID) , mComputedSize(0, 0) , mIntrinsicRatio(0, 0) , mDisplayingIcon(false) diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index d11555716a1b..d313039a971b 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -72,11 +72,6 @@ public: NS_DECL_FRAMEARENA_HELPERS(nsImageFrame) NS_DECL_QUERYFRAME - explicit nsImageFrame(nsStyleContext* aContext, ClassID aID = kClassID) - : nsImageFrame(aContext, aID, mozilla::LayoutFrameType::Image) - {} - - virtual void DestroyFrom(nsIFrame* aDestructRoot) override; virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override; @@ -181,9 +176,13 @@ public: virtual bool ReflowFinished() override; virtual void ReflowCallbackCanceled() override; -protected: - nsImageFrame(nsStyleContext* aContext, ClassID, mozilla::LayoutFrameType aType); +private: + friend nsIFrame* NS_NewImageFrame(nsIPresShell*, nsStyleContext*); + explicit nsImageFrame(nsStyleContext* aContext) + : nsImageFrame(aContext, kClassID) {} +protected: + nsImageFrame(nsStyleContext* aContext, ClassID aID); virtual ~nsImageFrame(); void EnsureIntrinsicSizeAndRatio(); diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index b2f424881ab6..0eb3d61f3d49 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -140,15 +140,11 @@ protected: } }; - nsInlineFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aID, aType) + nsInlineFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID) , mBaseline(NS_INTRINSIC_WIDTH_UNKNOWN) {} - explicit nsInlineFrame(nsStyleContext* aContext, ClassID aID = kClassID) - : nsInlineFrame(aContext, aID, mozilla::LayoutFrameType::Inline) - {} - virtual LogicalSides GetLogicalSkipSides(const ReflowInput* aReflowInput = nullptr) const override; void ReflowFrames(nsPresContext* aPresContext, @@ -182,6 +178,10 @@ protected: InlineReflowInput& aState); private: + explicit nsInlineFrame(nsStyleContext* aContext) + : nsInlineFrame(aContext, kClassID) + {} + // Helper method for DrainSelfOverflowList() to deal with lazy parenting // (which we only do for nsInlineFrame, not nsFirstLineFrame). enum DrainFlags { @@ -232,7 +232,7 @@ public: protected: explicit nsFirstLineFrame(nsStyleContext* aContext) - : nsInlineFrame(aContext, kClassID, mozilla::LayoutFrameType::Line) + : nsInlineFrame(aContext, kClassID) {} virtual nsIFrame* PullOneFrame(nsPresContext* aPresContext, diff --git a/layout/generic/nsLeafFrame.h b/layout/generic/nsLeafFrame.h index b99ee1e6787c..1b3d1071ca10 100644 --- a/layout/generic/nsLeafFrame.h +++ b/layout/generic/nsLeafFrame.h @@ -77,8 +77,8 @@ public: } protected: - nsLeafFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsFrame(aContext, aID, aType) + nsLeafFrame(nsStyleContext* aContext, ClassID aID) + : nsFrame(aContext, aID) {} virtual ~nsLeafFrame(); diff --git a/layout/generic/nsPageContentFrame.h b/layout/generic/nsPageContentFrame.h index b53edf829f26..65da6a68482e 100644 --- a/layout/generic/nsPageContentFrame.h +++ b/layout/generic/nsPageContentFrame.h @@ -44,7 +44,7 @@ public: protected: explicit nsPageContentFrame(nsStyleContext* aContext) - : ViewportFrame(aContext, kClassID, mozilla::LayoutFrameType::PageContent) + : ViewportFrame(aContext, kClassID) {} nsSharedPageData* mPD; diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp index 65d2dd01a899..95ff6f9cf87b 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, kClassID, LayoutFrameType::Page) + : nsContainerFrame(aContext, kClassID) { } @@ -682,7 +682,7 @@ NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsPageBreakFrame) nsPageBreakFrame::nsPageBreakFrame(nsStyleContext* aContext) - : nsLeafFrame(aContext, kClassID, LayoutFrameType::PageBreak) + : nsLeafFrame(aContext, kClassID) , mHaveReflowed(false) { } diff --git a/layout/generic/nsPlaceholderFrame.h b/layout/generic/nsPlaceholderFrame.h index a8764ba6ea63..26429aa4444c 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, kClassID, mozilla::LayoutFrameType::Placeholder) + : nsFrame(aContext, kClassID) , mOutOfFlowFrame(nullptr) { NS_PRECONDITION(aTypeBit == PLACEHOLDER_FOR_FLOAT || diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp index 04b303083b8d..3e498d808352 100644 --- a/layout/generic/nsPluginFrame.cpp +++ b/layout/generic/nsPluginFrame.cpp @@ -145,7 +145,7 @@ protected: }; nsPluginFrame::nsPluginFrame(nsStyleContext* aContext) - : nsFrame(aContext, kClassID, LayoutFrameType::Object) + : nsFrame(aContext, kClassID) , mInstanceOwner(nullptr) , mOuterView(nullptr) , mInnerView(nullptr) diff --git a/layout/generic/nsRubyBaseContainerFrame.h b/layout/generic/nsRubyBaseContainerFrame.h index 13b5330cdbd9..4af0d7ec6abb 100644 --- a/layout/generic/nsRubyBaseContainerFrame.h +++ b/layout/generic/nsRubyBaseContainerFrame.h @@ -66,7 +66,7 @@ protected: nsStyleContext* aContext); explicit nsRubyBaseContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyBaseContainer) + : nsContainerFrame(aContext, kClassID) {} struct RubyReflowInput; diff --git a/layout/generic/nsRubyBaseFrame.h b/layout/generic/nsRubyBaseFrame.h index 404833cfaa03..a66454288e67 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, kClassID, mozilla::LayoutFrameType::RubyBase) + : nsRubyContentFrame(aContext, kClassID) {} }; diff --git a/layout/generic/nsRubyContentFrame.h b/layout/generic/nsRubyContentFrame.h index 6c445b44dba8..e28e3371798c 100644 --- a/layout/generic/nsRubyContentFrame.h +++ b/layout/generic/nsRubyContentFrame.h @@ -27,10 +27,8 @@ public: bool IsIntraLevelWhitespace() const; protected: - explicit nsRubyContentFrame(nsStyleContext* aContext, - ClassID aID, - mozilla::LayoutFrameType aType) - : nsInlineFrame(aContext, aID, aType) + nsRubyContentFrame(nsStyleContext* aContext, ClassID aID) + : nsInlineFrame(aContext, aID) {} }; diff --git a/layout/generic/nsRubyFrame.h b/layout/generic/nsRubyFrame.h index 60cc730b4b63..df2432bbebfb 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, kClassID, mozilla::LayoutFrameType::Ruby) + : nsInlineFrame(aContext, kClassID) {} void ReflowSegment(nsPresContext* aPresContext, diff --git a/layout/generic/nsRubyTextContainerFrame.h b/layout/generic/nsRubyTextContainerFrame.h index 2a86d39a8606..06f4b54990e1 100644 --- a/layout/generic/nsRubyTextContainerFrame.h +++ b/layout/generic/nsRubyTextContainerFrame.h @@ -56,7 +56,7 @@ protected: nsStyleContext* aContext); explicit nsRubyTextContainerFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyTextContainer) + : nsContainerFrame(aContext, kClassID) , mISize(0) {} diff --git a/layout/generic/nsRubyTextFrame.h b/layout/generic/nsRubyTextFrame.h index 30c1f944283b..be4985d559a8 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, kClassID, mozilla::LayoutFrameType::RubyText) + : nsRubyContentFrame(aContext, kClassID) {} }; diff --git a/layout/generic/nsSimplePageSequenceFrame.cpp b/layout/generic/nsSimplePageSequenceFrame.cpp index 0da38322495b..dc8d292d5cb3 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, kClassID, LayoutFrameType::Sequence) + : nsContainerFrame(aContext, kClassID) , mTotalPages(-1) , mSelectionHeight(-1) , mYSelOffset(0) diff --git a/layout/generic/nsSplittableFrame.h b/layout/generic/nsSplittableFrame.h index 4718be862bc4..fe08abec92be 100644 --- a/layout/generic/nsSplittableFrame.h +++ b/layout/generic/nsSplittableFrame.h @@ -74,9 +74,8 @@ public: static void RemoveFromFlow(nsIFrame* aFrame); protected: - explicit nsSplittableFrame(nsStyleContext* aContext, ClassID aID, - mozilla::LayoutFrameType aType) - : nsFrame(aContext, aID, aType) + nsSplittableFrame(nsStyleContext* aContext, ClassID aID) + : nsFrame(aContext, aID) , mPrevContinuation(nullptr) , mNextContinuation(nullptr) {} diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index 2727e52dcc8d..c2377497ab56 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -59,7 +59,7 @@ GetDocumentFromView(nsView* aView) } nsSubDocumentFrame::nsSubDocumentFrame(nsStyleContext* aContext) - : nsAtomicContainerFrame(aContext, kClassID, LayoutFrameType::SubDocument) + : nsAtomicContainerFrame(aContext, kClassID) , mOuterView(nullptr) , mInnerView(nullptr) , mIsInline(false) diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 6ff5e1f9c0d6..49f35f9d2ec2 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -51,7 +51,11 @@ class nsTextFrame : public nsFrame public: explicit nsTextFrame(nsStyleContext* aContext, ClassID aID = kClassID) - : nsTextFrame(aContext, aID, mozilla::LayoutFrameType::Text) + : nsFrame(aContext, aID) + , mNextContinuation(nullptr) + , mContentOffset(0) + , mContentLengthHint(0) + , mAscent(0) {} NS_DECL_FRAMEARENA_HELPERS(nsTextFrame) @@ -648,16 +652,6 @@ public: uint32_t CountGraphemeClusters() const; protected: - nsTextFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType) - : nsFrame(aContext, aID, aType) - , mNextContinuation(nullptr) - , mContentOffset(0) - , mContentLengthHint(0) - , mAscent(0) - { - NS_ASSERTION(mContentOffset == 0, "Bogus content offset"); - } - virtual ~nsTextFrame(); RefPtr mTextRun; diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 8f625b58eb4b..ecba01313718 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, kClassID, LayoutFrameType::HTMLVideo) + : nsContainerFrame(aContext, kClassID) { EnableVisibilityTracking(); } diff --git a/layout/mathml/nsMathMLContainerFrame.h b/layout/mathml/nsMathMLContainerFrame.h index 2068d8776961..1dd431ff3a33 100644 --- a/layout/mathml/nsMathMLContainerFrame.h +++ b/layout/mathml/nsMathMLContainerFrame.h @@ -33,7 +33,7 @@ class nsMathMLContainerFrame : public nsContainerFrame, friend class nsMathMLmfencedFrame; public: nsMathMLContainerFrame(nsStyleContext* aContext, ClassID aID) - : nsContainerFrame(aContext, aID, mozilla::LayoutFrameType::None) + : nsContainerFrame(aContext, aID) , mIntrinsicWidth(NS_INTRINSIC_WIDTH_UNKNOWN) , mBlockStartAscent(0) {} diff --git a/layout/svg/SVGFEContainerFrame.cpp b/layout/svg/SVGFEContainerFrame.cpp index 1a1bff533ead..d6f31428d985 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, kClassID, mozilla::LayoutFrameType::SVGFEContainer) + : nsContainerFrame(aContext, kClassID) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/SVGFEImageFrame.cpp b/layout/svg/SVGFEImageFrame.cpp index f5109139199f..a6d0c9d587c4 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, kClassID, LayoutFrameType::SVGFEImage) + : nsFrame(aContext, kClassID) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); diff --git a/layout/svg/SVGFELeafFrame.cpp b/layout/svg/SVGFELeafFrame.cpp index 06be20aa2c36..71a1bb1a16e8 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, kClassID, LayoutFrameType::SVGFELeaf) + : nsFrame(aContext, kClassID) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/SVGFEUnstyledLeafFrame.cpp b/layout/svg/SVGFEUnstyledLeafFrame.cpp index ac9ad75b6e6b..c2ab2af093ef 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, kClassID, LayoutFrameType::SVGFEUnstyledLeaf) + : nsFrame(aContext, kClassID) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/SVGGeometryFrame.h b/layout/svg/SVGGeometryFrame.h index 9b9f381c2a93..6b3bfd0b5871 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, nsIFrame::ClassID aID, mozilla::LayoutFrameType aType) - : nsFrame(aContext, aID, aType) + SVGGeometryFrame(nsStyleContext* aContext, nsIFrame::ClassID aID) + : nsFrame(aContext, aID) { AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_MAY_BE_TRANSFORMED); } explicit SVGGeometryFrame(nsStyleContext* aContext) - : SVGGeometryFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGGeometry) + : SVGGeometryFrame(aContext, kClassID) {} public: diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h index 861afbfc3283..c585c97bcc6c 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, kClassID, mozilla::LayoutFrameType::SVGText) + : nsSVGDisplayContainerFrame(aContext, kClassID) , mTrailingUndisplayedCharacters(0) , mFontSizeScaleFactor(1.0f) , mLastContextScale(1.0f) diff --git a/layout/svg/SVGViewFrame.cpp b/layout/svg/SVGViewFrame.cpp index c10f0c0b8135..2c250419abf7 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, kClassID, LayoutFrameType::SVGView) + : nsFrame(aContext, kClassID) { AddStateBits(NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/nsSVGAFrame.cpp b/layout/svg/nsSVGAFrame.cpp index a928d23c170f..624199291d1d 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, kClassID, LayoutFrameType::SVGA) + : nsSVGDisplayContainerFrame(aContext, kClassID) {} public: diff --git a/layout/svg/nsSVGClipPathFrame.h b/layout/svg/nsSVGClipPathFrame.h index 05e6cb5eb92a..039582180ec2 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, kClassID, mozilla::LayoutFrameType::SVGClipPath) + : nsSVGContainerFrame(aContext, kClassID) , mIsBeingProcessed(false) { AddStateBits(NS_FRAME_IS_NONDISPLAY); diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index d4ab78d92b86..6fed49ef35b9 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, nsSVGContainerFrame::kClassID, LayoutFrameType::None); + new (aPresShell) nsSVGContainerFrame(aContext, nsSVGContainerFrame::kClassID); // 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. diff --git a/layout/svg/nsSVGContainerFrame.h b/layout/svg/nsSVGContainerFrame.h index 9a9566cce109..dc31668b4923 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, ClassID aID, mozilla::LayoutFrameType aType) - : nsContainerFrame(aContext, aID, aType) + nsSVGContainerFrame(nsStyleContext* aContext, ClassID aID) + : nsContainerFrame(aContext, aID) { AddStateBits(NS_FRAME_SVG_LAYOUT); } @@ -110,9 +110,8 @@ class nsSVGDisplayContainerFrame : public nsSVGContainerFrame, public nsSVGDisplayableFrame { protected: - nsSVGDisplayContainerFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, - mozilla::LayoutFrameType aType) - : nsSVGContainerFrame(aContext, aID, aType) + nsSVGDisplayContainerFrame(nsStyleContext* aContext, nsIFrame::ClassID aID) + : nsSVGContainerFrame(aContext, aID) { AddStateBits(NS_FRAME_MAY_BE_TRANSFORMED); } diff --git a/layout/svg/nsSVGFilterFrame.h b/layout/svg/nsSVGFilterFrame.h index e344a940b4fe..b2d4f64e0069 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, kClassID, mozilla::LayoutFrameType::SVGFilter) + : nsSVGContainerFrame(aContext, kClassID) , mLoopFlag(false) , mNoHRefURI(false) { diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp index 267bbe0cbd45..1bade8f45ffe 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, kClassID, LayoutFrameType::SVGForeignObject) + : nsContainerFrame(aContext, kClassID) , 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 67cb0addca3d..f9e292128cd0 100644 --- a/layout/svg/nsSVGGFrame.h +++ b/layout/svg/nsSVGGFrame.h @@ -15,13 +15,12 @@ class nsSVGGFrame : public nsSVGDisplayContainerFrame { friend nsIFrame* NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); -protected: - nsSVGGFrame(nsStyleContext* aContext, nsIFrame::ClassID aID, mozilla::LayoutFrameType aType) - : nsSVGDisplayContainerFrame(aContext, aID, aType) - {} + explicit nsSVGGFrame(nsStyleContext* aContext) + : nsSVGGFrame(aContext, kClassID) {} - explicit nsSVGGFrame(nsStyleContext* aContext, nsIFrame::ClassID aID = kClassID) - : nsSVGGFrame(aContext, aID, mozilla::LayoutFrameType::SVGG) +protected: + nsSVGGFrame(nsStyleContext* aContext, nsIFrame::ClassID aID) + : nsSVGDisplayContainerFrame(aContext, aID) {} public: diff --git a/layout/svg/nsSVGGenericContainerFrame.h b/layout/svg/nsSVGGenericContainerFrame.h index f918dcc975f9..52b8c351abf8 100644 --- a/layout/svg/nsSVGGenericContainerFrame.h +++ b/layout/svg/nsSVGGenericContainerFrame.h @@ -25,8 +25,7 @@ class nsSVGGenericContainerFrame final : public nsSVGDisplayContainerFrame protected: explicit nsSVGGenericContainerFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, kClassID, - mozilla::LayoutFrameType::SVGGenericContainer) + : nsSVGDisplayContainerFrame(aContext, kClassID) {} public: diff --git a/layout/svg/nsSVGGradientFrame.cpp b/layout/svg/nsSVGGradientFrame.cpp index dcee35cf31ee..387155527a78 100644 --- a/layout/svg/nsSVGGradientFrame.cpp +++ b/layout/svg/nsSVGGradientFrame.cpp @@ -26,9 +26,8 @@ using namespace mozilla::gfx; // Implementation nsSVGGradientFrame::nsSVGGradientFrame(nsStyleContext* aContext, - ClassID aID, - LayoutFrameType aType) - : nsSVGPaintServerFrame(aContext, aID, aType) + ClassID aID) + : nsSVGPaintServerFrame(aContext, aID) , mSource(nullptr) , mLoopFlag(false) , mNoHRefURI(false) diff --git a/layout/svg/nsSVGGradientFrame.h b/layout/svg/nsSVGGradientFrame.h index cbe9d1baeaf8..d663c68526bc 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, ClassID aID, mozilla::LayoutFrameType aType); + nsSVGGradientFrame(nsStyleContext* aContext, ClassID aID); public: NS_DECL_ABSTRACT_FRAME(nsSVGGradientFrame) @@ -127,7 +127,7 @@ class nsSVGLinearGradientFrame : public nsSVGGradientFrame nsStyleContext* aContext); protected: explicit nsSVGLinearGradientFrame(nsStyleContext* aContext) - : nsSVGGradientFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGLinearGradient) + : nsSVGGradientFrame(aContext, kClassID) {} public: @@ -169,7 +169,7 @@ class nsSVGRadialGradientFrame : public nsSVGGradientFrame nsStyleContext* aContext); protected: explicit nsSVGRadialGradientFrame(nsStyleContext* aContext) - : nsSVGGradientFrame(aContext, kClassID, mozilla::LayoutFrameType::SVGRadialGradient) + : nsSVGGradientFrame(aContext, kClassID) {} public: diff --git a/layout/svg/nsSVGImageFrame.h b/layout/svg/nsSVGImageFrame.h index fe7343d6f2c9..b2c90fd6402d 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, kClassID, LayoutFrameType::SVGImage) + : SVGGeometryFrame(aContext, kClassID) , mReflowCallbackPosted(false) , mForceSyncDecoding(false) { diff --git a/layout/svg/nsSVGInnerSVGFrame.h b/layout/svg/nsSVGInnerSVGFrame.h index 5a60f1d578d7..42f358c06933 100644 --- a/layout/svg/nsSVGInnerSVGFrame.h +++ b/layout/svg/nsSVGInnerSVGFrame.h @@ -21,8 +21,7 @@ class nsSVGInnerSVGFrame final NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); protected: explicit nsSVGInnerSVGFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, kClassID, - mozilla::LayoutFrameType::SVGInnerSVG) + : nsSVGDisplayContainerFrame(aContext, kClassID) { } diff --git a/layout/svg/nsSVGMarkerFrame.h b/layout/svg/nsSVGMarkerFrame.h index 728fd82f0da8..92bf0b9a8f28 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, kClassID, mozilla::LayoutFrameType::SVGMarker) + : nsSVGContainerFrame(aContext, kClassID) , mMarkedFrame(nullptr) , mInUse(false) , mInUse2(false) @@ -141,8 +141,7 @@ class nsSVGMarkerAnonChildFrame final : public nsSVGDisplayContainerFrame nsStyleContext* aContext); explicit nsSVGMarkerAnonChildFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, kClassID, - mozilla::LayoutFrameType::SVGMarkerAnonChild) + : nsSVGDisplayContainerFrame(aContext, kClassID) {} public: diff --git a/layout/svg/nsSVGMaskFrame.h b/layout/svg/nsSVGMaskFrame.h index 371607807f80..b8ccfda754c2 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, kClassID, mozilla::LayoutFrameType::SVGMask) + : nsSVGContainerFrame(aContext, kClassID) , mInUse(false) { AddStateBits(NS_FRAME_IS_NONDISPLAY); diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index 52c4a26c8568..6a4d0ce72e01 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, kClassID, LayoutFrameType::SVGOuterSVG) + : nsSVGDisplayContainerFrame(aContext, kClassID) , mCallingReflowSVG(false) , mFullZoom(aContext->PresContext()->GetFullZoom()) , mViewportInitialized(false) diff --git a/layout/svg/nsSVGOuterSVGFrame.h b/layout/svg/nsSVGOuterSVGFrame.h index 17fd30f1ea5c..029ed449b139 100644 --- a/layout/svg/nsSVGOuterSVGFrame.h +++ b/layout/svg/nsSVGOuterSVGFrame.h @@ -233,8 +233,7 @@ class nsSVGOuterSVGAnonChildFrame final : public nsSVGDisplayContainerFrame nsStyleContext* aContext); explicit nsSVGOuterSVGAnonChildFrame(nsStyleContext* aContext) - : nsSVGDisplayContainerFrame(aContext, kClassID, - mozilla::LayoutFrameType::SVGOuterSVGAnonChild) + : nsSVGDisplayContainerFrame(aContext, kClassID) {} public: diff --git a/layout/svg/nsSVGPaintServerFrame.h b/layout/svg/nsSVGPaintServerFrame.h index e387f4d99bb2..968b8932ab7f 100644 --- a/layout/svg/nsSVGPaintServerFrame.h +++ b/layout/svg/nsSVGPaintServerFrame.h @@ -57,9 +57,8 @@ class nsSVGPaintServerFrame : public nsSVGContainerFrame protected: typedef mozilla::gfx::DrawTarget DrawTarget; - explicit nsSVGPaintServerFrame(nsStyleContext* aContext, ClassID aID, - mozilla::LayoutFrameType aType) - : nsSVGContainerFrame(aContext, aID, aType) + nsSVGPaintServerFrame(nsStyleContext* aContext, ClassID aID) + : nsSVGContainerFrame(aContext, aID) { AddStateBits(NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/nsSVGPatternFrame.cpp b/layout/svg/nsSVGPatternFrame.cpp index 298876920a13..0b448a9ff460 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, kClassID, LayoutFrameType::SVGPattern) + : nsSVGPaintServerFrame(aContext, kClassID) , mSource(nullptr) , mLoopFlag(false) , mNoHRefURI(false) diff --git a/layout/svg/nsSVGStopFrame.cpp b/layout/svg/nsSVGStopFrame.cpp index 934e226fcadf..41e39aa283de 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, kClassID, LayoutFrameType::SVGStop) + : nsFrame(aContext, kClassID) { AddStateBits(NS_FRAME_IS_NONDISPLAY); } diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp index 72b03b9f9f05..1973034afcf3 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, kClassID, LayoutFrameType::SVGSwitch) + : nsSVGGFrame(aContext, kClassID) {} public: diff --git a/layout/svg/nsSVGUseFrame.cpp b/layout/svg/nsSVGUseFrame.cpp index a2848a132cea..3749bb1c4625 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, kClassID, LayoutFrameType::SVGUse) + : nsSVGGFrame(aContext, kClassID) , mHasValidDimensions(true) {} diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 4f34bb3c8579..a6891e2a33b2 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -43,9 +43,8 @@ using namespace mozilla::image; nsTableCellFrame::nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame, - ClassID aID, - LayoutFrameType aType) - : nsContainerFrame(aContext, aID, aType) + ClassID aID) + : nsContainerFrame(aContext, aID) , mDesiredSize(aTableFrame->GetWritingMode()) { mColIndex = 0; @@ -1087,7 +1086,7 @@ nsTableCellFrame::GetFrameName(nsAString& aResult) const nsBCTableCellFrame::nsBCTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame) - : nsTableCellFrame(aContext, aTableFrame, kClassID, LayoutFrameType::BCTableCell) + : nsTableCellFrame(aContext, aTableFrame, kClassID) { mBStartBorder = mIEndBorder = mBEndBorder = mIStartBorder = 0; } diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index c5f537cc128f..11c09981dffa 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -37,6 +37,13 @@ class nsTableCellFrame : public nsContainerFrame, typedef mozilla::gfx::DrawTarget DrawTarget; typedef mozilla::image::DrawResult DrawResult; + friend nsTableCellFrame* NS_NewTableCellFrame(nsIPresShell* aPresShell, + nsStyleContext* aContext, + nsTableFrame* aTableFrame); + + nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame) + : nsTableCellFrame(aContext, aTableFrame, kClassID) {} + protected: typedef mozilla::WritingMode WritingMode; typedef mozilla::LogicalSide LogicalSide; @@ -46,16 +53,6 @@ public: NS_DECL_QUERYFRAME NS_DECL_FRAMEARENA_HELPERS(nsTableCellFrame) - // default constructor supplied by the compiler - - nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame, - ClassID aID = kClassID) - : nsTableCellFrame(aContext, aTableFrame, aID, - mozilla::LayoutFrameType::TableCell) - {} - - ~nsTableCellFrame(); - nsTableRowFrame* GetTableRowFrame() const { nsIFrame* parent = GetParent(); @@ -232,10 +229,9 @@ public: virtual void InvalidateFrameForRemoval() override { InvalidateFrameSubtree(); } protected: - nsTableCellFrame(nsStyleContext* aContext, - nsTableFrame* aTableFrame, - ClassID aID, - mozilla::LayoutFrameType aType); + nsTableCellFrame(nsStyleContext* aContext, nsTableFrame* aTableFrame, + ClassID aID); + ~nsTableCellFrame(); virtual LogicalSides GetLogicalSkipSides(const ReflowInput* aReflowInput = nullptr) const override; diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp index 585e30108890..4a7bfa18c764 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, kClassID, LayoutFrameType::TableCol) + : nsSplittableFrame(aContext, kClassID) , mMinCoord(0) , mPrefCoord(0) , mSpanMinCoord(0) diff --git a/layout/tables/nsTableColGroupFrame.h b/layout/tables/nsTableColGroupFrame.h index ee4bf97421f9..07c444eed1af 100644 --- a/layout/tables/nsTableColGroupFrame.h +++ b/layout/tables/nsTableColGroupFrame.h @@ -221,7 +221,7 @@ protected: }; inline nsTableColGroupFrame::nsTableColGroupFrame(nsStyleContext* aContext) - : nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::TableColGroup) + : nsContainerFrame(aContext, kClassID) , mColCount(0) , mStartColIndex(0) { diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index a90391ac891b..6fcd2853c3ad 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -147,7 +147,7 @@ nsTableFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const } nsTableFrame::nsTableFrame(nsStyleContext* aContext, ClassID aID) - : nsContainerFrame(aContext, aID, LayoutFrameType::Table) + : nsContainerFrame(aContext, aID) , mCellMap(nullptr) , mTableLayoutStrategy(nullptr) { diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 5b5fe89dda84..32992dabb263 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -130,7 +130,7 @@ NS_QUERYFRAME_HEAD(nsTableRowFrame) NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) nsTableRowFrame::nsTableRowFrame(nsStyleContext* aContext, ClassID aID) - : nsContainerFrame(aContext, aID, LayoutFrameType::TableRow) + : nsContainerFrame(aContext, aID) , mContentBSize(0) , mStylePctBSize(0) , mStyleFixedBSize(0) diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 5d13e0d54cd0..f05dca78ae32 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, kClassID, LayoutFrameType::TableRowGroup) + : nsContainerFrame(aContext, kClassID) { SetRepeatable(false); } diff --git a/layout/tables/nsTableWrapperFrame.cpp b/layout/tables/nsTableWrapperFrame.cpp index 307e6bccdfdb..3ad5c0247b51 100644 --- a/layout/tables/nsTableWrapperFrame.cpp +++ b/layout/tables/nsTableWrapperFrame.cpp @@ -43,7 +43,7 @@ nsTableWrapperFrame::GetLogicalBaseline(WritingMode aWritingMode) const } nsTableWrapperFrame::nsTableWrapperFrame(nsStyleContext* aContext, ClassID aID) - : nsContainerFrame(aContext, aID, LayoutFrameType::TableWrapper) + : nsContainerFrame(aContext, aID) { } diff --git a/layout/xul/nsBox.cpp b/layout/xul/nsBox.cpp index 9d76c1e3ad13..a251f9410fcd 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(ClassID aID, LayoutFrameType aType) - : nsIFrame(aID, aType) +nsBox::nsBox(ClassID aID) + : nsIFrame(aID) { MOZ_COUNT_CTOR(nsBox); //mX = 0; diff --git a/layout/xul/nsBox.h b/layout/xul/nsBox.h index 3d47305294bc..fec8ae98dab2 100644 --- a/layout/xul/nsBox.h +++ b/layout/xul/nsBox.h @@ -50,7 +50,7 @@ public: void PropagateDebug(nsBoxLayoutState& aState); #endif - nsBox(ClassID aID, mozilla::LayoutFrameType); + nsBox(ClassID aID); virtual ~nsBox(); /** diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp index 3fa6bfbf9a3c..ceead31bf173 100644 --- a/layout/xul/nsBoxFrame.cpp +++ b/layout/xul/nsBoxFrame.cpp @@ -118,10 +118,9 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) nsBoxFrame::nsBoxFrame(nsStyleContext* aContext, ClassID aID, - LayoutFrameType aType, bool aIsRoot, nsBoxLayout* aLayoutManager) - : nsContainerFrame(aContext, aID, aType) + : nsContainerFrame(aContext, aID) , mFlex(0) , mAscent(0) { diff --git a/layout/xul/nsBoxFrame.h b/layout/xul/nsBoxFrame.h index e7e6d92053de..aca7a721adb2 100644 --- a/layout/xul/nsBoxFrame.h +++ b/layout/xul/nsBoxFrame.h @@ -138,18 +138,6 @@ public: virtual bool HonorPrintBackgroundSettings() override; - virtual ~nsBoxFrame(); - - explicit nsBoxFrame(nsStyleContext* aContext, - ClassID aID = kClassID, - bool aIsRoot = false, - nsBoxLayout* aLayoutManager = nullptr) - : nsBoxFrame(aContext, aID, - mozilla::LayoutFrameType::Box, - aIsRoot, - aLayoutManager) - {} - // virtual so nsStackFrame, nsButtonBoxFrame, nsSliderFrame and nsMenuFrame // can override it virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, @@ -183,12 +171,13 @@ public: */ virtual bool SupportsOrdinalsInChildren(); +private: + explicit nsBoxFrame(nsStyleContext* aContext) + : nsBoxFrame(aContext, kClassID, false, nullptr) {} protected: - nsBoxFrame(nsStyleContext* aContext, - ClassID aID, - mozilla::LayoutFrameType aType, - bool aIsRoot = false, + nsBoxFrame(nsStyleContext* aContext, ClassID aID, bool aIsRoot = false, nsBoxLayout* aLayoutManager = nullptr); + virtual ~nsBoxFrame(); #ifdef DEBUG_LAYOUT virtual void GetBoxName(nsAutoString& aName) override; diff --git a/layout/xul/nsDeckFrame.cpp b/layout/xul/nsDeckFrame.cpp index 1719d8c1417f..30aacbb921ff 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, kClassID, LayoutFrameType::Deck) + : nsBoxFrame(aContext, kClassID) , mIndex(0) { nsCOMPtr layout; diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp index 62e106bdc43f..e785f626049a 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, kClassID, LayoutFrameType::ImageBox) + : nsLeafBoxFrame(aContext, kClassID) , mIntrinsicSize(0, 0) , mLoadFlags(nsIRequest::LOAD_NORMAL) , mRequestRegistered(false) diff --git a/layout/xul/nsLeafBoxFrame.cpp b/layout/xul/nsLeafBoxFrame.cpp index 85274d39dfc4..8858e06089ad 100644 --- a/layout/xul/nsLeafBoxFrame.cpp +++ b/layout/xul/nsLeafBoxFrame.cpp @@ -40,11 +40,6 @@ NS_NewLeafBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext) NS_IMPL_FRAMEARENA_HELPERS(nsLeafBoxFrame) -nsLeafBoxFrame::nsLeafBoxFrame(nsStyleContext* aContext, ClassID aID, LayoutFrameType aType) - : nsLeafFrame(aContext, aID, aType) -{ -} - #ifdef DEBUG_LAYOUT void nsLeafBoxFrame::GetBoxName(nsAutoString& aName) diff --git a/layout/xul/nsLeafBoxFrame.h b/layout/xul/nsLeafBoxFrame.h index c557050762d5..88c169b8fe5c 100644 --- a/layout/xul/nsLeafBoxFrame.h +++ b/layout/xul/nsLeafBoxFrame.h @@ -83,11 +83,9 @@ protected: virtual nscoord GetIntrinsicISize() override; explicit nsLeafBoxFrame(nsStyleContext* aContext, ClassID aID = kClassID) - : nsLeafBoxFrame(aContext, aID, mozilla::LayoutFrameType::LeafBox) + : nsLeafFrame(aContext, aID) {} - nsLeafBoxFrame(nsStyleContext* aContext, ClassID aID, mozilla::LayoutFrameType aType); - private: void UpdateMouseThrough(); diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index 72a8c76d0ed6..6f58aedc3330 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, kClassID, LayoutFrameType::Menu) + : nsBoxFrame(aContext, kClassID) , mIsMenu(false) , mChecked(false) , mIgnoreAccelTextChange(false) diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index ac8877258186..089cecd634ce 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, kClassID, LayoutFrameType::MenuPopup) + : nsBoxFrame(aContext, kClassID) , mCurrentMenu(nullptr) , mView(nullptr) , mPrefSize(-1, -1) diff --git a/layout/xul/nsPopupSetFrame.h b/layout/xul/nsPopupSetFrame.h index 5449c20ed7ae..51bcf494ee48 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, kClassID, mozilla::LayoutFrameType::PopupSet) + : nsBoxFrame(aContext, kClassID) {} ~nsPopupSetFrame() {} diff --git a/layout/xul/nsRootBoxFrame.cpp b/layout/xul/nsRootBoxFrame.cpp index 655aee3679f5..ec55e3d8171a 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, kClassID, LayoutFrameType::Root, true) + : nsBoxFrame(aContext, kClassID, true) , mPopupSetFrame(nullptr) , mDefaultTooltip(nullptr) { diff --git a/layout/xul/nsScrollbarFrame.h b/layout/xul/nsScrollbarFrame.h index 758fb612da22..355f5a0a439f 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, kClassID, mozilla::LayoutFrameType::Scrollbar) + : nsBoxFrame(aContext, kClassID) , mIncrement(0) , mSmoothScroll(false) , mScrollbarMediator(nullptr) diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp index f57ca27a96ad..0a76a1f92971 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, kClassID, LayoutFrameType::Slider) + : nsBoxFrame(aContext, kClassID) , mRatio(0.0f) , mDragStart(0) , mThumbStart(0) diff --git a/layout/xul/nsXULLabelFrame.h b/layout/xul/nsXULLabelFrame.h index 880517d97ccd..4d83efe15891 100644 --- a/layout/xul/nsXULLabelFrame.h +++ b/layout/xul/nsXULLabelFrame.h @@ -40,7 +40,7 @@ public: protected: explicit nsXULLabelFrame(nsStyleContext* aContext) - : nsBlockFrame(aContext, kClassID, mozilla::LayoutFrameType::XULLabel) + : nsBlockFrame(aContext, kClassID) {} nsresult RegUnregAccessKey(bool aDoReg);