зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1364805 part 2 - Add a nsIFrame::mClass field and propagate the concrete class' value up the ctor chain. r=jfkthame
nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is a strict subset of the nsQueryFrame::FrameIID values. For a concrete frame class, its FrameIID is the same numeric value as its ClassID. MozReview-Commit-ID: 1N0AkCGo1ol
This commit is contained in:
Родитель
ec6b1ef065
Коммит
1242172259
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
using namespace mozilla;
|
||||
|
||||
nsGfxButtonControlFrame::nsGfxButtonControlFrame(nsStyleContext* aContext)
|
||||
: nsHTMLButtonControlFrame(aContext, LayoutFrameType::GfxButtonControl)
|
||||
: nsHTMLButtonControlFrame(aContext, kClassID, LayoutFrameType::GfxButtonControl)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsGfxCheckboxControlFrame)
|
|||
//------------------------------------------------------------
|
||||
// Initialize GFX-rendered state
|
||||
nsGfxCheckboxControlFrame::nsGfxCheckboxControlFrame(nsStyleContext* aContext)
|
||||
: nsFormControlFrame(aContext)
|
||||
: nsFormControlFrame(aContext, kClassID)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ NS_NewGfxRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||
NS_IMPL_FRAMEARENA_HELPERS(nsGfxRadioControlFrame)
|
||||
|
||||
nsGfxRadioControlFrame::nsGfxRadioControlFrame(nsStyleContext* aContext):
|
||||
nsFormControlFrame(aContext)
|
||||
nsFormControlFrame(aContext, kClassID)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
};
|
||||
|
||||
nsImageControlFrame::nsImageControlFrame(nsStyleContext* aContext)
|
||||
: nsImageFrame(aContext, LayoutFrameType::ImageControl)
|
||||
: nsImageFrame(aContext, kClassID, LayoutFrameType::ImageControl)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ NS_NewRangeFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||
}
|
||||
|
||||
nsRangeFrame::nsRangeFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::Range)
|
||||
: nsContainerFrame(aContext, kClassID, LayoutFrameType::Range)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsSelectsAreaFrame(nsStyleContext* aContext) :
|
||||
nsBlockFrame(aContext),
|
||||
nsBlockFrame(aContext, kClassID),
|
||||
mBSizeOfARow(0)
|
||||
{}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit BRFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, LayoutFrameType::Br)
|
||||
: nsFrame(aContext, kClassID, LayoutFrameType::Br)
|
||||
, mAscent(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
{}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{}
|
||||
|
||||
|
|
|
@ -40,9 +40,9 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
nsAtomicContainerFrame(nsStyleContext* aContext,
|
||||
nsAtomicContainerFrame(nsStyleContext* aContext, ClassID aID,
|
||||
mozilla::LayoutFrameType aType)
|
||||
: nsContainerFrame(aContext, aType)
|
||||
: nsContainerFrame(aContext, aID, aType)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
{}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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();
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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())
|
||||
{}
|
||||
|
||||
|
|
|
@ -603,10 +603,11 @@ public:
|
|||
typedef mozilla::Sides Sides;
|
||||
typedef mozilla::LogicalSides LogicalSides;
|
||||
typedef mozilla::SmallPointerArray<mozilla::DisplayItemData> 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?
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsPageContentFrame(nsStyleContext* aContext)
|
||||
: ViewportFrame(aContext, mozilla::LayoutFrameType::PageContent)
|
||||
: ViewportFrame(aContext, kClassID, mozilla::LayoutFrameType::PageContent)
|
||||
{}
|
||||
|
||||
nsSharedPageData* mPD;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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 ||
|
||||
|
|
|
@ -145,7 +145,7 @@ protected:
|
|||
};
|
||||
|
||||
nsPluginFrame::nsPluginFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, LayoutFrameType::Object)
|
||||
: nsFrame(aContext, kClassID, LayoutFrameType::Object)
|
||||
, mInstanceOwner(nullptr)
|
||||
, mOuterView(nullptr)
|
||||
, mInnerView(nullptr)
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
|||
nsStyleContext* aContext);
|
||||
|
||||
explicit nsRubyBaseContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::RubyBaseContainer)
|
||||
: nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyBaseContainer)
|
||||
{}
|
||||
|
||||
struct RubyReflowInput;
|
||||
|
|
|
@ -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)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -28,8 +28,9 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsRubyContentFrame(nsStyleContext* aContext,
|
||||
ClassID aID,
|
||||
mozilla::LayoutFrameType aType)
|
||||
: nsInlineFrame(aContext, aType)
|
||||
: nsInlineFrame(aContext, aID, aType)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -56,7 +56,7 @@ protected:
|
|||
nsStyleContext* aContext);
|
||||
|
||||
explicit nsRubyTextContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::RubyTextContainer)
|
||||
: nsContainerFrame(aContext, kClassID, mozilla::LayoutFrameType::RubyTextContainer)
|
||||
, mISize(0)
|
||||
{}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -4437,7 +4437,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsContinuingTextFrame(nsStyleContext* aContext)
|
||||
: nsTextFrame(aContext)
|
||||
: nsTextFrame(aContext, kClassID)
|
||||
{}
|
||||
|
||||
nsTextFrame* mPrevContinuation;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -75,7 +75,7 @@ SwapScaleWidthHeightForRotation(IntSize& aSize, VideoInfo::Rotation aDegrees)
|
|||
}
|
||||
|
||||
nsVideoFrame::nsVideoFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::HTMLVideo)
|
||||
: nsContainerFrame(aContext, kClassID, LayoutFrameType::HTMLVideo)
|
||||
{
|
||||
EnableVisibilityTracking();
|
||||
}
|
||||
|
|
|
@ -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() {}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -59,7 +59,7 @@ private:
|
|||
|
||||
protected:
|
||||
explicit nsMathMLmactionFrame(nsStyleContext* aContext) :
|
||||
nsMathMLSelectedFrame(aContext) {}
|
||||
nsMathMLSelectedFrame(aContext, kClassID) {}
|
||||
virtual ~nsMathMLmactionFrame();
|
||||
|
||||
private:
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
explicit nsMathMLmencloseFrame(nsStyleContext* aContext);
|
||||
explicit nsMathMLmencloseFrame(nsStyleContext* aContext, ClassID aID = kClassID);
|
||||
virtual ~nsMathMLmencloseFrame();
|
||||
|
||||
nsresult PlaceInternal(DrawTarget* aDrawTarget,
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsMathMLmfencedFrame(nsStyleContext* aContext)
|
||||
: nsMathMLContainerFrame(aContext)
|
||||
: nsMathMLContainerFrame(aContext, kClassID)
|
||||
, mOpenChar(nullptr)
|
||||
, mCloseChar(nullptr)
|
||||
, mSeparatorsChar(nullptr)
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsMathMLmfracFrame(nsStyleContext* aContext)
|
||||
: nsMathMLContainerFrame(aContext)
|
||||
: nsMathMLContainerFrame(aContext, kClassID)
|
||||
, mLineRect()
|
||||
, mSlashChar(nullptr)
|
||||
, mLineThickness(0)
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsMathMLmpaddedFrame(nsStyleContext* aContext)
|
||||
: nsMathMLContainerFrame(aContext)
|
||||
: nsMathMLContainerFrame(aContext, kClassID)
|
||||
, mWidthSign(0)
|
||||
, mHeightSign(0)
|
||||
, mDepthSign(0)
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -47,7 +47,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
explicit nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
|
||||
explicit nsMathMLmrowFrame(nsStyleContext* aContext)
|
||||
: nsMathMLContainerFrame(aContext, kClassID) {}
|
||||
virtual ~nsMathMLmrowFrame();
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -19,7 +19,7 @@ NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||
NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmsqrtFrame)
|
||||
|
||||
nsMathMLmsqrtFrame::nsMathMLmsqrtFrame(nsStyleContext* aContext) :
|
||||
nsMathMLmencloseFrame(aContext)
|
||||
nsMathMLmencloseFrame(aContext, kClassID)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsMathMLmunderoverFrame(nsStyleContext* aContext)
|
||||
: nsMathMLContainerFrame(aContext)
|
||||
: nsMathMLContainerFrame(aContext, kClassID)
|
||||
, mIncrementUnder(false)
|
||||
, mIncrementOver(false)
|
||||
{}
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
protected:
|
||||
explicit nsMathMLsemanticsFrame(nsStyleContext* aContext) :
|
||||
nsMathMLSelectedFrame(aContext) {}
|
||||
nsMathMLSelectedFrame(aContext, kClassID) {}
|
||||
virtual ~nsMathMLsemanticsFrame();
|
||||
|
||||
nsIFrame* GetSelectedFrame() override;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 <defs> 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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 |
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -25,7 +25,7 @@ class nsSVGGenericContainerFrame final : public nsSVGDisplayContainerFrame
|
|||
|
||||
protected:
|
||||
explicit nsSVGGenericContainerFrame(nsStyleContext* aContext)
|
||||
: nsSVGDisplayContainerFrame(aContext,
|
||||
: nsSVGDisplayContainerFrame(aContext, kClassID,
|
||||
mozilla::LayoutFrameType::SVGGenericContainer)
|
||||
{}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче