зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
119db1dbe3
Коммит
8b24a5ee5f
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче