зеркало из https://github.com/mozilla/pjs.git
Bug 395316 - Clear OutOfFlowFrame after unregistering placeholder, and make recursive call to RemoveFrame. r/sr/a=roc
This commit is contained in:
Родитель
304e52388a
Коммит
b2cf6296b5
|
@ -9385,6 +9385,7 @@ static void UnregisterPlaceholderChain(nsFrameManager* frameManager,
|
||||||
nsPlaceholderFrame* curFrame = placeholderFrame;
|
nsPlaceholderFrame* curFrame = placeholderFrame;
|
||||||
do {
|
do {
|
||||||
frameManager->UnregisterPlaceholderFrame(curFrame);
|
frameManager->UnregisterPlaceholderFrame(curFrame);
|
||||||
|
curFrame->SetOutOfFlowFrame(nsnull);
|
||||||
curFrame = static_cast<nsPlaceholderFrame*>(curFrame->GetNextContinuation());
|
curFrame = static_cast<nsPlaceholderFrame*>(curFrame->GetNextContinuation());
|
||||||
} while (curFrame);
|
} while (curFrame);
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,14 @@ nsContainerFrame::RemoveFrame(nsIAtom* aListName,
|
||||||
// check the overflow lists atm, but we'll need a prescontext lookup
|
// check the overflow lists atm, but we'll need a prescontext lookup
|
||||||
// for overflow containers once we can split abspos elements with
|
// for overflow containers once we can split abspos elements with
|
||||||
// inline containing blocks.
|
// 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;
|
aOldFrame = oldFrameNextContinuation;
|
||||||
if (aOldFrame) {
|
if (aOldFrame) {
|
||||||
parent = static_cast<nsContainerFrame*>(aOldFrame->GetParent());
|
parent = static_cast<nsContainerFrame*>(aOldFrame->GetParent());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче