From c551fe31665313095a4585576e4cc7dee11e77a0 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Thu, 22 Jul 1999 02:24:52 +0000 Subject: [PATCH] Renamed DeleteFrame() to Destroy() --- layout/base/nsCSSFrameConstructor.cpp | 2 +- layout/base/nsPresShell.cpp | 2 +- layout/base/public/nsIFrame.h | 24 +++++++++---------- layout/base/src/nsFrameList.cpp | 6 ++--- layout/forms/nsComboboxControlFrame.cpp | 4 ++-- layout/forms/nsComboboxControlFrame.h | 2 +- layout/forms/nsFieldSetFrame.cpp | 2 +- layout/generic/nsAbsoluteContainingBlock.cpp | 2 +- layout/generic/nsAbsoluteContainingBlock.h | 2 +- layout/generic/nsAreaFrame.cpp | 6 ++--- layout/generic/nsAreaFrame.h | 2 +- layout/generic/nsBlockFrame.cpp | 12 +++++----- layout/generic/nsBlockFrame.h | 2 +- layout/generic/nsBlockReflowState.cpp | 12 +++++----- layout/generic/nsBlockReflowState.h | 12 +++++----- layout/generic/nsBulletFrame.cpp | 4 ++-- layout/generic/nsBulletFrame.h | 2 +- layout/generic/nsContainerFrame.cpp | 8 +++---- layout/generic/nsContainerFrame.h | 2 +- layout/generic/nsFrame.cpp | 2 +- layout/generic/nsFrame.h | 2 +- layout/generic/nsFrameList.cpp | 6 ++--- layout/generic/nsIFrame.h | 24 +++++++++---------- layout/generic/nsImageFrame.cpp | 4 ++-- layout/generic/nsImageFrame.h | 2 +- layout/generic/nsInlineFrame.cpp | 20 ++++++++-------- layout/generic/nsInlineFrame.h | 4 ++-- layout/generic/nsLineBox.cpp | 2 +- layout/generic/nsObjectFrame.cpp | 2 +- layout/generic/nsViewportFrame.cpp | 6 ++--- .../base/src/nsAbsoluteContainingBlock.cpp | 2 +- .../html/base/src/nsAbsoluteContainingBlock.h | 2 +- layout/html/base/src/nsAreaFrame.cpp | 6 ++--- layout/html/base/src/nsAreaFrame.h | 2 +- layout/html/base/src/nsBlockFrame.cpp | 12 +++++----- layout/html/base/src/nsBlockFrame.h | 2 +- layout/html/base/src/nsBlockReflowState.cpp | 12 +++++----- layout/html/base/src/nsBlockReflowState.h | 12 +++++----- layout/html/base/src/nsBulletFrame.cpp | 4 ++-- layout/html/base/src/nsBulletFrame.h | 2 +- layout/html/base/src/nsContainerFrame.cpp | 8 +++---- layout/html/base/src/nsContainerFrame.h | 2 +- layout/html/base/src/nsFrame.cpp | 2 +- layout/html/base/src/nsFrame.h | 2 +- layout/html/base/src/nsImageFrame.cpp | 4 ++-- layout/html/base/src/nsImageFrame.h | 2 +- layout/html/base/src/nsInlineFrame.cpp | 20 ++++++++-------- layout/html/base/src/nsInlineFrame.h | 4 ++-- layout/html/base/src/nsLineBox.cpp | 2 +- layout/html/base/src/nsObjectFrame.cpp | 2 +- layout/html/base/src/nsPresShell.cpp | 2 +- layout/html/base/src/nsViewportFrame.cpp | 6 ++--- .../html/forms/src/nsComboboxControlFrame.cpp | 4 ++-- .../html/forms/src/nsComboboxControlFrame.h | 2 +- layout/html/forms/src/nsFieldSetFrame.cpp | 2 +- .../html/style/src/nsCSSFrameConstructor.cpp | 2 +- layout/html/table/src/nsTableFrame.cpp | 4 ++-- layout/html/table/src/nsTableFrame.h | 4 ++-- layout/html/table/src/nsTableOuterFrame.cpp | 2 +- layout/tables/nsTableFrame.cpp | 4 ++-- layout/tables/nsTableFrame.h | 4 ++-- layout/tables/nsTableOuterFrame.cpp | 2 +- layout/xul/base/src/nsMenuFrame.cpp | 4 ++-- layout/xul/base/src/nsMenuFrame.h | 2 +- layout/xul/base/src/nsTitledButtonFrame.cpp | 4 ++-- layout/xul/base/src/nsTitledButtonFrame.h | 2 +- layout/xul/base/src/nsTreeCellFrame.cpp | 4 ++-- layout/xul/base/src/nsTreeCellFrame.h | 2 +- layout/xul/base/src/nsTreeFrame.cpp | 4 ++-- layout/xul/base/src/nsTreeFrame.h | 2 +- layout/xul/base/src/nsTreeRowGroupFrame.cpp | 4 ++-- layout/xul/base/src/nsTreeRowGroupFrame.h | 2 +- 72 files changed, 177 insertions(+), 177 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 2626a7099c02..59ffbf9246b6 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -1606,7 +1606,7 @@ nsCSSFrameConstructor::ConstructTableCellFrameOnly(nsIPresContext* aPre // Create an area frame that will format the cell's content rv = NS_NewTableCellInnerFrame(&aNewCellBodyFrame); if (NS_FAILED(rv)) { - aNewCellFrame->DeleteFrame(*aPresContext); + aNewCellFrame->Destroy(*aPresContext); aNewCellFrame = nsnull; return rv; } diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 410d8c10a9ec..483c80d74d24 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -603,7 +603,7 @@ PresShell::~PresShell() // Revoke any events posted to the event queue that we haven't processed yet RevokePostedEvents(); if (mRootFrame) - mRootFrame->DeleteFrame(*mPresContext); + mRootFrame->Destroy(*mPresContext); if (mDocument) mDocument->DeleteShell(this); mRefCnt = 0; diff --git a/layout/base/public/nsIFrame.h b/layout/base/public/nsIFrame.h index 133c08b7c4c0..e3588b621db6 100644 --- a/layout/base/public/nsIFrame.h +++ b/layout/base/public/nsIFrame.h @@ -178,8 +178,8 @@ enum nsSpread { * there is no order defined between frames in different child lists of * the same parent frame. * - * Frames are NOT reference counted. Use the DeleteFrame() member function - * to delete a frame. The lifetime of the frame hierarchy is bounded by the + * Frames are NOT reference counted. Use the Destroy() member function + * to destroy a frame. The lifetime of the frame hierarchy is bounded by the * lifetime of the presentation shell which owns the frames. */ class nsIFrame : public nsISupports @@ -209,6 +209,12 @@ public: nsIStyleContext* aContext, 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 * has been initialized. @@ -232,8 +238,8 @@ public: /** * This method is responsible for appending frames to the frame - * list. The implementation should do something with the new frames - * and then generate a reflow command. + * list. The implementation should append the frames to the appropriate + * child list and then generate a reflow command. * * @param aListName the name of the child list. A NULL pointer for the atom * name means the unnamed principal child list @@ -250,8 +256,8 @@ public: /** * This method is responsible for inserting frames into the frame - * list. The implementation should do something with the new frames - * and then generate a reflow command. + * list. The implementation should insert the new frames into the appropriate + * child list and then generate a reflow command. * * @param aListName the name of the child list. A NULL pointer for the atom * name means the unnamed principal child list @@ -287,12 +293,6 @@ public: nsIAtom* aListName, 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 * the content object so the caller must do a release. diff --git a/layout/base/src/nsFrameList.cpp b/layout/base/src/nsFrameList.cpp index 799dea0d2fdd..4a2ce7b73282 100644 --- a/layout/base/src/nsFrameList.cpp +++ b/layout/base/src/nsFrameList.cpp @@ -25,7 +25,7 @@ nsFrameList::DeleteFrames(nsIPresContext& aPresContext) while (nsnull != frame) { nsIFrame* next; frame->GetNextSibling(&next); - frame->DeleteFrame(aPresContext); + frame->Destroy(aPresContext); mFirstChild = frame = next; } } @@ -111,7 +111,7 @@ nsFrameList::DeleteFrame(nsIPresContext& aPresContext, nsIFrame* aFrame) { NS_PRECONDITION(nsnull != aFrame, "null ptr"); if (RemoveFrame(aFrame)) { - aFrame->DeleteFrame(aPresContext); + aFrame->Destroy(aPresContext); return PR_TRUE; } return PR_FALSE; @@ -208,7 +208,7 @@ nsFrameList::ReplaceAndDeleteFrame(nsIPresContext& aPresContext, NS_PRECONDITION(nsnull != aOldFrame, "null ptr"); NS_PRECONDITION(nsnull != aNewFrame, "null ptr"); if (ReplaceFrame(aParent, aOldFrame, aNewFrame)) { - aNewFrame->DeleteFrame(aPresContext); + aNewFrame->Destroy(aPresContext); return PR_TRUE; } return PR_FALSE; diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index a70778b83962..95650ffb840c 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -970,11 +970,11 @@ nsComboboxControlFrame::SetSuggestedSize(nscoord aWidth, nscoord aHeight) NS_IMETHODIMP -nsComboboxControlFrame::DeleteFrame(nsIPresContext& aPresContext) +nsComboboxControlFrame::Destroy(nsIPresContext& aPresContext) { // Cleanup frames in popup child list mPopupFrames.DeleteFrames(aPresContext); - return nsAreaFrame::DeleteFrame(aPresContext); + return nsAreaFrame::Destroy(aPresContext); } diff --git a/layout/forms/nsComboboxControlFrame.h b/layout/forms/nsComboboxControlFrame.h index 5a411f98d7b4..bd4811d6f94a 100644 --- a/layout/forms/nsComboboxControlFrame.h +++ b/layout/forms/nsComboboxControlFrame.h @@ -77,7 +77,7 @@ public: PRInt32* aLocalChange); 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 SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index 6ffe6aaefd5f..5aab6c738fca 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -150,7 +150,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext, else { aChildList = frame; } - legendFrame->DeleteFrame(aPresContext); + legendFrame->Destroy(aPresContext); } else { nsIFrame* nextFrame; diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index 5c01095bd08e..8e5206cf94d1 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -27,7 +27,7 @@ static NS_DEFINE_IID(kAreaFrameIID, NS_IAREAFRAME_IID); void -nsAbsoluteContainingBlock::DeleteFrames(nsIPresContext& aPresContext) +nsAbsoluteContainingBlock::DestroyFrames(nsIPresContext& aPresContext) { mAbsoluteFrames.DeleteFrames(aPresContext); } diff --git a/layout/generic/nsAbsoluteContainingBlock.h b/layout/generic/nsAbsoluteContainingBlock.h index 79e533935e0b..9167b97c36bb 100644 --- a/layout/generic/nsAbsoluteContainingBlock.h +++ b/layout/generic/nsAbsoluteContainingBlock.h @@ -58,7 +58,7 @@ public: const nsHTMLReflowState& aReflowState, PRBool& aWasHandled); - void DeleteFrames(nsIPresContext& aPresContext); + void DestroyFrames(nsIPresContext& aPresContext); nsresult GetPositionedInfo(nscoord& aXMost, nscoord& aYMost) const; diff --git a/layout/generic/nsAreaFrame.cpp b/layout/generic/nsAreaFrame.cpp index a2cddede3ac7..5694d6964e69 100644 --- a/layout/generic/nsAreaFrame.cpp +++ b/layout/generic/nsAreaFrame.cpp @@ -104,10 +104,10 @@ nsAreaFrame::Init(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsAreaFrame::DeleteFrame(nsIPresContext& aPresContext) +nsAreaFrame::Destroy(nsIPresContext& aPresContext) { - mAbsoluteContainer.DeleteFrames(aPresContext); - return nsBlockFrame::DeleteFrame(aPresContext); + mAbsoluteContainer.DestroyFrames(aPresContext); + return nsBlockFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/generic/nsAreaFrame.h b/layout/generic/nsAreaFrame.h index d81d222fc3e8..bd9da1730547 100644 --- a/layout/generic/nsAreaFrame.h +++ b/layout/generic/nsAreaFrame.h @@ -56,7 +56,7 @@ public: nsIStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 1f65fcd0be09..7e2669b81075 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame() } NS_IMETHODIMP -nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBlockFrame::Destroy(nsIPresContext& aPresContext) { // Outside bullets are not in our child-list so check for them here // and delete them when present. if (HaveOutsideBullet()) { - mBullet->DeleteFrame(aPresContext); + mBullet->Destroy(aPresContext); mBullet = nsnull; } @@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines); - return nsBlockFrameSuper::DeleteFrame(aPresContext); + return nsBlockFrameSuper::Destroy(aPresContext); } NS_IMETHODIMP @@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext, // XXX stop storing pointers to the placeholder in the line list??? ph->SetOutOfFlowFrame(nsnull); floaters->RemoveElementAt(i); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); goto found_it; } } @@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsFrame::ListTag(stdout, aDeletedFrame); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); #endif - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); aDeletedFrame = nextInFlow; // If line is empty, remove it now @@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext, { // Strip deleted frame out of the nsFirstLineFrame aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); // See if the line-frame and its continuations are now empty nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index 5adf5724e163..88cfe674e53d 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -84,7 +84,7 @@ public: NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex, nsIAtom** aListName) const; - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext, diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 1f65fcd0be09..7e2669b81075 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame() } NS_IMETHODIMP -nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBlockFrame::Destroy(nsIPresContext& aPresContext) { // Outside bullets are not in our child-list so check for them here // and delete them when present. if (HaveOutsideBullet()) { - mBullet->DeleteFrame(aPresContext); + mBullet->Destroy(aPresContext); mBullet = nsnull; } @@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines); - return nsBlockFrameSuper::DeleteFrame(aPresContext); + return nsBlockFrameSuper::Destroy(aPresContext); } NS_IMETHODIMP @@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext, // XXX stop storing pointers to the placeholder in the line list??? ph->SetOutOfFlowFrame(nsnull); floaters->RemoveElementAt(i); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); goto found_it; } } @@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsFrame::ListTag(stdout, aDeletedFrame); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); #endif - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); aDeletedFrame = nextInFlow; // If line is empty, remove it now @@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext, { // Strip deleted frame out of the nsFirstLineFrame aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); // See if the line-frame and its continuations are now empty nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); diff --git a/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index 1f65fcd0be09..7e2669b81075 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/layout/generic/nsBlockReflowState.h @@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame() } NS_IMETHODIMP -nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBlockFrame::Destroy(nsIPresContext& aPresContext) { // Outside bullets are not in our child-list so check for them here // and delete them when present. if (HaveOutsideBullet()) { - mBullet->DeleteFrame(aPresContext); + mBullet->Destroy(aPresContext); mBullet = nsnull; } @@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines); - return nsBlockFrameSuper::DeleteFrame(aPresContext); + return nsBlockFrameSuper::Destroy(aPresContext); } NS_IMETHODIMP @@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext, // XXX stop storing pointers to the placeholder in the line list??? ph->SetOutOfFlowFrame(nsnull); floaters->RemoveElementAt(i); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); goto found_it; } } @@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsFrame::ListTag(stdout, aDeletedFrame); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); #endif - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); aDeletedFrame = nextInFlow; // If line is empty, remove it now @@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext, { // Strip deleted frame out of the nsFirstLineFrame aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); // See if the line-frame and its continuations are now empty nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index 2c7412c8e813..4c30530559e3 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -42,13 +42,13 @@ nsBulletFrame::~nsBulletFrame() } NS_IMETHODIMP -nsBulletFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBulletFrame::Destroy(nsIPresContext& aPresContext) { // Stop image loading first mImageLoader.StopAllLoadImages(&aPresContext); // Let base class do the rest - return nsFrame::DeleteFrame(aPresContext); + return nsFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/generic/nsBulletFrame.h b/layout/generic/nsBulletFrame.h index 8e07d27dc229..33cdc80f7088 100644 --- a/layout/generic/nsBulletFrame.h +++ b/layout/generic/nsBulletFrame.h @@ -38,7 +38,7 @@ public: nsIFrame* aParent, nsIStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD Paint(nsIPresContext &aCX, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index b0e9b5063de1..199521b30a68 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -66,7 +66,7 @@ nsContainerFrame::SetInitialChildList(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) +nsContainerFrame::Destroy(nsIPresContext& aPresContext) { // Prevent event dispatch during destruction nsIView* view; @@ -78,8 +78,8 @@ nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) // Delete the primary child list mFrames.DeleteFrames(aPresContext); - // Base class will delete the frame - return nsFrame::DeleteFrame(aPresContext); + // Base class will destroy the frame + return nsFrame::Destroy(aPresContext); } NS_IMETHODIMP @@ -480,7 +480,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, NS_ASSERTION(result, "failed to remove frame"); // Delete the next-in-flow frame - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); #ifdef NS_DEBUG aChild->GetNextInFlow(&nextInFlow); diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index cab9098f2324..69ce0d62f5cd 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -32,7 +32,7 @@ public: nsIAtom* aListName, nsIFrame* aChildList); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index bd5191a8aeb7..c3f34957187f 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -372,7 +372,7 @@ nsFrame::RemoveFrame(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsFrame::DeleteFrame(nsIPresContext& aPresContext) +nsFrame::Destroy(nsIPresContext& aPresContext) { nsCOMPtr shell; aPresContext.GetShell(getter_AddRefs(shell)); diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index 07cd942ca31f..60778dca6219 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -130,7 +130,7 @@ public: nsIPresShell& aPresShell, nsIAtom* aListName, nsIFrame* aOldFrame); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD GetContent(nsIContent** aContent) const; NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const; NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, diff --git a/layout/generic/nsFrameList.cpp b/layout/generic/nsFrameList.cpp index 799dea0d2fdd..4a2ce7b73282 100644 --- a/layout/generic/nsFrameList.cpp +++ b/layout/generic/nsFrameList.cpp @@ -25,7 +25,7 @@ nsFrameList::DeleteFrames(nsIPresContext& aPresContext) while (nsnull != frame) { nsIFrame* next; frame->GetNextSibling(&next); - frame->DeleteFrame(aPresContext); + frame->Destroy(aPresContext); mFirstChild = frame = next; } } @@ -111,7 +111,7 @@ nsFrameList::DeleteFrame(nsIPresContext& aPresContext, nsIFrame* aFrame) { NS_PRECONDITION(nsnull != aFrame, "null ptr"); if (RemoveFrame(aFrame)) { - aFrame->DeleteFrame(aPresContext); + aFrame->Destroy(aPresContext); return PR_TRUE; } return PR_FALSE; @@ -208,7 +208,7 @@ nsFrameList::ReplaceAndDeleteFrame(nsIPresContext& aPresContext, NS_PRECONDITION(nsnull != aOldFrame, "null ptr"); NS_PRECONDITION(nsnull != aNewFrame, "null ptr"); if (ReplaceFrame(aParent, aOldFrame, aNewFrame)) { - aNewFrame->DeleteFrame(aPresContext); + aNewFrame->Destroy(aPresContext); return PR_TRUE; } return PR_FALSE; diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 133c08b7c4c0..e3588b621db6 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -178,8 +178,8 @@ enum nsSpread { * there is no order defined between frames in different child lists of * the same parent frame. * - * Frames are NOT reference counted. Use the DeleteFrame() member function - * to delete a frame. The lifetime of the frame hierarchy is bounded by the + * Frames are NOT reference counted. Use the Destroy() member function + * to destroy a frame. The lifetime of the frame hierarchy is bounded by the * lifetime of the presentation shell which owns the frames. */ class nsIFrame : public nsISupports @@ -209,6 +209,12 @@ public: nsIStyleContext* aContext, 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 * has been initialized. @@ -232,8 +238,8 @@ public: /** * This method is responsible for appending frames to the frame - * list. The implementation should do something with the new frames - * and then generate a reflow command. + * list. The implementation should append the frames to the appropriate + * child list and then generate a reflow command. * * @param aListName the name of the child list. A NULL pointer for the atom * name means the unnamed principal child list @@ -250,8 +256,8 @@ public: /** * This method is responsible for inserting frames into the frame - * list. The implementation should do something with the new frames - * and then generate a reflow command. + * list. The implementation should insert the new frames into the appropriate + * child list and then generate a reflow command. * * @param aListName the name of the child list. A NULL pointer for the atom * name means the unnamed principal child list @@ -287,12 +293,6 @@ public: nsIAtom* aListName, 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 * the content object so the caller must do a release. diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 0e7385243e67..f748c04b9802 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -93,14 +93,14 @@ nsImageFrame::~nsImageFrame() } NS_METHOD -nsImageFrame::DeleteFrame(nsIPresContext& aPresContext) +nsImageFrame::Destroy(nsIPresContext& aPresContext) { NS_IF_RELEASE(mImageMap); // Release image loader first so that it's refcnt can go to zero mImageLoader.StopAllLoadImages(&aPresContext); - return nsLeafFrame::DeleteFrame(aPresContext); + return nsLeafFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index c980e5b9cc5f..104187f5e728 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -35,7 +35,7 @@ struct nsSize; class nsImageFrame : public ImageFrameSuper { public: - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD Init(nsIPresContext& aPresContext, nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index f3eff4162ad9..43546418c150 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -65,10 +65,10 @@ NS_NewPositionedInlineFrame(nsIFrame** aNewFrame) } NS_IMETHODIMP -nsPositionedInlineFrame::DeleteFrame(nsIPresContext& aPresContext) +nsPositionedInlineFrame::Destroy(nsIPresContext& aPresContext) { - mAbsoluteContainer.DeleteFrames(aPresContext); - return nsInlineFrame::DeleteFrame(aPresContext); + mAbsoluteContainer.DestroyFrames(aPresContext); + return nsInlineFrame::Destroy(aPresContext); } NS_IMETHODIMP @@ -318,10 +318,10 @@ nsInlineFrame::GetFrameType(nsIAtom** aType) const } NS_IMETHODIMP -nsInlineFrame::DeleteFrame(nsIPresContext& aPresContext) +nsInlineFrame::Destroy(nsIPresContext& aPresContext) { mFrames.DeleteFrames(aPresContext); - return nsInlineFrameSuper::DeleteFrame(aPresContext); + return nsInlineFrameSuper::Destroy(aPresContext); } ////////////////////////////////////////////////////////////////////// @@ -389,7 +389,7 @@ nsInlineFrame::CreateAnonymousBlock(nsIPresContext& aPresContext, getter_AddRefs(newSC)); rv = bf->Init(aPresContext, mContent, this, newSC, nsnull); if (NS_FAILED(rv)) { - bf->DeleteFrame(aPresContext); + bf->Destroy(aPresContext); delete bf; } else { @@ -1058,7 +1058,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); nsAnonymousBlockFrame* ab = anonymousBlock; anonymousBlock->RemoveFramesFrom(aOldFrame); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); while (nsnull != nextInFlow) { nsIFrame* nextParent; nextInFlow->GetParent(&nextParent); @@ -1068,7 +1068,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, ab->RemoveFirstFrame(); nsIFrame* nextNextInFlow; nextInFlow->GetNextInFlow(&nextNextInFlow); - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); nextInFlow = nextNextInFlow; } @@ -1134,7 +1134,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); anonymousBlock->RemoveFirstFrame(); aOldFrame->GetNextInFlow(&nextInFlow); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); while (nsnull != nextInFlow) { nsIFrame* nextParent; nextInFlow->GetParent(&nextParent); @@ -1144,7 +1144,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, anonymousBlock->RemoveFirstFrame(); nsIFrame* nextNextInFlow; nextInFlow->GetNextInFlow(&nextNextInFlow); - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); nextInFlow = nextNextInFlow; } diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index 5b0c4f2e22d4..77606af3e85e 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -55,7 +55,7 @@ public: nsIPresShell& aPresShell, nsIAtom* aListName, nsIFrame* aOldFrame); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameType(nsIAtom** aType) const; @@ -249,7 +249,7 @@ extern nsresult NS_NewFirstLineFrame(nsIFrame** aNewFrame); class nsPositionedInlineFrame : public nsInlineFrame { public: - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, diff --git a/layout/generic/nsLineBox.cpp b/layout/generic/nsLineBox.cpp index 8dc62df029f4..196ebf5136b4 100644 --- a/layout/generic/nsLineBox.cpp +++ b/layout/generic/nsLineBox.cpp @@ -154,7 +154,7 @@ nsLineBox::DeleteLineList(nsIPresContext& aPresContext, nsLineBox* aLine) for (nsIFrame* child = aLine->mFirstChild; child; ) { nsIFrame* nextChild; child->GetNextSibling(&nextChild); - child->DeleteFrame(aPresContext); + child->Destroy(aPresContext); child = nextChild; } diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index d488fedf57e2..15316fc82925 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -383,7 +383,7 @@ nsObjectFrame::Init(nsIPresContext& aPresContext, mFrames.AppendFrame(this, aNewFrame); } else - aNewFrame->DeleteFrame(aPresContext); + aNewFrame->Destroy(aPresContext); } return rv; diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index d657d556eadf..db75a549f6da 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -44,7 +44,7 @@ static NS_DEFINE_IID(kScrollViewIID, NS_ISCROLLABLEVIEW_IID); */ class ViewportFrame : public nsContainerFrame { public: - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, @@ -109,10 +109,10 @@ NS_NewViewportFrame(nsIFrame** aNewFrame) } NS_IMETHODIMP -ViewportFrame::DeleteFrame(nsIPresContext& aPresContext) +ViewportFrame::Destroy(nsIPresContext& aPresContext) { mFixedFrames.DeleteFrames(aPresContext); - return nsContainerFrame::DeleteFrame(aPresContext); + return nsContainerFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/html/base/src/nsAbsoluteContainingBlock.cpp b/layout/html/base/src/nsAbsoluteContainingBlock.cpp index 5c01095bd08e..8e5206cf94d1 100644 --- a/layout/html/base/src/nsAbsoluteContainingBlock.cpp +++ b/layout/html/base/src/nsAbsoluteContainingBlock.cpp @@ -27,7 +27,7 @@ static NS_DEFINE_IID(kAreaFrameIID, NS_IAREAFRAME_IID); void -nsAbsoluteContainingBlock::DeleteFrames(nsIPresContext& aPresContext) +nsAbsoluteContainingBlock::DestroyFrames(nsIPresContext& aPresContext) { mAbsoluteFrames.DeleteFrames(aPresContext); } diff --git a/layout/html/base/src/nsAbsoluteContainingBlock.h b/layout/html/base/src/nsAbsoluteContainingBlock.h index 79e533935e0b..9167b97c36bb 100644 --- a/layout/html/base/src/nsAbsoluteContainingBlock.h +++ b/layout/html/base/src/nsAbsoluteContainingBlock.h @@ -58,7 +58,7 @@ public: const nsHTMLReflowState& aReflowState, PRBool& aWasHandled); - void DeleteFrames(nsIPresContext& aPresContext); + void DestroyFrames(nsIPresContext& aPresContext); nsresult GetPositionedInfo(nscoord& aXMost, nscoord& aYMost) const; diff --git a/layout/html/base/src/nsAreaFrame.cpp b/layout/html/base/src/nsAreaFrame.cpp index a2cddede3ac7..5694d6964e69 100644 --- a/layout/html/base/src/nsAreaFrame.cpp +++ b/layout/html/base/src/nsAreaFrame.cpp @@ -104,10 +104,10 @@ nsAreaFrame::Init(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsAreaFrame::DeleteFrame(nsIPresContext& aPresContext) +nsAreaFrame::Destroy(nsIPresContext& aPresContext) { - mAbsoluteContainer.DeleteFrames(aPresContext); - return nsBlockFrame::DeleteFrame(aPresContext); + mAbsoluteContainer.DestroyFrames(aPresContext); + return nsBlockFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/html/base/src/nsAreaFrame.h b/layout/html/base/src/nsAreaFrame.h index d81d222fc3e8..bd9da1730547 100644 --- a/layout/html/base/src/nsAreaFrame.h +++ b/layout/html/base/src/nsAreaFrame.h @@ -56,7 +56,7 @@ public: nsIStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index 1f65fcd0be09..7e2669b81075 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame() } NS_IMETHODIMP -nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBlockFrame::Destroy(nsIPresContext& aPresContext) { // Outside bullets are not in our child-list so check for them here // and delete them when present. if (HaveOutsideBullet()) { - mBullet->DeleteFrame(aPresContext); + mBullet->Destroy(aPresContext); mBullet = nsnull; } @@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines); - return nsBlockFrameSuper::DeleteFrame(aPresContext); + return nsBlockFrameSuper::Destroy(aPresContext); } NS_IMETHODIMP @@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext, // XXX stop storing pointers to the placeholder in the line list??? ph->SetOutOfFlowFrame(nsnull); floaters->RemoveElementAt(i); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); goto found_it; } } @@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsFrame::ListTag(stdout, aDeletedFrame); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); #endif - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); aDeletedFrame = nextInFlow; // If line is empty, remove it now @@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext, { // Strip deleted frame out of the nsFirstLineFrame aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); // See if the line-frame and its continuations are now empty nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); diff --git a/layout/html/base/src/nsBlockFrame.h b/layout/html/base/src/nsBlockFrame.h index 5adf5724e163..88cfe674e53d 100644 --- a/layout/html/base/src/nsBlockFrame.h +++ b/layout/html/base/src/nsBlockFrame.h @@ -84,7 +84,7 @@ public: NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex, nsIAtom** aListName) const; - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext, nsIStyleContext* aParentContext, diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index 1f65fcd0be09..7e2669b81075 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/layout/html/base/src/nsBlockReflowState.cpp @@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame() } NS_IMETHODIMP -nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBlockFrame::Destroy(nsIPresContext& aPresContext) { // Outside bullets are not in our child-list so check for them here // and delete them when present. if (HaveOutsideBullet()) { - mBullet->DeleteFrame(aPresContext); + mBullet->Destroy(aPresContext); mBullet = nsnull; } @@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines); - return nsBlockFrameSuper::DeleteFrame(aPresContext); + return nsBlockFrameSuper::Destroy(aPresContext); } NS_IMETHODIMP @@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext, // XXX stop storing pointers to the placeholder in the line list??? ph->SetOutOfFlowFrame(nsnull); floaters->RemoveElementAt(i); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); goto found_it; } } @@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsFrame::ListTag(stdout, aDeletedFrame); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); #endif - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); aDeletedFrame = nextInFlow; // If line is empty, remove it now @@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext, { // Strip deleted frame out of the nsFirstLineFrame aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); // See if the line-frame and its continuations are now empty nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); diff --git a/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index 1f65fcd0be09..7e2669b81075 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/layout/html/base/src/nsBlockReflowState.h @@ -808,12 +808,12 @@ nsBlockFrame::~nsBlockFrame() } NS_IMETHODIMP -nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBlockFrame::Destroy(nsIPresContext& aPresContext) { // Outside bullets are not in our child-list so check for them here // and delete them when present. if (HaveOutsideBullet()) { - mBullet->DeleteFrame(aPresContext); + mBullet->Destroy(aPresContext); mBullet = nsnull; } @@ -822,7 +822,7 @@ nsBlockFrame::DeleteFrame(nsIPresContext& aPresContext) nsLineBox::DeleteLineList(aPresContext, mLines); nsLineBox::DeleteLineList(aPresContext, mOverflowLines); - return nsBlockFrameSuper::DeleteFrame(aPresContext); + return nsBlockFrameSuper::Destroy(aPresContext); } NS_IMETHODIMP @@ -4252,7 +4252,7 @@ nsBlockFrame::RemoveFrame(nsIPresContext& aPresContext, // XXX stop storing pointers to the placeholder in the line list??? ph->SetOutOfFlowFrame(nsnull); floaters->RemoveElementAt(i); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); goto found_it; } } @@ -4397,7 +4397,7 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext, nsFrame::ListTag(stdout, aDeletedFrame); printf(" prevSibling=%p nextInFlow=%p\n", prevSibling, nextInFlow); #endif - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); aDeletedFrame = nextInFlow; // If line is empty, remove it now @@ -4472,7 +4472,7 @@ nsBlockFrame::RemoveFirstLineFrame(nsIPresContext* aPresContext, { // Strip deleted frame out of the nsFirstLineFrame aLineFrame->RemoveFrame2(aPresContext, aDeletedFrame); - aDeletedFrame->DeleteFrame(*aPresContext); + aDeletedFrame->Destroy(*aPresContext); // See if the line-frame and its continuations are now empty nsFirstLineFrame* lf = (nsFirstLineFrame*) aLineFrame->GetFirstInFlow(); diff --git a/layout/html/base/src/nsBulletFrame.cpp b/layout/html/base/src/nsBulletFrame.cpp index 2c7412c8e813..4c30530559e3 100644 --- a/layout/html/base/src/nsBulletFrame.cpp +++ b/layout/html/base/src/nsBulletFrame.cpp @@ -42,13 +42,13 @@ nsBulletFrame::~nsBulletFrame() } NS_IMETHODIMP -nsBulletFrame::DeleteFrame(nsIPresContext& aPresContext) +nsBulletFrame::Destroy(nsIPresContext& aPresContext) { // Stop image loading first mImageLoader.StopAllLoadImages(&aPresContext); // Let base class do the rest - return nsFrame::DeleteFrame(aPresContext); + return nsFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/html/base/src/nsBulletFrame.h b/layout/html/base/src/nsBulletFrame.h index 8e07d27dc229..33cdc80f7088 100644 --- a/layout/html/base/src/nsBulletFrame.h +++ b/layout/html/base/src/nsBulletFrame.h @@ -38,7 +38,7 @@ public: nsIFrame* aParent, nsIStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD Paint(nsIPresContext &aCX, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, diff --git a/layout/html/base/src/nsContainerFrame.cpp b/layout/html/base/src/nsContainerFrame.cpp index b0e9b5063de1..199521b30a68 100644 --- a/layout/html/base/src/nsContainerFrame.cpp +++ b/layout/html/base/src/nsContainerFrame.cpp @@ -66,7 +66,7 @@ nsContainerFrame::SetInitialChildList(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) +nsContainerFrame::Destroy(nsIPresContext& aPresContext) { // Prevent event dispatch during destruction nsIView* view; @@ -78,8 +78,8 @@ nsContainerFrame::DeleteFrame(nsIPresContext& aPresContext) // Delete the primary child list mFrames.DeleteFrames(aPresContext); - // Base class will delete the frame - return nsFrame::DeleteFrame(aPresContext); + // Base class will destroy the frame + return nsFrame::Destroy(aPresContext); } NS_IMETHODIMP @@ -480,7 +480,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, NS_ASSERTION(result, "failed to remove frame"); // Delete the next-in-flow frame - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); #ifdef NS_DEBUG aChild->GetNextInFlow(&nextInFlow); diff --git a/layout/html/base/src/nsContainerFrame.h b/layout/html/base/src/nsContainerFrame.h index cab9098f2324..69ce0d62f5cd 100644 --- a/layout/html/base/src/nsContainerFrame.h +++ b/layout/html/base/src/nsContainerFrame.h @@ -32,7 +32,7 @@ public: nsIAtom* aListName, nsIFrame* aChildList); NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const; - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, diff --git a/layout/html/base/src/nsFrame.cpp b/layout/html/base/src/nsFrame.cpp index bd5191a8aeb7..c3f34957187f 100644 --- a/layout/html/base/src/nsFrame.cpp +++ b/layout/html/base/src/nsFrame.cpp @@ -372,7 +372,7 @@ nsFrame::RemoveFrame(nsIPresContext& aPresContext, } NS_IMETHODIMP -nsFrame::DeleteFrame(nsIPresContext& aPresContext) +nsFrame::Destroy(nsIPresContext& aPresContext) { nsCOMPtr shell; aPresContext.GetShell(getter_AddRefs(shell)); diff --git a/layout/html/base/src/nsFrame.h b/layout/html/base/src/nsFrame.h index 07cd942ca31f..60778dca6219 100644 --- a/layout/html/base/src/nsFrame.h +++ b/layout/html/base/src/nsFrame.h @@ -130,7 +130,7 @@ public: nsIPresShell& aPresShell, nsIAtom* aListName, nsIFrame* aOldFrame); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD GetContent(nsIContent** aContent) const; NS_IMETHOD GetStyleContext(nsIStyleContext** aStyleContext) const; NS_IMETHOD SetStyleContext(nsIPresContext* aPresContext, diff --git a/layout/html/base/src/nsImageFrame.cpp b/layout/html/base/src/nsImageFrame.cpp index 0e7385243e67..f748c04b9802 100644 --- a/layout/html/base/src/nsImageFrame.cpp +++ b/layout/html/base/src/nsImageFrame.cpp @@ -93,14 +93,14 @@ nsImageFrame::~nsImageFrame() } NS_METHOD -nsImageFrame::DeleteFrame(nsIPresContext& aPresContext) +nsImageFrame::Destroy(nsIPresContext& aPresContext) { NS_IF_RELEASE(mImageMap); // Release image loader first so that it's refcnt can go to zero mImageLoader.StopAllLoadImages(&aPresContext); - return nsLeafFrame::DeleteFrame(aPresContext); + return nsLeafFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/html/base/src/nsImageFrame.h b/layout/html/base/src/nsImageFrame.h index c980e5b9cc5f..104187f5e728 100644 --- a/layout/html/base/src/nsImageFrame.h +++ b/layout/html/base/src/nsImageFrame.h @@ -35,7 +35,7 @@ struct nsSize; class nsImageFrame : public ImageFrameSuper { public: - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD Init(nsIPresContext& aPresContext, nsIContent* aContent, nsIFrame* aParent, diff --git a/layout/html/base/src/nsInlineFrame.cpp b/layout/html/base/src/nsInlineFrame.cpp index f3eff4162ad9..43546418c150 100644 --- a/layout/html/base/src/nsInlineFrame.cpp +++ b/layout/html/base/src/nsInlineFrame.cpp @@ -65,10 +65,10 @@ NS_NewPositionedInlineFrame(nsIFrame** aNewFrame) } NS_IMETHODIMP -nsPositionedInlineFrame::DeleteFrame(nsIPresContext& aPresContext) +nsPositionedInlineFrame::Destroy(nsIPresContext& aPresContext) { - mAbsoluteContainer.DeleteFrames(aPresContext); - return nsInlineFrame::DeleteFrame(aPresContext); + mAbsoluteContainer.DestroyFrames(aPresContext); + return nsInlineFrame::Destroy(aPresContext); } NS_IMETHODIMP @@ -318,10 +318,10 @@ nsInlineFrame::GetFrameType(nsIAtom** aType) const } NS_IMETHODIMP -nsInlineFrame::DeleteFrame(nsIPresContext& aPresContext) +nsInlineFrame::Destroy(nsIPresContext& aPresContext) { mFrames.DeleteFrames(aPresContext); - return nsInlineFrameSuper::DeleteFrame(aPresContext); + return nsInlineFrameSuper::Destroy(aPresContext); } ////////////////////////////////////////////////////////////////////// @@ -389,7 +389,7 @@ nsInlineFrame::CreateAnonymousBlock(nsIPresContext& aPresContext, getter_AddRefs(newSC)); rv = bf->Init(aPresContext, mContent, this, newSC, nsnull); if (NS_FAILED(rv)) { - bf->DeleteFrame(aPresContext); + bf->Destroy(aPresContext); delete bf; } else { @@ -1058,7 +1058,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); nsAnonymousBlockFrame* ab = anonymousBlock; anonymousBlock->RemoveFramesFrom(aOldFrame); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); while (nsnull != nextInFlow) { nsIFrame* nextParent; nextInFlow->GetParent(&nextParent); @@ -1068,7 +1068,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, ab->RemoveFirstFrame(); nsIFrame* nextNextInFlow; nextInFlow->GetNextInFlow(&nextNextInFlow); - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); nextInFlow = nextNextInFlow; } @@ -1134,7 +1134,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, anonymousBlock->GetParent((nsIFrame**) &anonymousBlockParent); anonymousBlock->RemoveFirstFrame(); aOldFrame->GetNextInFlow(&nextInFlow); - aOldFrame->DeleteFrame(aPresContext); + aOldFrame->Destroy(aPresContext); while (nsnull != nextInFlow) { nsIFrame* nextParent; nextInFlow->GetParent(&nextParent); @@ -1144,7 +1144,7 @@ nsInlineFrame::RemoveFrame(nsIPresContext& aPresContext, anonymousBlock->RemoveFirstFrame(); nsIFrame* nextNextInFlow; nextInFlow->GetNextInFlow(&nextNextInFlow); - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); nextInFlow = nextNextInFlow; } diff --git a/layout/html/base/src/nsInlineFrame.h b/layout/html/base/src/nsInlineFrame.h index 5b0c4f2e22d4..77606af3e85e 100644 --- a/layout/html/base/src/nsInlineFrame.h +++ b/layout/html/base/src/nsInlineFrame.h @@ -55,7 +55,7 @@ public: nsIPresShell& aPresShell, nsIAtom* aListName, nsIFrame* aOldFrame); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD GetFrameName(nsString& aResult) const; NS_IMETHOD GetFrameType(nsIAtom** aType) const; @@ -249,7 +249,7 @@ extern nsresult NS_NewFirstLineFrame(nsIFrame** aNewFrame); class nsPositionedInlineFrame : public nsInlineFrame { public: - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, diff --git a/layout/html/base/src/nsLineBox.cpp b/layout/html/base/src/nsLineBox.cpp index 8dc62df029f4..196ebf5136b4 100644 --- a/layout/html/base/src/nsLineBox.cpp +++ b/layout/html/base/src/nsLineBox.cpp @@ -154,7 +154,7 @@ nsLineBox::DeleteLineList(nsIPresContext& aPresContext, nsLineBox* aLine) for (nsIFrame* child = aLine->mFirstChild; child; ) { nsIFrame* nextChild; child->GetNextSibling(&nextChild); - child->DeleteFrame(aPresContext); + child->Destroy(aPresContext); child = nextChild; } diff --git a/layout/html/base/src/nsObjectFrame.cpp b/layout/html/base/src/nsObjectFrame.cpp index d488fedf57e2..15316fc82925 100644 --- a/layout/html/base/src/nsObjectFrame.cpp +++ b/layout/html/base/src/nsObjectFrame.cpp @@ -383,7 +383,7 @@ nsObjectFrame::Init(nsIPresContext& aPresContext, mFrames.AppendFrame(this, aNewFrame); } else - aNewFrame->DeleteFrame(aPresContext); + aNewFrame->Destroy(aPresContext); } return rv; diff --git a/layout/html/base/src/nsPresShell.cpp b/layout/html/base/src/nsPresShell.cpp index 410d8c10a9ec..483c80d74d24 100644 --- a/layout/html/base/src/nsPresShell.cpp +++ b/layout/html/base/src/nsPresShell.cpp @@ -603,7 +603,7 @@ PresShell::~PresShell() // Revoke any events posted to the event queue that we haven't processed yet RevokePostedEvents(); if (mRootFrame) - mRootFrame->DeleteFrame(*mPresContext); + mRootFrame->Destroy(*mPresContext); if (mDocument) mDocument->DeleteShell(this); mRefCnt = 0; diff --git a/layout/html/base/src/nsViewportFrame.cpp b/layout/html/base/src/nsViewportFrame.cpp index d657d556eadf..db75a549f6da 100644 --- a/layout/html/base/src/nsViewportFrame.cpp +++ b/layout/html/base/src/nsViewportFrame.cpp @@ -44,7 +44,7 @@ static NS_DEFINE_IID(kScrollViewIID, NS_ISCROLLABLEVIEW_IID); */ class ViewportFrame : public nsContainerFrame { public: - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, @@ -109,10 +109,10 @@ NS_NewViewportFrame(nsIFrame** aNewFrame) } NS_IMETHODIMP -ViewportFrame::DeleteFrame(nsIPresContext& aPresContext) +ViewportFrame::Destroy(nsIPresContext& aPresContext) { mFixedFrames.DeleteFrames(aPresContext); - return nsContainerFrame::DeleteFrame(aPresContext); + return nsContainerFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/html/forms/src/nsComboboxControlFrame.cpp b/layout/html/forms/src/nsComboboxControlFrame.cpp index a70778b83962..95650ffb840c 100644 --- a/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -970,11 +970,11 @@ nsComboboxControlFrame::SetSuggestedSize(nscoord aWidth, nscoord aHeight) NS_IMETHODIMP -nsComboboxControlFrame::DeleteFrame(nsIPresContext& aPresContext) +nsComboboxControlFrame::Destroy(nsIPresContext& aPresContext) { // Cleanup frames in popup child list mPopupFrames.DeleteFrames(aPresContext); - return nsAreaFrame::DeleteFrame(aPresContext); + return nsAreaFrame::Destroy(aPresContext); } diff --git a/layout/html/forms/src/nsComboboxControlFrame.h b/layout/html/forms/src/nsComboboxControlFrame.h index 5a411f98d7b4..bd4811d6f94a 100644 --- a/layout/html/forms/src/nsComboboxControlFrame.h +++ b/layout/html/forms/src/nsComboboxControlFrame.h @@ -77,7 +77,7 @@ public: PRInt32* aLocalChange); 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 SetInitialChildList(nsIPresContext& aPresContext, nsIAtom* aListName, diff --git a/layout/html/forms/src/nsFieldSetFrame.cpp b/layout/html/forms/src/nsFieldSetFrame.cpp index 6ffe6aaefd5f..5aab6c738fca 100644 --- a/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/layout/html/forms/src/nsFieldSetFrame.cpp @@ -150,7 +150,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext, else { aChildList = frame; } - legendFrame->DeleteFrame(aPresContext); + legendFrame->Destroy(aPresContext); } else { nsIFrame* nextFrame; diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 2626a7099c02..59ffbf9246b6 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -1606,7 +1606,7 @@ nsCSSFrameConstructor::ConstructTableCellFrameOnly(nsIPresContext* aPre // Create an area frame that will format the cell's content rv = NS_NewTableCellInnerFrame(&aNewCellBodyFrame); if (NS_FAILED(rv)) { - aNewCellFrame->DeleteFrame(*aPresContext); + aNewCellFrame->Destroy(*aPresContext); aNewCellFrame = nsnull; return rv; } diff --git a/layout/html/table/src/nsTableFrame.cpp b/layout/html/table/src/nsTableFrame.cpp index 4619193459a7..fd53be26d355 100644 --- a/layout/html/table/src/nsTableFrame.cpp +++ b/layout/html/table/src/nsTableFrame.cpp @@ -342,10 +342,10 @@ nsTableFrame::~nsTableFrame() } NS_IMETHODIMP -nsTableFrame::DeleteFrame(nsIPresContext& aPresContext) +nsTableFrame::Destroy(nsIPresContext& aPresContext) { mColGroups.DeleteFrames(aPresContext); - return nsHTMLContainerFrame::DeleteFrame(aPresContext); + return nsHTMLContainerFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/html/table/src/nsTableFrame.h b/layout/html/table/src/nsTableFrame.h index 65c51c8e012c..c9f7184012ef 100644 --- a/layout/html/table/src/nsTableFrame.h +++ b/layout/html/table/src/nsTableFrame.h @@ -88,8 +88,8 @@ public: nsIFrame* aPrevInFlow); - /** @see nsIFrame::DeleteFrame */ - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + /** @see nsIFrame::Destroy */ + NS_IMETHOD Destroy(nsIPresContext& aPresContext); /** helper method for determining if this is a nested table or not * @param aReflowState The reflow state for this inner table frame diff --git a/layout/html/table/src/nsTableOuterFrame.cpp b/layout/html/table/src/nsTableOuterFrame.cpp index 6626ca5c3d63..3515f80ebcc7 100644 --- a/layout/html/table/src/nsTableOuterFrame.cpp +++ b/layout/html/table/src/nsTableOuterFrame.cpp @@ -1210,7 +1210,7 @@ void nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, } // Delete the next-in-flow frame and adjust it's parent's child count - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); #ifdef NS_DEBUG aChild->GetNextInFlow(&nextInFlow); diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 4619193459a7..fd53be26d355 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -342,10 +342,10 @@ nsTableFrame::~nsTableFrame() } NS_IMETHODIMP -nsTableFrame::DeleteFrame(nsIPresContext& aPresContext) +nsTableFrame::Destroy(nsIPresContext& aPresContext) { mColGroups.DeleteFrames(aPresContext); - return nsHTMLContainerFrame::DeleteFrame(aPresContext); + return nsHTMLContainerFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 65c51c8e012c..c9f7184012ef 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -88,8 +88,8 @@ public: nsIFrame* aPrevInFlow); - /** @see nsIFrame::DeleteFrame */ - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + /** @see nsIFrame::Destroy */ + NS_IMETHOD Destroy(nsIPresContext& aPresContext); /** helper method for determining if this is a nested table or not * @param aReflowState The reflow state for this inner table frame diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 6626ca5c3d63..3515f80ebcc7 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -1210,7 +1210,7 @@ void nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, } // Delete the next-in-flow frame and adjust it's parent's child count - nextInFlow->DeleteFrame(aPresContext); + nextInFlow->Destroy(aPresContext); #ifdef NS_DEBUG aChild->GetNextInFlow(&nextInFlow); diff --git a/layout/xul/base/src/nsMenuFrame.cpp b/layout/xul/base/src/nsMenuFrame.cpp index 9859a7d92c88..5389a871eee3 100644 --- a/layout/xul/base/src/nsMenuFrame.cpp +++ b/layout/xul/base/src/nsMenuFrame.cpp @@ -164,11 +164,11 @@ nsMenuFrame::GetAdditionalChildListName(PRInt32 aIndex, } NS_IMETHODIMP -nsMenuFrame::DeleteFrame(nsIPresContext& aPresContext) +nsMenuFrame::Destroy(nsIPresContext& aPresContext) { // Cleanup frames in popup child list mPopupFrames.DeleteFrames(aPresContext); - return nsBoxFrame::DeleteFrame(aPresContext); + return nsBoxFrame::Destroy(aPresContext); } // Called to prevent events from going to anything inside the menu. diff --git a/layout/xul/base/src/nsMenuFrame.h b/layout/xul/base/src/nsMenuFrame.h index 46181484f7da..48aae85797de 100644 --- a/layout/xul/base/src/nsMenuFrame.h +++ b/layout/xul/base/src/nsMenuFrame.h @@ -61,7 +61,7 @@ public: nsIFrame* aChildList); NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex, 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. NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint, diff --git a/layout/xul/base/src/nsTitledButtonFrame.cpp b/layout/xul/base/src/nsTitledButtonFrame.cpp index 95a2a0f5e039..a34f15837975 100644 --- a/layout/xul/base/src/nsTitledButtonFrame.cpp +++ b/layout/xul/base/src/nsTitledButtonFrame.cpp @@ -193,12 +193,12 @@ nsTitledButtonFrame::nsTitledButtonFrame() } NS_METHOD -nsTitledButtonFrame::DeleteFrame(nsIPresContext& aPresContext) +nsTitledButtonFrame::Destroy(nsIPresContext& aPresContext) { // Release image loader first so that it's refcnt can go to zero mImageLoader.StopAllLoadImages(&aPresContext); - return nsLeafFrame::DeleteFrame(aPresContext); + return nsLeafFrame::Destroy(aPresContext); } diff --git a/layout/xul/base/src/nsTitledButtonFrame.h b/layout/xul/base/src/nsTitledButtonFrame.h index f632d9f2dd07..12657927c0e2 100644 --- a/layout/xul/base/src/nsTitledButtonFrame.h +++ b/layout/xul/base/src/nsTitledButtonFrame.h @@ -57,7 +57,7 @@ public: nsStyleChangeList* aChangeList, PRInt32* aLocalChange) ; - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); NS_IMETHOD GetFrameName(nsString& aResult) const; diff --git a/layout/xul/base/src/nsTreeCellFrame.cpp b/layout/xul/base/src/nsTreeCellFrame.cpp index 4965c4d6da9e..31574c0505a6 100644 --- a/layout/xul/base/src/nsTreeCellFrame.cpp +++ b/layout/xul/base/src/nsTreeCellFrame.cpp @@ -332,8 +332,8 @@ void nsTreeCellFrame::Hover(nsIPresContext& aPresContext, PRBool isHover, PRBool } NS_IMETHODIMP -nsTreeCellFrame::DeleteFrame(nsIPresContext& aPresContext) +nsTreeCellFrame::Destroy(nsIPresContext& aPresContext) { mTreeFrame->RemoveFromSelection(aPresContext, this); - return nsTableCellFrame::DeleteFrame(aPresContext); + return nsTableCellFrame::Destroy(aPresContext); } diff --git a/layout/xul/base/src/nsTreeCellFrame.h b/layout/xul/base/src/nsTreeCellFrame.h index 3b6117b8a40e..c9f610b5b0ac 100644 --- a/layout/xul/base/src/nsTreeCellFrame.h +++ b/layout/xul/base/src/nsTreeCellFrame.h @@ -44,7 +44,7 @@ public: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); void Select(nsIPresContext& presContext, PRBool isSelected, PRBool notifyForReflow = PR_TRUE); void Hover(nsIPresContext& presContext, PRBool isHover, PRBool notifyForReflow = PR_TRUE); diff --git a/layout/xul/base/src/nsTreeFrame.cpp b/layout/xul/base/src/nsTreeFrame.cpp index e7f77a9a1c38..666a632a5e6d 100644 --- a/layout/xul/base/src/nsTreeFrame.cpp +++ b/layout/xul/base/src/nsTreeFrame.cpp @@ -277,10 +277,10 @@ void nsTreeFrame::FireChangeHandler(nsIPresContext& aPresContext) } NS_IMETHODIMP -nsTreeFrame::DeleteFrame(nsIPresContext& aPresContext) +nsTreeFrame::Destroy(nsIPresContext& aPresContext) { ClearSelection(aPresContext); - return nsTableFrame::DeleteFrame(aPresContext); + return nsTableFrame::Destroy(aPresContext); } NS_IMETHODIMP diff --git a/layout/xul/base/src/nsTreeFrame.h b/layout/xul/base/src/nsTreeFrame.h index 8072ee4ecd1f..ceed4697b810 100644 --- a/layout/xul/base/src/nsTreeFrame.h +++ b/layout/xul/base/src/nsTreeFrame.h @@ -45,7 +45,7 @@ public: void SlateForReflow() { mSlatedForReflow = PR_TRUE; }; // Overridden methods - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); PRBool RowGroupsShouldBeConstrained() { return PR_TRUE; } NS_IMETHODIMP Reflow(nsIPresContext& aPresContext, diff --git a/layout/xul/base/src/nsTreeRowGroupFrame.cpp b/layout/xul/base/src/nsTreeRowGroupFrame.cpp index eefa4f2cd487..a4fe8029076c 100644 --- a/layout/xul/base/src/nsTreeRowGroupFrame.cpp +++ b/layout/xul/base/src/nsTreeRowGroupFrame.cpp @@ -77,11 +77,11 @@ nsTreeRowGroupFrame::~nsTreeRowGroupFrame() } NS_IMETHODIMP -nsTreeRowGroupFrame::DeleteFrame(nsIPresContext& aPresContext) +nsTreeRowGroupFrame::Destroy(nsIPresContext& aPresContext) { if (mScrollbar) { mFrameConstructor->RemoveMappingsForFrameSubtree(&aPresContext, mScrollbar); - mScrollbar->DeleteFrame(aPresContext); + mScrollbar->Destroy(aPresContext); } return NS_OK; } diff --git a/layout/xul/base/src/nsTreeRowGroupFrame.h b/layout/xul/base/src/nsTreeRowGroupFrame.h index d2fe6d1aa204..03dd3ede7d55 100644 --- a/layout/xul/base/src/nsTreeRowGroupFrame.h +++ b/layout/xul/base/src/nsTreeRowGroupFrame.h @@ -111,7 +111,7 @@ protected: void GetVisibleRowCount(PRInt32& rowCount, nsIContent* aParent); - NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext); + NS_IMETHOD Destroy(nsIPresContext& aPresContext); protected: // Data Members nsIFrame* mTopFrame; // The current topmost frame in the view.