Renamed DeleteFrame() to Destroy()

This commit is contained in:
troy%netscape.com 1999-07-22 02:24:52 +00:00
parent 8fced9fa19
commit c551fe3166
72 changed files with 177 additions and 177 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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.

View File

@ -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;

View File

@ -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);
}

View File

@ -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,

View File

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

View File

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

View File

@ -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;

View File

@ -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

View File

@ -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,

View File

@ -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();

View File

@ -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,

View File

@ -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();

View File

@ -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();

View File

@ -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

View File

@ -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,

View File

@ -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);

View File

@ -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,

View File

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

View File

@ -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,

View File

@ -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;

View File

@ -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.

View File

@ -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

View File

@ -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,

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
}

View File

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

View File

@ -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

View File

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

View File

@ -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;

View File

@ -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

View File

@ -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,

View File

@ -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();

View File

@ -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,

View File

@ -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();

View File

@ -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();

View File

@ -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

View File

@ -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,

View File

@ -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);

View File

@ -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,

View File

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

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
}

View File

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

View File

@ -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;

View File

@ -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

View File

@ -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);
}

View File

@ -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,

View File

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

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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.

View File

@ -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,

View File

@ -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);
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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);

View File

@ -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

View File

@ -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,

View File

@ -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;
}

View File

@ -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.