зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1630704 - Part 25: Construct nsIFrame from NS_NewEmptyFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81844
This commit is contained in:
Родитель
dbd0071486
Коммит
9bfce76b8d
|
@ -32,6 +32,7 @@ FRAME_CLASSES = [
|
|||
Frame("nsFirstLineFrame", "Line", NOT_LEAF),
|
||||
Frame("nsFlexContainerFrame", "FlexContainer", NOT_LEAF),
|
||||
Frame("nsFrame", "None", NOT_LEAF),
|
||||
Frame("nsIFrame", "None", NOT_LEAF),
|
||||
Frame("nsGfxButtonControlFrame", "GfxButtonControl", LEAF),
|
||||
Frame("nsGridContainerFrame", "GridContainer", NOT_LEAF),
|
||||
Frame("nsGridRowGroupFrame", "Box", NOT_LEAF),
|
||||
|
@ -150,7 +151,6 @@ FRAME_CLASSES = [
|
|||
|
||||
# Non-concrete classes (for FrameIID use)
|
||||
AbstractFrame("nsContainerFrame"),
|
||||
AbstractFrame("nsIFrame"),
|
||||
AbstractFrame("nsLeafFrame"),
|
||||
AbstractFrame("nsMathMLContainerFrame"),
|
||||
AbstractFrame("nsRubyContentFrame"),
|
||||
|
|
|
@ -466,7 +466,7 @@ void WeakFrame::Init(nsIFrame* aFrame) {
|
|||
}
|
||||
|
||||
nsIFrame* NS_NewEmptyFrame(PresShell* aPresShell, ComputedStyle* aStyle) {
|
||||
return new (aPresShell) nsFrame(aStyle, aPresShell->GetPresContext());
|
||||
return new (aPresShell) nsIFrame(aStyle, aPresShell->GetPresContext());
|
||||
}
|
||||
|
||||
nsFrame::nsFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
|
||||
|
@ -481,6 +481,7 @@ nsIFrame::~nsIFrame() {
|
|||
}
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsFrame)
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsIFrame)
|
||||
|
||||
// Dummy operator delete. Will never be called, but must be defined
|
||||
// to satisfy some C++ ABIs.
|
||||
|
@ -490,6 +491,10 @@ void nsFrame::operator delete(void*, size_t) {
|
|||
|
||||
NS_QUERYFRAME_HEAD(nsFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsIFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsIFrame)
|
||||
|
||||
NS_QUERYFRAME_HEAD(nsIFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsIFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITANCE_ROOT
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -660,6 +660,8 @@ class nsIFrame : public nsQueryFrame {
|
|||
DisplayItemDataArray;
|
||||
typedef nsQueryFrame::ClassID ClassID;
|
||||
|
||||
// nsQueryFrame
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_QUERYFRAME_TARGET(nsIFrame)
|
||||
|
||||
explicit nsIFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
|
||||
|
@ -699,6 +701,8 @@ class nsIFrame : public nsQueryFrame {
|
|||
mozilla::PodZero(&mOverflow);
|
||||
MOZ_COUNT_CTOR(nsIFrame);
|
||||
}
|
||||
explicit nsIFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
|
||||
: nsIFrame(aStyle, aPresContext, ClassID::nsIFrame_id) {}
|
||||
|
||||
nsPresContext* PresContext() const { return mPresContext; }
|
||||
|
||||
|
@ -725,6 +729,8 @@ class nsIFrame : public nsQueryFrame {
|
|||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||
nsIFrame* aPrevInFlow);
|
||||
|
||||
void* operator new(size_t, mozilla::PresShell*) MOZ_MUST_OVERRIDE;
|
||||
|
||||
using PostDestroyData = mozilla::layout::PostFrameDestroyData;
|
||||
struct MOZ_RAII AutoPostDestroyData {
|
||||
explicit AutoPostDestroyData(nsPresContext* aPresContext)
|
||||
|
|
Загрузка…
Ссылка в новой задаче