Bug 395316 - Clear OutOfFlowFrame after unregistering placeholder, and make recursive call to RemoveFrame. r/sr/a=roc

This commit is contained in:
dholbert@cs.stanford.edu 2007-10-02 20:44:18 -07:00
Родитель 304e52388a
Коммит b2cf6296b5
2 изменённых файлов: 9 добавлений и 1 удалений

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

@ -9385,6 +9385,7 @@ static void UnregisterPlaceholderChain(nsFrameManager* frameManager,
nsPlaceholderFrame* curFrame = placeholderFrame;
do {
frameManager->UnregisterPlaceholderFrame(curFrame);
curFrame->SetOutOfFlowFrame(nsnull);
curFrame = static_cast<nsPlaceholderFrame*>(curFrame->GetNextContinuation());
} while (curFrame);
}

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

@ -224,7 +224,14 @@ nsContainerFrame::RemoveFrame(nsIAtom* aListName,
// check the overflow lists atm, but we'll need a prescontext lookup
// for overflow containers once we can split abspos elements with
// inline containing blocks.
parent->mFrames.DestroyFrame(aOldFrame);
if (parent == this) {
parent->mFrames.DestroyFrame(aOldFrame);
} else {
// This recursive call takes care of all continuations after aOldFrame,
// so we don't need to loop anymore.
parent->RemoveFrame(nsnull, aOldFrame);
break;
}
aOldFrame = oldFrameNextContinuation;
if (aOldFrame) {
parent = static_cast<nsContainerFrame*>(aOldFrame->GetParent());