Bug 838706 - Remove Destroy/RemoveFrameIfPresent O(n) methods. All consumers are now using Start/ContinueRemoveFrame instead which are O(1). r=bzbarsky

This commit is contained in:
Mats Palmgren 2013-02-28 00:05:45 +01:00
parent f1e1cf742b
commit d7aee33465
2 changed files with 0 additions and 41 deletions

View File

@ -101,20 +101,6 @@ nsFrameList::RemoveFrame(nsIFrame* aFrame)
}
}
bool
nsFrameList::RemoveFrameIfPresent(nsIFrame* aFrame)
{
NS_PRECONDITION(aFrame, "null ptr");
for (Enumerator e(*this); !e.AtEnd(); e.Next()) {
if (e.get() == aFrame) {
RemoveFrame(aFrame);
return true;
}
}
return false;
}
nsFrameList
nsFrameList::RemoveFramesAfter(nsIFrame* aAfterFrame)
{
@ -156,18 +142,6 @@ nsFrameList::DestroyFrame(nsIFrame* aFrame)
aFrame->Destroy();
}
bool
nsFrameList::DestroyFrameIfPresent(nsIFrame* aFrame)
{
NS_PRECONDITION(aFrame, "null ptr");
if (RemoveFrameIfPresent(aFrame)) {
aFrame->Destroy();
return true;
}
return false;
}
nsFrameList::Slice
nsFrameList::InsertFrames(nsIFrame* aParent, nsIFrame* aPrevSibling,
nsFrameList& aFrameList)

View File

@ -137,14 +137,6 @@ public:
*/
void RemoveFrame(nsIFrame* aFrame);
/**
* Take aFrame out of the frame list, if present. This also disconnects
* aFrame from the sibling list. aFrame must be non-null but is not
* required to be on the list.
* @return true if aFrame was removed
*/
bool RemoveFrameIfPresent(nsIFrame* aFrame);
/**
* Take the frames after aAfterFrame out of the frame list. If
* aAfterFrame is null, removes the entire list.
@ -195,13 +187,6 @@ public:
*/
void DestroyFrame(nsIFrame* aFrame);
/**
* If aFrame is present on this list then take it out of the list and
* then destroy it. The frame must be non-null.
* @return true if the frame was found
*/
bool DestroyFrameIfPresent(nsIFrame* aFrame);
/**
* Insert aFrame right after aPrevSibling, or prepend it to this
* list if aPrevSibling is null. If aParent is not null, also