Renamed DeleteFrame() to Destroy()

This commit is contained in:
troy%netscape.com 1999-07-22 02:24:52 +00:00
Родитель 8fced9fa19
Коммит c551fe3166
72 изменённых файлов: 177 добавлений и 177 удалений

Просмотреть файл

@ -1606,7 +1606,7 @@ nsCSSFrameConstructor::ConstructTableCellFrameOnly(nsIPresContext* aPre
// Create an area frame that will format the cell's content // Create an area frame that will format the cell's content
rv = NS_NewTableCellInnerFrame(&aNewCellBodyFrame); rv = NS_NewTableCellInnerFrame(&aNewCellBodyFrame);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
aNewCellFrame->DeleteFrame(*aPresContext); aNewCellFrame->Destroy(*aPresContext);
aNewCellFrame = nsnull; aNewCellFrame = nsnull;
return rv; return rv;
} }

Просмотреть файл

@ -603,7 +603,7 @@ PresShell::~PresShell()
// Revoke any events posted to the event queue that we haven't processed yet // Revoke any events posted to the event queue that we haven't processed yet
RevokePostedEvents(); RevokePostedEvents();
if (mRootFrame) if (mRootFrame)
mRootFrame->DeleteFrame(*mPresContext); mRootFrame->Destroy(*mPresContext);
if (mDocument) if (mDocument)
mDocument->DeleteShell(this); mDocument->DeleteShell(this);
mRefCnt = 0; mRefCnt = 0;

Просмотреть файл

@ -178,8 +178,8 @@ enum nsSpread {
* there is no order defined between frames in different child lists of * there is no order defined between frames in different child lists of
* the same parent frame. * the same parent frame.
* *
* Frames are NOT reference counted. Use the DeleteFrame() member function * Frames are NOT reference counted. Use the Destroy() member function
* to delete a frame. The lifetime of the frame hierarchy is bounded by the * to destroy a frame. The lifetime of the frame hierarchy is bounded by the
* lifetime of the presentation shell which owns the frames. * lifetime of the presentation shell which owns the frames.
*/ */
class nsIFrame : public nsISupports class nsIFrame : public nsISupports
@ -209,6 +209,12 @@ public:
nsIStyleContext* aContext, nsIStyleContext* aContext,
nsIFrame* aPrevInFlow) = 0; nsIFrame* aPrevInFlow) = 0;
/**
* Destroys this frame and each of its child frames (recursively calls
* Destroy() for each child)
*/
NS_IMETHOD Destroy(nsIPresContext& aPresContext) = 0;
/** /**
* Called to set the initial list of frames. This happens after the frame * Called to set the initial list of frames. This happens after the frame
* has been initialized. * has been initialized.
@ -232,8 +238,8 @@ public:
/** /**
* This method is responsible for appending frames to the frame * This method is responsible for appending frames to the frame
* list. The implementation should do something with the new frames * list. The implementation should append the frames to the appropriate
* and then generate a reflow command. * child list and then generate a reflow command.
* *
* @param aListName the name of the child list. A NULL pointer for the atom * @param aListName the name of the child list. A NULL pointer for the atom
* name means the unnamed principal child list * name means the unnamed principal child list
@ -250,8 +256,8 @@ public:
/** /**
* This method is responsible for inserting frames into the frame * This method is responsible for inserting frames into the frame
* list. The implementation should do something with the new frames * list. The implementation should insert the new frames into the appropriate
* and then generate a reflow command. * child list and then generate a reflow command.
* *
* @param aListName the name of the child list. A NULL pointer for the atom * @param aListName the name of the child list. A NULL pointer for the atom
* name means the unnamed principal child list * name means the unnamed principal child list
@ -287,12 +293,6 @@ public:
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aOldFrame) = 0; nsIFrame* aOldFrame) = 0;
/**
* Deletes this frame and each of its child frames (recursively calls
* DeleteFrame() for each child)
*/
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext) = 0;
/** /**
* Get the content object associated with this frame. Adds a reference to * Get the content object associated with this frame. Adds a reference to
* the content object so the caller must do a release. * the content object so the caller must do a release.

Просмотреть файл

@ -25,7 +25,7 @@ nsFrameList::DeleteFrames(nsIPresContext& aPresContext)
while (nsnull != frame) { while (nsnull != frame) {
nsIFrame* next; nsIFrame* next;
frame->GetNextSibling(&next); frame->GetNextSibling(&next);
frame->DeleteFrame(aPresContext); frame->Destroy(aPresContext);
mFirstChild = frame = next; mFirstChild = frame = next;
} }
} }
@ -111,7 +111,7 @@ nsFrameList::DeleteFrame(nsIPresContext& aPresContext, nsIFrame* aFrame)
{ {
NS_PRECONDITION(nsnull != aFrame, "null ptr"); NS_PRECONDITION(nsnull != aFrame, "null ptr");
if (RemoveFrame(aFrame)) { if (RemoveFrame(aFrame)) {
aFrame->DeleteFrame(aPresContext); aFrame->Destroy(aPresContext);
return PR_TRUE; return PR_TRUE;
} }
return PR_FALSE; return PR_FALSE;
@ -208,7 +208,7 @@ nsFrameList::ReplaceAndDeleteFrame(nsIPresContext& aPresContext,
NS_PRECONDITION(nsnull != aOldFrame, "null ptr"); NS_PRECONDITION(nsnull != aOldFrame, "null ptr");
NS_PRECONDITION(nsnull != aNewFrame, "null ptr"); NS_PRECONDITION(nsnull != aNewFrame, "null ptr");
if (ReplaceFrame(aParent, aOldFrame, aNewFrame)) { if (ReplaceFrame(aParent, aOldFrame, aNewFrame)) {
aNewFrame->DeleteFrame(aPresContext); aNewFrame->Destroy(aPresContext);
return PR_TRUE; return PR_TRUE;
} }
return PR_FALSE; return PR_FALSE;

Просмотреть файл

@ -970,11 +970,11 @@ nsComboboxControlFrame::SetSuggestedSize(nscoord aWidth, nscoord aHeight)
NS_IMETHODIMP NS_IMETHODIMP
nsComboboxControlFrame::DeleteFrame(nsIPresContext& aPresContext) nsComboboxControlFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Cleanup frames in popup child list // Cleanup frames in popup child list
mPopupFrames.DeleteFrames(aPresContext); mPopupFrames.DeleteFrames(aPresContext);
return nsAreaFrame::DeleteFrame(aPresContext); return nsAreaFrame::Destroy(aPresContext);
} }

Просмотреть файл

@ -77,7 +77,7 @@ public:
PRInt32* aLocalChange); PRInt32* aLocalChange);
NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,

Просмотреть файл

@ -150,7 +150,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
else { else {
aChildList = frame; aChildList = frame;
} }
legendFrame->DeleteFrame(aPresContext); legendFrame->Destroy(aPresContext);
} }
else { else {
nsIFrame* nextFrame; nsIFrame* nextFrame;

Просмотреть файл

@ -27,7 +27,7 @@
static NS_DEFINE_IID(kAreaFrameIID, NS_IAREAFRAME_IID); static NS_DEFINE_IID(kAreaFrameIID, NS_IAREAFRAME_IID);
void void
nsAbsoluteContainingBlock::DeleteFrames(nsIPresContext& aPresContext) nsAbsoluteContainingBlock::DestroyFrames(nsIPresContext& aPresContext)
{ {
mAbsoluteFrames.DeleteFrames(aPresContext); mAbsoluteFrames.DeleteFrames(aPresContext);
} }

Просмотреть файл

@ -58,7 +58,7 @@ public:
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
PRBool& aWasHandled); PRBool& aWasHandled);
void DeleteFrames(nsIPresContext& aPresContext); void DestroyFrames(nsIPresContext& aPresContext);
nsresult GetPositionedInfo(nscoord& aXMost, nscoord& aYMost) const; nsresult GetPositionedInfo(nscoord& aXMost, nscoord& aYMost) const;

Просмотреть файл

@ -104,10 +104,10 @@ nsAreaFrame::Init(nsIPresContext& aPresContext,
} }
NS_IMETHODIMP NS_IMETHODIMP
nsAreaFrame::DeleteFrame(nsIPresContext& aPresContext) nsAreaFrame::Destroy(nsIPresContext& aPresContext)
{ {
mAbsoluteContainer.DeleteFrames(aPresContext); mAbsoluteContainer.DestroyFrames(aPresContext);
return nsBlockFrame::DeleteFrame(aPresContext); return nsBlockFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -56,7 +56,7 @@ public:
nsIStyleContext* aContext, nsIStyleContext* aContext,
nsIFrame* aPrevInFlow); nsIFrame* aPrevInFlow);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,

Просмотреть файл

@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsBlockFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Outside bullets are not in our child-list so check for them here // Outside bullets are not in our child-list so check for them here
// and delete them when present. // and delete them when present.
if (HaveOutsideBullet()) { if (HaveOutsideBullet()) {
mBullet->DeleteFrame(aPresContext); mBullet->Destroy(aPresContext);
mBullet = nsnull; mBullet = nsnull;
} }
@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext)
nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mLines);
nsLineBox::DeleteLineList(aPresContext, mOverflowLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines);
return nsBlockFrameSuper::DeleteFrame(aPresContext); return nsBlockFrameSuper::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext,
// XXX stop storing pointers to the placeholder in the line list??? // XXX stop storing pointers to the placeholder in the line list???
ph->SetOutOfFlowFrame(nsnull); ph->SetOutOfFlowFrame(nsnull);
floaters->RemoveElementAt(i); floaters->RemoveElementAt(i);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
goto found_it; goto found_it;
} }
} }
@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
nsFrame::ListTag(stdout, aDeletedFrame); nsFrame::ListTag(stdout, aDeletedFrame);
printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow);
#endif #endif
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
aDeletedFrame = nextInFlow; aDeletedFrame = nextInFlow;
// If line is empty, remove it now // If line is empty, remove it now
@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext,
{ {
// Strip deleted frame out of the nsFirstLineFrame // Strip deleted frame out of the nsFirstLineFrame
aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame);
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
// See if the line-frame and its continuations are now empty // See if the line-frame and its continuations are now empty
nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow();

Просмотреть файл

@ -84,7 +84,7 @@ public:
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex, NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex,
nsIAtom** aListName) const; nsIAtom** aListName) const;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
nsIStyleContext* aParentContext, nsIStyleContext* aParentContext,

Просмотреть файл

@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsBlockFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Outside bullets are not in our child-list so check for them here // Outside bullets are not in our child-list so check for them here
// and delete them when present. // and delete them when present.
if (HaveOutsideBullet()) { if (HaveOutsideBullet()) {
mBullet->DeleteFrame(aPresContext); mBullet->Destroy(aPresContext);
mBullet = nsnull; mBullet = nsnull;
} }
@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext)
nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mLines);
nsLineBox::DeleteLineList(aPresContext, mOverflowLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines);
return nsBlockFrameSuper::DeleteFrame(aPresContext); return nsBlockFrameSuper::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext,
// XXX stop storing pointers to the placeholder in the line list??? // XXX stop storing pointers to the placeholder in the line list???
ph->SetOutOfFlowFrame(nsnull); ph->SetOutOfFlowFrame(nsnull);
floaters->RemoveElementAt(i); floaters->RemoveElementAt(i);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
goto found_it; goto found_it;
} }
} }
@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
nsFrame::ListTag(stdout, aDeletedFrame); nsFrame::ListTag(stdout, aDeletedFrame);
printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow);
#endif #endif
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
aDeletedFrame = nextInFlow; aDeletedFrame = nextInFlow;
// If line is empty, remove it now // If line is empty, remove it now
@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext,
{ {
// Strip deleted frame out of the nsFirstLineFrame // Strip deleted frame out of the nsFirstLineFrame
aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame);
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
// See if the line-frame and its continuations are now empty // See if the line-frame and its continuations are now empty
nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow();

Просмотреть файл

@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsBlockFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Outside bullets are not in our child-list so check for them here // Outside bullets are not in our child-list so check for them here
// and delete them when present. // and delete them when present.
if (HaveOutsideBullet()) { if (HaveOutsideBullet()) {
mBullet->DeleteFrame(aPresContext); mBullet->Destroy(aPresContext);
mBullet = nsnull; mBullet = nsnull;
} }
@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext)
nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mLines);
nsLineBox::DeleteLineList(aPresContext, mOverflowLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines);
return nsBlockFrameSuper::DeleteFrame(aPresContext); return nsBlockFrameSuper::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext,
// XXX stop storing pointers to the placeholder in the line list??? // XXX stop storing pointers to the placeholder in the line list???
ph->SetOutOfFlowFrame(nsnull); ph->SetOutOfFlowFrame(nsnull);
floaters->RemoveElementAt(i); floaters->RemoveElementAt(i);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
goto found_it; goto found_it;
} }
} }
@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
nsFrame::ListTag(stdout, aDeletedFrame); nsFrame::ListTag(stdout, aDeletedFrame);
printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow);
#endif #endif
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
aDeletedFrame = nextInFlow; aDeletedFrame = nextInFlow;
// If line is empty, remove it now // If line is empty, remove it now
@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext,
{ {
// Strip deleted frame out of the nsFirstLineFrame // Strip deleted frame out of the nsFirstLineFrame
aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame);
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
// See if the line-frame and its continuations are now empty // See if the line-frame and its continuations are now empty
nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow();

Просмотреть файл

@ -42,13 +42,13 @@ nsBulletFrame::~nsBulletFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBulletFrame::DeleteFrame(nsIPresContext& aPresContext) nsBulletFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Stop image loading first // Stop image loading first
mImageLoader.StopAllLoadImages(&aPresContext); mImageLoader.StopAllLoadImages(&aPresContext);
// Let base class do the rest // Let base class do the rest
return nsFrame::DeleteFrame(aPresContext); return nsFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -38,7 +38,7 @@ public:
nsIFrame* aParent, nsIFrame* aParent,
nsIStyleContext* aContext, nsIStyleContext* aContext,
nsIFrame* aPrevInFlow); nsIFrame* aPrevInFlow);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD Paint(nsIPresContext &aCX, NS_IMETHOD Paint(nsIPresContext &aCX,
nsIRenderingContext& aRenderingContext, nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aDirtyRect,

Просмотреть файл

@ -66,7 +66,7 @@ nsContainerFrame::SetInitialChildList(nsIPresContext& aPresContext,
} }
NS_IMETHODIMP NS_IMETHODIMP
nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) nsContainerFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Prevent event dispatch during destruction // Prevent event dispatch during destruction
nsIView* view; nsIView* view;
@ -78,8 +78,8 @@ nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext)
// Delete the primary child list // Delete the primary child list
mFrames.DeleteFrames(aPresContext); mFrames.DeleteFrames(aPresContext);
// Base class will delete the frame // Base class will destroy the frame
return nsFrame::DeleteFrame(aPresContext); return nsFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -480,7 +480,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
NS_ASSERTION(result, "failed to remove frame"); NS_ASSERTION(result, "failed to remove frame");
// Delete the next-in-flow frame // Delete the next-in-flow frame
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
#ifdef NS_DEBUG #ifdef NS_DEBUG
aChild->GetNextInFlow(&nextInFlow); aChild->GetNextInFlow(&nextInFlow);

Просмотреть файл

@ -32,7 +32,7 @@ public:
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aChildList); nsIFrame* aChildList);
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD Paint(nsIPresContext& aPresContext, NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext, nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aDirtyRect,

Просмотреть файл

@ -372,7 +372,7 @@ nsFrame::RemoveFrame(nsIPresContext& aPresContext,
} }
NS_IMETHODIMP NS_IMETHODIMP
nsFrame::DeleteFrame(nsIPresContext& aPresContext) nsFrame::Destroy(nsIPresContext& aPresContext)
{ {
nsCOMPtr<nsIPresShell> shell; nsCOMPtr<nsIPresShell> shell;
aPresContext.GetShell(getter_AddRefs(shell)); aPresContext.GetShell(getter_AddRefs(shell));

Просмотреть файл

@ -130,7 +130,7 @@ public:
nsIPresShell& aPresShell, nsIPresShell& aPresShell,
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aOldFrame); nsIFrame* aOldFrame);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD GetContent(nsIContent** aContent) const; NS_IMETHOD GetContent(nsIContent** aContent) const;
NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const; NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const;
NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext,

Просмотреть файл

@ -25,7 +25,7 @@ nsFrameList::DeleteFrames(nsIPresContext& aPresContext)
while (nsnull != frame) { while (nsnull != frame) {
nsIFrame* next; nsIFrame* next;
frame->GetNextSibling(&next); frame->GetNextSibling(&next);
frame->DeleteFrame(aPresContext); frame->Destroy(aPresContext);
mFirstChild = frame = next; mFirstChild = frame = next;
} }
} }
@ -111,7 +111,7 @@ nsFrameList::DeleteFrame(nsIPresContext& aPresContext, nsIFrame* aFrame)
{ {
NS_PRECONDITION(nsnull != aFrame, "null ptr"); NS_PRECONDITION(nsnull != aFrame, "null ptr");
if (RemoveFrame(aFrame)) { if (RemoveFrame(aFrame)) {
aFrame->DeleteFrame(aPresContext); aFrame->Destroy(aPresContext);
return PR_TRUE; return PR_TRUE;
} }
return PR_FALSE; return PR_FALSE;
@ -208,7 +208,7 @@ nsFrameList::ReplaceAndDeleteFrame(nsIPresContext& aPresContext,
NS_PRECONDITION(nsnull != aOldFrame, "null ptr"); NS_PRECONDITION(nsnull != aOldFrame, "null ptr");
NS_PRECONDITION(nsnull != aNewFrame, "null ptr"); NS_PRECONDITION(nsnull != aNewFrame, "null ptr");
if (ReplaceFrame(aParent, aOldFrame, aNewFrame)) { if (ReplaceFrame(aParent, aOldFrame, aNewFrame)) {
aNewFrame->DeleteFrame(aPresContext); aNewFrame->Destroy(aPresContext);
return PR_TRUE; return PR_TRUE;
} }
return PR_FALSE; return PR_FALSE;

Просмотреть файл

@ -178,8 +178,8 @@ enum nsSpread {
* there is no order defined between frames in different child lists of * there is no order defined between frames in different child lists of
* the same parent frame. * the same parent frame.
* *
* Frames are NOT reference counted. Use the DeleteFrame() member function * Frames are NOT reference counted. Use the Destroy() member function
* to delete a frame. The lifetime of the frame hierarchy is bounded by the * to destroy a frame. The lifetime of the frame hierarchy is bounded by the
* lifetime of the presentation shell which owns the frames. * lifetime of the presentation shell which owns the frames.
*/ */
class nsIFrame : public nsISupports class nsIFrame : public nsISupports
@ -209,6 +209,12 @@ public:
nsIStyleContext* aContext, nsIStyleContext* aContext,
nsIFrame* aPrevInFlow) = 0; nsIFrame* aPrevInFlow) = 0;
/**
* Destroys this frame and each of its child frames (recursively calls
* Destroy() for each child)
*/
NS_IMETHOD Destroy(nsIPresContext& aPresContext) = 0;
/** /**
* Called to set the initial list of frames. This happens after the frame * Called to set the initial list of frames. This happens after the frame
* has been initialized. * has been initialized.
@ -232,8 +238,8 @@ public:
/** /**
* This method is responsible for appending frames to the frame * This method is responsible for appending frames to the frame
* list. The implementation should do something with the new frames * list. The implementation should append the frames to the appropriate
* and then generate a reflow command. * child list and then generate a reflow command.
* *
* @param aListName the name of the child list. A NULL pointer for the atom * @param aListName the name of the child list. A NULL pointer for the atom
* name means the unnamed principal child list * name means the unnamed principal child list
@ -250,8 +256,8 @@ public:
/** /**
* This method is responsible for inserting frames into the frame * This method is responsible for inserting frames into the frame
* list. The implementation should do something with the new frames * list. The implementation should insert the new frames into the appropriate
* and then generate a reflow command. * child list and then generate a reflow command.
* *
* @param aListName the name of the child list. A NULL pointer for the atom * @param aListName the name of the child list. A NULL pointer for the atom
* name means the unnamed principal child list * name means the unnamed principal child list
@ -287,12 +293,6 @@ public:
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aOldFrame) = 0; nsIFrame* aOldFrame) = 0;
/**
* Deletes this frame and each of its child frames (recursively calls
* DeleteFrame() for each child)
*/
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext) = 0;
/** /**
* Get the content object associated with this frame. Adds a reference to * Get the content object associated with this frame. Adds a reference to
* the content object so the caller must do a release. * the content object so the caller must do a release.

Просмотреть файл

@ -93,14 +93,14 @@ nsImageFrame::~nsImageFrame()
} }
NS_METHOD NS_METHOD
nsImageFrame::DeleteFrame(nsIPresContext& aPresContext) nsImageFrame::Destroy(nsIPresContext& aPresContext)
{ {
NS_IF_RELEASE(mImageMap); NS_IF_RELEASE(mImageMap);
// Release image loader first so that it's refcnt can go to zero // Release image loader first so that it's refcnt can go to zero
mImageLoader.StopAllLoadImages(&aPresContext); mImageLoader.StopAllLoadImages(&aPresContext);
return nsLeafFrame::DeleteFrame(aPresContext); return nsLeafFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -35,7 +35,7 @@ struct nsSize;
class nsImageFrame : public ImageFrameSuper { class nsImageFrame : public ImageFrameSuper {
public: public:
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD Init(nsIPresContext& aPresContext, NS_IMETHOD Init(nsIPresContext& aPresContext,
nsIContent* aContent, nsIContent* aContent,
nsIFrame* aParent, nsIFrame* aParent,

Просмотреть файл

@ -65,10 +65,10 @@ NS_NewPositionedInlineFrame(nsIFrame** aNewFrame)
} }
NS_IMETHODIMP NS_IMETHODIMP
nsPositionedInlineFrame::DeleteFrame(nsIPresContext& aPresContext) nsPositionedInlineFrame::Destroy(nsIPresContext& aPresContext)
{ {
mAbsoluteContainer.DeleteFrames(aPresContext); mAbsoluteContainer.DestroyFrames(aPresContext);
return nsInlineFrame::DeleteFrame(aPresContext); return nsInlineFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -318,10 +318,10 @@ nsInlineFrame::GetFrameType(nsIAtom** aType) const
} }
NS_IMETHODIMP NS_IMETHODIMP
nsInlineFrame::DeleteFrame(nsIPresContext& aPresContext) nsInlineFrame::Destroy(nsIPresContext& aPresContext)
{ {
mFrames.DeleteFrames(aPresContext); mFrames.DeleteFrames(aPresContext);
return nsInlineFrameSuper::DeleteFrame(aPresContext); return nsInlineFrameSuper::Destroy(aPresContext);
} }
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
@ -389,7 +389,7 @@ nsInlineFrame::CreateAnonymousBlock(nsIPresContext& aPresContext,
getter_AddRefs(newSC)); getter_AddRefs(newSC));
rv = bf->Init(aPresContext, mContent, this, newSC, nsnull); rv = bf->Init(aPresContext, mContent, this, newSC, nsnull);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
bf->DeleteFrame(aPresContext); bf->Destroy(aPresContext);
delete bf; delete bf;
} }
else { else {
@ -1058,7 +1058,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent);
nsAnonymousBlockFrame* ab = anonymousBlock; nsAnonymousBlockFrame* ab = anonymousBlock;
anonymousBlock->RemoveFramesFrom(aOldFrame); anonymousBlock->RemoveFramesFrom(aOldFrame);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
while (nsnull != nextInFlow) { while (nsnull != nextInFlow) {
nsIFrame* nextParent; nsIFrame* nextParent;
nextInFlow->GetParent(&nextParent); nextInFlow->GetParent(&nextParent);
@ -1068,7 +1068,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
ab->RemoveFirstFrame(); ab->RemoveFirstFrame();
nsIFrame* nextNextInFlow; nsIFrame* nextNextInFlow;
nextInFlow->GetNextInFlow(&nextNextInFlow); nextInFlow->GetNextInFlow(&nextNextInFlow);
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
nextInFlow = nextNextInFlow; nextInFlow = nextNextInFlow;
} }
@ -1134,7 +1134,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent);
anonymousBlock->RemoveFirstFrame(); anonymousBlock->RemoveFirstFrame();
aOldFrame->GetNextInFlow(&nextInFlow); aOldFrame->GetNextInFlow(&nextInFlow);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
while (nsnull != nextInFlow) { while (nsnull != nextInFlow) {
nsIFrame* nextParent; nsIFrame* nextParent;
nextInFlow->GetParent(&nextParent); nextInFlow->GetParent(&nextParent);
@ -1144,7 +1144,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
anonymousBlock->RemoveFirstFrame(); anonymousBlock->RemoveFirstFrame();
nsIFrame* nextNextInFlow; nsIFrame* nextNextInFlow;
nextInFlow->GetNextInFlow(&nextNextInFlow); nextInFlow->GetNextInFlow(&nextNextInFlow);
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
nextInFlow = nextNextInFlow; nextInFlow = nextNextInFlow;
} }

Просмотреть файл

@ -55,7 +55,7 @@ public:
nsIPresShell& aPresShell, nsIPresShell& aPresShell,
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aOldFrame); nsIFrame* aOldFrame);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD GetFrameType(nsIAtom** aType) const; NS_IMETHOD GetFrameType(nsIAtom** aType) const;
@ -249,7 +249,7 @@ extern nsresult NS_NewFirstLineFrame(nsIFrame** aNewFrame);
class nsPositionedInlineFrame : public nsInlineFrame class nsPositionedInlineFrame : public nsInlineFrame
{ {
public: public:
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,

Просмотреть файл

@ -154,7 +154,7 @@ nsLineBox::DeleteLineList(nsIPresContext& aPresContext, nsLineBox* aLine)
for (nsIFrame* child = aLine->mFirstChild; child; ) { for (nsIFrame* child = aLine->mFirstChild; child; ) {
nsIFrame* nextChild; nsIFrame* nextChild;
child->GetNextSibling(&nextChild); child->GetNextSibling(&nextChild);
child->DeleteFrame(aPresContext); child->Destroy(aPresContext);
child = nextChild; child = nextChild;
} }

Просмотреть файл

@ -383,7 +383,7 @@ nsObjectFrame::Init(nsIPresContext& aPresContext,
mFrames.AppendFrame(this, aNewFrame); mFrames.AppendFrame(this, aNewFrame);
} }
else else
aNewFrame->DeleteFrame(aPresContext); aNewFrame->Destroy(aPresContext);
} }
return rv; return rv;

Просмотреть файл

@ -44,7 +44,7 @@ static NS_DEFINE_IID(kScrollViewIID, NS_ISCROLLABLEVIEW_IID);
*/ */
class ViewportFrame : public nsContainerFrame { class ViewportFrame : public nsContainerFrame {
public: public:
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,
@ -109,10 +109,10 @@ NS_NewViewportFrame(nsIFrame** aNewFrame)
} }
NS_IMETHODIMP NS_IMETHODIMP
ViewportFrame::DeleteFrame(nsIPresContext& aPresContext) ViewportFrame::Destroy(nsIPresContext& aPresContext)
{ {
mFixedFrames.DeleteFrames(aPresContext); mFixedFrames.DeleteFrames(aPresContext);
return nsContainerFrame::DeleteFrame(aPresContext); return nsContainerFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -27,7 +27,7 @@
static NS_DEFINE_IID(kAreaFrameIID, NS_IAREAFRAME_IID); static NS_DEFINE_IID(kAreaFrameIID, NS_IAREAFRAME_IID);
void void
nsAbsoluteContainingBlock::DeleteFrames(nsIPresContext& aPresContext) nsAbsoluteContainingBlock::DestroyFrames(nsIPresContext& aPresContext)
{ {
mAbsoluteFrames.DeleteFrames(aPresContext); mAbsoluteFrames.DeleteFrames(aPresContext);
} }

Просмотреть файл

@ -58,7 +58,7 @@ public:
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
PRBool& aWasHandled); PRBool& aWasHandled);
void DeleteFrames(nsIPresContext& aPresContext); void DestroyFrames(nsIPresContext& aPresContext);
nsresult GetPositionedInfo(nscoord& aXMost, nscoord& aYMost) const; nsresult GetPositionedInfo(nscoord& aXMost, nscoord& aYMost) const;

Просмотреть файл

@ -104,10 +104,10 @@ nsAreaFrame::Init(nsIPresContext& aPresContext,
} }
NS_IMETHODIMP NS_IMETHODIMP
nsAreaFrame::DeleteFrame(nsIPresContext& aPresContext) nsAreaFrame::Destroy(nsIPresContext& aPresContext)
{ {
mAbsoluteContainer.DeleteFrames(aPresContext); mAbsoluteContainer.DestroyFrames(aPresContext);
return nsBlockFrame::DeleteFrame(aPresContext); return nsBlockFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -56,7 +56,7 @@ public:
nsIStyleContext* aContext, nsIStyleContext* aContext,
nsIFrame* aPrevInFlow); nsIFrame* aPrevInFlow);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,

Просмотреть файл

@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsBlockFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Outside bullets are not in our child-list so check for them here // Outside bullets are not in our child-list so check for them here
// and delete them when present. // and delete them when present.
if (HaveOutsideBullet()) { if (HaveOutsideBullet()) {
mBullet->DeleteFrame(aPresContext); mBullet->Destroy(aPresContext);
mBullet = nsnull; mBullet = nsnull;
} }
@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext)
nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mLines);
nsLineBox::DeleteLineList(aPresContext, mOverflowLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines);
return nsBlockFrameSuper::DeleteFrame(aPresContext); return nsBlockFrameSuper::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext,
// XXX stop storing pointers to the placeholder in the line list??? // XXX stop storing pointers to the placeholder in the line list???
ph->SetOutOfFlowFrame(nsnull); ph->SetOutOfFlowFrame(nsnull);
floaters->RemoveElementAt(i); floaters->RemoveElementAt(i);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
goto found_it; goto found_it;
} }
} }
@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
nsFrame::ListTag(stdout, aDeletedFrame); nsFrame::ListTag(stdout, aDeletedFrame);
printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow);
#endif #endif
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
aDeletedFrame = nextInFlow; aDeletedFrame = nextInFlow;
// If line is empty, remove it now // If line is empty, remove it now
@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext,
{ {
// Strip deleted frame out of the nsFirstLineFrame // Strip deleted frame out of the nsFirstLineFrame
aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame);
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
// See if the line-frame and its continuations are now empty // See if the line-frame and its continuations are now empty
nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow();

Просмотреть файл

@ -84,7 +84,7 @@ public:
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex, NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex,
nsIAtom** aListName) const; nsIAtom** aListName) const;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
nsIStyleContext* aParentContext, nsIStyleContext* aParentContext,

Просмотреть файл

@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsBlockFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Outside bullets are not in our child-list so check for them here // Outside bullets are not in our child-list so check for them here
// and delete them when present. // and delete them when present.
if (HaveOutsideBullet()) { if (HaveOutsideBullet()) {
mBullet->DeleteFrame(aPresContext); mBullet->Destroy(aPresContext);
mBullet = nsnull; mBullet = nsnull;
} }
@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext)
nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mLines);
nsLineBox::DeleteLineList(aPresContext, mOverflowLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines);
return nsBlockFrameSuper::DeleteFrame(aPresContext); return nsBlockFrameSuper::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext,
// XXX stop storing pointers to the placeholder in the line list??? // XXX stop storing pointers to the placeholder in the line list???
ph->SetOutOfFlowFrame(nsnull); ph->SetOutOfFlowFrame(nsnull);
floaters->RemoveElementAt(i); floaters->RemoveElementAt(i);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
goto found_it; goto found_it;
} }
} }
@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
nsFrame::ListTag(stdout, aDeletedFrame); nsFrame::ListTag(stdout, aDeletedFrame);
printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow);
#endif #endif
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
aDeletedFrame = nextInFlow; aDeletedFrame = nextInFlow;
// If line is empty, remove it now // If line is empty, remove it now
@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext,
{ {
// Strip deleted frame out of the nsFirstLineFrame // Strip deleted frame out of the nsFirstLineFrame
aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame);
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
// See if the line-frame and its continuations are now empty // See if the line-frame and its continuations are now empty
nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow();

Просмотреть файл

@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsBlockFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Outside bullets are not in our child-list so check for them here // Outside bullets are not in our child-list so check for them here
// and delete them when present. // and delete them when present.
if (HaveOutsideBullet()) { if (HaveOutsideBullet()) {
mBullet->DeleteFrame(aPresContext); mBullet->Destroy(aPresContext);
mBullet = nsnull; mBullet = nsnull;
} }
@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext)
nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mLines);
nsLineBox::DeleteLineList(aPresContext, mOverflowLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines);
return nsBlockFrameSuper::DeleteFrame(aPresContext); return nsBlockFrameSuper::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext,
// XXX stop storing pointers to the placeholder in the line list??? // XXX stop storing pointers to the placeholder in the line list???
ph->SetOutOfFlowFrame(nsnull); ph->SetOutOfFlowFrame(nsnull);
floaters->RemoveElementAt(i); floaters->RemoveElementAt(i);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
goto found_it; goto found_it;
} }
} }
@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
nsFrame::ListTag(stdout, aDeletedFrame); nsFrame::ListTag(stdout, aDeletedFrame);
printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow);
#endif #endif
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
aDeletedFrame = nextInFlow; aDeletedFrame = nextInFlow;
// If line is empty, remove it now // If line is empty, remove it now
@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext,
{ {
// Strip deleted frame out of the nsFirstLineFrame // Strip deleted frame out of the nsFirstLineFrame
aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame);
aDeletedFrame->DeleteFrame(*aPresContext); aDeletedFrame->Destroy(*aPresContext);
// See if the line-frame and its continuations are now empty // See if the line-frame and its continuations are now empty
nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow();

Просмотреть файл

@ -42,13 +42,13 @@ nsBulletFrame::~nsBulletFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBulletFrame::DeleteFrame(nsIPresContext& aPresContext) nsBulletFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Stop image loading first // Stop image loading first
mImageLoader.StopAllLoadImages(&aPresContext); mImageLoader.StopAllLoadImages(&aPresContext);
// Let base class do the rest // Let base class do the rest
return nsFrame::DeleteFrame(aPresContext); return nsFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -38,7 +38,7 @@ public:
nsIFrame* aParent, nsIFrame* aParent,
nsIStyleContext* aContext, nsIStyleContext* aContext,
nsIFrame* aPrevInFlow); nsIFrame* aPrevInFlow);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD Paint(nsIPresContext &aCX, NS_IMETHOD Paint(nsIPresContext &aCX,
nsIRenderingContext& aRenderingContext, nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aDirtyRect,

Просмотреть файл

@ -66,7 +66,7 @@ nsContainerFrame::SetInitialChildList(nsIPresContext& aPresContext,
} }
NS_IMETHODIMP NS_IMETHODIMP
nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) nsContainerFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Prevent event dispatch during destruction // Prevent event dispatch during destruction
nsIView* view; nsIView* view;
@ -78,8 +78,8 @@ nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext)
// Delete the primary child list // Delete the primary child list
mFrames.DeleteFrames(aPresContext); mFrames.DeleteFrames(aPresContext);
// Base class will delete the frame // Base class will destroy the frame
return nsFrame::DeleteFrame(aPresContext); return nsFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -480,7 +480,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
NS_ASSERTION(result, "failed to remove frame"); NS_ASSERTION(result, "failed to remove frame");
// Delete the next-in-flow frame // Delete the next-in-flow frame
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
#ifdef NS_DEBUG #ifdef NS_DEBUG
aChild->GetNextInFlow(&nextInFlow); aChild->GetNextInFlow(&nextInFlow);

Просмотреть файл

@ -32,7 +32,7 @@ public:
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aChildList); nsIFrame* aChildList);
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD Paint(nsIPresContext& aPresContext, NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext, nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aDirtyRect,

Просмотреть файл

@ -372,7 +372,7 @@ nsFrame::RemoveFrame(nsIPresContext& aPresContext,
} }
NS_IMETHODIMP NS_IMETHODIMP
nsFrame::DeleteFrame(nsIPresContext& aPresContext) nsFrame::Destroy(nsIPresContext& aPresContext)
{ {
nsCOMPtr<nsIPresShell> shell; nsCOMPtr<nsIPresShell> shell;
aPresContext.GetShell(getter_AddRefs(shell)); aPresContext.GetShell(getter_AddRefs(shell));

Просмотреть файл

@ -130,7 +130,7 @@ public:
nsIPresShell& aPresShell, nsIPresShell& aPresShell,
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aOldFrame); nsIFrame* aOldFrame);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD GetContent(nsIContent** aContent) const; NS_IMETHOD GetContent(nsIContent** aContent) const;
NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const; NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const;
NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext,

Просмотреть файл

@ -93,14 +93,14 @@ nsImageFrame::~nsImageFrame()
} }
NS_METHOD NS_METHOD
nsImageFrame::DeleteFrame(nsIPresContext& aPresContext) nsImageFrame::Destroy(nsIPresContext& aPresContext)
{ {
NS_IF_RELEASE(mImageMap); NS_IF_RELEASE(mImageMap);
// Release image loader first so that it's refcnt can go to zero // Release image loader first so that it's refcnt can go to zero
mImageLoader.StopAllLoadImages(&aPresContext); mImageLoader.StopAllLoadImages(&aPresContext);
return nsLeafFrame::DeleteFrame(aPresContext); return nsLeafFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -35,7 +35,7 @@ struct nsSize;
class nsImageFrame : public ImageFrameSuper { class nsImageFrame : public ImageFrameSuper {
public: public:
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD Init(nsIPresContext& aPresContext, NS_IMETHOD Init(nsIPresContext& aPresContext,
nsIContent* aContent, nsIContent* aContent,
nsIFrame* aParent, nsIFrame* aParent,

Просмотреть файл

@ -65,10 +65,10 @@ NS_NewPositionedInlineFrame(nsIFrame** aNewFrame)
} }
NS_IMETHODIMP NS_IMETHODIMP
nsPositionedInlineFrame::DeleteFrame(nsIPresContext& aPresContext) nsPositionedInlineFrame::Destroy(nsIPresContext& aPresContext)
{ {
mAbsoluteContainer.DeleteFrames(aPresContext); mAbsoluteContainer.DestroyFrames(aPresContext);
return nsInlineFrame::DeleteFrame(aPresContext); return nsInlineFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -318,10 +318,10 @@ nsInlineFrame::GetFrameType(nsIAtom** aType) const
} }
NS_IMETHODIMP NS_IMETHODIMP
nsInlineFrame::DeleteFrame(nsIPresContext& aPresContext) nsInlineFrame::Destroy(nsIPresContext& aPresContext)
{ {
mFrames.DeleteFrames(aPresContext); mFrames.DeleteFrames(aPresContext);
return nsInlineFrameSuper::DeleteFrame(aPresContext); return nsInlineFrameSuper::Destroy(aPresContext);
} }
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
@ -389,7 +389,7 @@ nsInlineFrame::CreateAnonymousBlock(nsIPresContext& aPresContext,
getter_AddRefs(newSC)); getter_AddRefs(newSC));
rv = bf->Init(aPresContext, mContent, this, newSC, nsnull); rv = bf->Init(aPresContext, mContent, this, newSC, nsnull);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
bf->DeleteFrame(aPresContext); bf->Destroy(aPresContext);
delete bf; delete bf;
} }
else { else {
@ -1058,7 +1058,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent);
nsAnonymousBlockFrame* ab = anonymousBlock; nsAnonymousBlockFrame* ab = anonymousBlock;
anonymousBlock->RemoveFramesFrom(aOldFrame); anonymousBlock->RemoveFramesFrom(aOldFrame);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
while (nsnull != nextInFlow) { while (nsnull != nextInFlow) {
nsIFrame* nextParent; nsIFrame* nextParent;
nextInFlow->GetParent(&nextParent); nextInFlow->GetParent(&nextParent);
@ -1068,7 +1068,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
ab->RemoveFirstFrame(); ab->RemoveFirstFrame();
nsIFrame* nextNextInFlow; nsIFrame* nextNextInFlow;
nextInFlow->GetNextInFlow(&nextNextInFlow); nextInFlow->GetNextInFlow(&nextNextInFlow);
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
nextInFlow = nextNextInFlow; nextInFlow = nextNextInFlow;
} }
@ -1134,7 +1134,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent);
anonymousBlock->RemoveFirstFrame(); anonymousBlock->RemoveFirstFrame();
aOldFrame->GetNextInFlow(&nextInFlow); aOldFrame->GetNextInFlow(&nextInFlow);
aOldFrame->DeleteFrame(aPresContext); aOldFrame->Destroy(aPresContext);
while (nsnull != nextInFlow) { while (nsnull != nextInFlow) {
nsIFrame* nextParent; nsIFrame* nextParent;
nextInFlow->GetParent(&nextParent); nextInFlow->GetParent(&nextParent);
@ -1144,7 +1144,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext,
anonymousBlock->RemoveFirstFrame(); anonymousBlock->RemoveFirstFrame();
nsIFrame* nextNextInFlow; nsIFrame* nextNextInFlow;
nextInFlow->GetNextInFlow(&nextNextInFlow); nextInFlow->GetNextInFlow(&nextNextInFlow);
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
nextInFlow = nextNextInFlow; nextInFlow = nextNextInFlow;
} }

Просмотреть файл

@ -55,7 +55,7 @@ public:
nsIPresShell& aPresShell, nsIPresShell& aPresShell,
nsIAtom* aListName, nsIAtom* aListName,
nsIFrame* aOldFrame); nsIFrame* aOldFrame);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD GetFrameType(nsIAtom** aType) const; NS_IMETHOD GetFrameType(nsIAtom** aType) const;
@ -249,7 +249,7 @@ extern nsresult NS_NewFirstLineFrame(nsIFrame** aNewFrame);
class nsPositionedInlineFrame : public nsInlineFrame class nsPositionedInlineFrame : public nsInlineFrame
{ {
public: public:
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,

Просмотреть файл

@ -154,7 +154,7 @@ nsLineBox::DeleteLineList(nsIPresContext& aPresContext, nsLineBox* aLine)
for (nsIFrame* child = aLine->mFirstChild; child; ) { for (nsIFrame* child = aLine->mFirstChild; child; ) {
nsIFrame* nextChild; nsIFrame* nextChild;
child->GetNextSibling(&nextChild); child->GetNextSibling(&nextChild);
child->DeleteFrame(aPresContext); child->Destroy(aPresContext);
child = nextChild; child = nextChild;
} }

Просмотреть файл

@ -383,7 +383,7 @@ nsObjectFrame::Init(nsIPresContext& aPresContext,
mFrames.AppendFrame(this, aNewFrame); mFrames.AppendFrame(this, aNewFrame);
} }
else else
aNewFrame->DeleteFrame(aPresContext); aNewFrame->Destroy(aPresContext);
} }
return rv; return rv;

Просмотреть файл

@ -603,7 +603,7 @@ PresShell::~PresShell()
// Revoke any events posted to the event queue that we haven't processed yet // Revoke any events posted to the event queue that we haven't processed yet
RevokePostedEvents(); RevokePostedEvents();
if (mRootFrame) if (mRootFrame)
mRootFrame->DeleteFrame(*mPresContext); mRootFrame->Destroy(*mPresContext);
if (mDocument) if (mDocument)
mDocument->DeleteShell(this); mDocument->DeleteShell(this);
mRefCnt = 0; mRefCnt = 0;

Просмотреть файл

@ -44,7 +44,7 @@ static NS_DEFINE_IID(kScrollViewIID, NS_ISCROLLABLEVIEW_IID);
*/ */
class ViewportFrame : public nsContainerFrame { class ViewportFrame : public nsContainerFrame {
public: public:
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,
@ -109,10 +109,10 @@ NS_NewViewportFrame(nsIFrame** aNewFrame)
} }
NS_IMETHODIMP NS_IMETHODIMP
ViewportFrame::DeleteFrame(nsIPresContext& aPresContext) ViewportFrame::Destroy(nsIPresContext& aPresContext)
{ {
mFixedFrames.DeleteFrames(aPresContext); mFixedFrames.DeleteFrames(aPresContext);
return nsContainerFrame::DeleteFrame(aPresContext); return nsContainerFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -970,11 +970,11 @@ nsComboboxControlFrame::SetSuggestedSize(nscoord aWidth, nscoord aHeight)
NS_IMETHODIMP NS_IMETHODIMP
nsComboboxControlFrame::DeleteFrame(nsIPresContext& aPresContext) nsComboboxControlFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Cleanup frames in popup child list // Cleanup frames in popup child list
mPopupFrames.DeleteFrames(aPresContext); mPopupFrames.DeleteFrames(aPresContext);
return nsAreaFrame::DeleteFrame(aPresContext); return nsAreaFrame::Destroy(aPresContext);
} }

Просмотреть файл

@ -77,7 +77,7 @@ public:
PRInt32* aLocalChange); PRInt32* aLocalChange);
NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName, nsIAtom* aListName,

Просмотреть файл

@ -150,7 +150,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
else { else {
aChildList = frame; aChildList = frame;
} }
legendFrame->DeleteFrame(aPresContext); legendFrame->Destroy(aPresContext);
} }
else { else {
nsIFrame* nextFrame; nsIFrame* nextFrame;

Просмотреть файл

@ -1606,7 +1606,7 @@ nsCSSFrameConstructor::ConstructTableCellFrameOnly(nsIPresContext* aPre
// Create an area frame that will format the cell's content // Create an area frame that will format the cell's content
rv = NS_NewTableCellInnerFrame(&aNewCellBodyFrame); rv = NS_NewTableCellInnerFrame(&aNewCellBodyFrame);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
aNewCellFrame->DeleteFrame(*aPresContext); aNewCellFrame->Destroy(*aPresContext);
aNewCellFrame = nsnull; aNewCellFrame = nsnull;
return rv; return rv;
} }

Просмотреть файл

@ -342,10 +342,10 @@ nsTableFrame::~nsTableFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsTableFrame::DeleteFrame(nsIPresContext& aPresContext) nsTableFrame::Destroy(nsIPresContext& aPresContext)
{ {
mColGroups.DeleteFrames(aPresContext); mColGroups.DeleteFrames(aPresContext);
return nsHTMLContainerFrame::DeleteFrame(aPresContext); return nsHTMLContainerFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -88,8 +88,8 @@ public:
nsIFrame* aPrevInFlow); nsIFrame* aPrevInFlow);
/** @see nsIFrame::DeleteFrame */ /** @see nsIFrame::Destroy */
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
/** helper method for determining if this is a nested table or not /** helper method for determining if this is a nested table or not
* @param aReflowState The reflow state for this inner table frame * @param aReflowState The reflow state for this inner table frame

Просмотреть файл

@ -1210,7 +1210,7 @@ void nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
} }
// Delete the next-in-flow frame and adjust it's parent's child count // Delete the next-in-flow frame and adjust it's parent's child count
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
#ifdef NS_DEBUG #ifdef NS_DEBUG
aChild->GetNextInFlow(&nextInFlow); aChild->GetNextInFlow(&nextInFlow);

Просмотреть файл

@ -342,10 +342,10 @@ nsTableFrame::~nsTableFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsTableFrame::DeleteFrame(nsIPresContext& aPresContext) nsTableFrame::Destroy(nsIPresContext& aPresContext)
{ {
mColGroups.DeleteFrames(aPresContext); mColGroups.DeleteFrames(aPresContext);
return nsHTMLContainerFrame::DeleteFrame(aPresContext); return nsHTMLContainerFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -88,8 +88,8 @@ public:
nsIFrame* aPrevInFlow); nsIFrame* aPrevInFlow);
/** @see nsIFrame::DeleteFrame */ /** @see nsIFrame::Destroy */
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
/** helper method for determining if this is a nested table or not /** helper method for determining if this is a nested table or not
* @param aReflowState The reflow state for this inner table frame * @param aReflowState The reflow state for this inner table frame

Просмотреть файл

@ -1210,7 +1210,7 @@ void nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
} }
// Delete the next-in-flow frame and adjust it's parent's child count // Delete the next-in-flow frame and adjust it's parent's child count
nextInFlow->DeleteFrame(aPresContext); nextInFlow->Destroy(aPresContext);
#ifdef NS_DEBUG #ifdef NS_DEBUG
aChild->GetNextInFlow(&nextInFlow); aChild->GetNextInFlow(&nextInFlow);

Просмотреть файл

@ -164,11 +164,11 @@ nsMenuFrame::GetAdditionalChildListName(PRInt32 aIndex,
} }
NS_IMETHODIMP NS_IMETHODIMP
nsMenuFrame::DeleteFrame(nsIPresContext& aPresContext) nsMenuFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Cleanup frames in popup child list // Cleanup frames in popup child list
mPopupFrames.DeleteFrames(aPresContext); mPopupFrames.DeleteFrames(aPresContext);
return nsBoxFrame::DeleteFrame(aPresContext); return nsBoxFrame::Destroy(aPresContext);
} }
// Called to prevent events from going to anything inside the menu. // Called to prevent events from going to anything inside the menu.

Просмотреть файл

@ -61,7 +61,7 @@ public:
nsIFrame* aChildList); nsIFrame* aChildList);
NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex, NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex,
nsIAtom** aListName) const; nsIAtom** aListName) const;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
// Overridden to prevent events from ever going to children of the menu. // Overridden to prevent events from ever going to children of the menu.
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint, NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint,

Просмотреть файл

@ -193,12 +193,12 @@ nsTitledButtonFrame::nsTitledButtonFrame()
} }
NS_METHOD NS_METHOD
nsTitledButtonFrame::DeleteFrame(nsIPresContext& aPresContext) nsTitledButtonFrame::Destroy(nsIPresContext& aPresContext)
{ {
// Release image loader first so that it's refcnt can go to zero // Release image loader first so that it's refcnt can go to zero
mImageLoader.StopAllLoadImages(&aPresContext); mImageLoader.StopAllLoadImages(&aPresContext);
return nsLeafFrame::DeleteFrame(aPresContext); return nsLeafFrame::Destroy(aPresContext);
} }

Просмотреть файл

@ -57,7 +57,7 @@ public:
nsStyleChangeList* aChangeList, nsStyleChangeList* aChangeList,
PRInt32* aLocalChange) ; PRInt32* aLocalChange) ;
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameName(nsString& aResult) const;

Просмотреть файл

@ -332,8 +332,8 @@ void nsTreeCellFrame::Hover(nsIPresContext& aPresContext, PRBool isHover, PRBool
} }
NS_IMETHODIMP NS_IMETHODIMP
nsTreeCellFrame::DeleteFrame(nsIPresContext& aPresContext) nsTreeCellFrame::Destroy(nsIPresContext& aPresContext)
{ {
mTreeFrame->RemoveFromSelection(aPresContext, this); mTreeFrame->RemoveFromSelection(aPresContext, this);
return nsTableCellFrame::DeleteFrame(aPresContext); return nsTableCellFrame::Destroy(aPresContext);
} }

Просмотреть файл

@ -44,7 +44,7 @@ public:
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus); nsReflowStatus& aStatus);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
void Select(nsIPresContext& presContext, PRBool isSelected, PRBool notifyForReflow = PR_TRUE); void Select(nsIPresContext& presContext, PRBool isSelected, PRBool notifyForReflow = PR_TRUE);
void Hover(nsIPresContext& presContext, PRBool isHover, PRBool notifyForReflow = PR_TRUE); void Hover(nsIPresContext& presContext, PRBool isHover, PRBool notifyForReflow = PR_TRUE);

Просмотреть файл

@ -277,10 +277,10 @@ void nsTreeFrame::FireChangeHandler(nsIPresContext& aPresContext)
} }
NS_IMETHODIMP NS_IMETHODIMP
nsTreeFrame::DeleteFrame(nsIPresContext& aPresContext) nsTreeFrame::Destroy(nsIPresContext& aPresContext)
{ {
ClearSelection(aPresContext); ClearSelection(aPresContext);
return nsTableFrame::DeleteFrame(aPresContext); return nsTableFrame::Destroy(aPresContext);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -45,7 +45,7 @@ public:
void SlateForReflow() { mSlatedForReflow = PR_TRUE; }; void SlateForReflow() { mSlatedForReflow = PR_TRUE; };
// Overridden methods // Overridden methods
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
PRBool RowGroupsShouldBeConstrained() { return PR_TRUE; } PRBool RowGroupsShouldBeConstrained() { return PR_TRUE; }
NS_IMETHODIMP Reflow(nsIPresContext& aPresContext, NS_IMETHODIMP Reflow(nsIPresContext& aPresContext,

Просмотреть файл

@ -77,11 +77,11 @@ nsTreeRowGroupFrame::~nsTreeRowGroupFrame()
} }
NS_IMETHODIMP NS_IMETHODIMP
nsTreeRowGroupFrame::DeleteFrame(nsIPresContext& aPresContext) nsTreeRowGroupFrame::Destroy(nsIPresContext& aPresContext)
{ {
if (mScrollbar) { if (mScrollbar) {
mFrameConstructor->RemoveMappingsForFrameSubtree(&aPresContext, mScrollbar); mFrameConstructor->RemoveMappingsForFrameSubtree(&aPresContext, mScrollbar);
mScrollbar->DeleteFrame(aPresContext); mScrollbar->Destroy(aPresContext);
} }
return NS_OK; return NS_OK;
} }

Просмотреть файл

@ -111,7 +111,7 @@ protected:
void GetVisibleRowCount(PRInt32& rowCount, nsIContent* aParent); void GetVisibleRowCount(PRInt32& rowCount, nsIContent* aParent);
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); NS_IMETHOD Destroy(nsIPresContext& aPresContext);
protected: // Data Members protected: // Data Members
nsIFrame* mTopFrame; // The current topmost frame in the view. nsIFrame* mTopFrame; // The current topmost frame in the view.