Bug 484031. Be a bit more careful with ContentAppended. r+sr=roc

This commit is contained in:
Boris Zbarsky 2009-03-30 11:23:14 -04:00
parent 4dd5b6bb44
commit 8638f9dcb1

View File

@ -6100,6 +6100,13 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
// ContentInserted will ignore the passed-in index.
PRUint32 containerCount = aContainer->GetChildCount();
for (PRUint32 i = aNewIndexInContainer; i < containerCount; i++) {
nsIContent* content = aContainer->GetChildAt(i);
if (mPresShell->GetPrimaryFrameFor(content)) {
// Already have a frame for this content; a previous ContentInserted
// in this loop must have reconstructed its insertion parent. Skip
// it.
continue;
}
LAYOUT_PHASE_TEMP_EXIT();
// Call ContentInserted with this index.
ContentInserted(aContainer, aContainer->GetChildAt(i), i,