Bug 607494. Don't create frame construction items for content that has a primary frame. r=bzbarsky a=blocking-final+

This commit is contained in:
Timothy Nikkel 2010-11-24 19:35:02 -06:00
Родитель cfa70ca28c
Коммит d1b5d4d857
1 изменённых файлов: 7 добавлений и 4 удалений

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

@ -5043,10 +5043,13 @@ nsCSSFrameConstructor::AddFrameConstructionItems(nsFrameConstructorState& aState
// XXX the GetContent() != aContent check is needed due to bug 135040.
// Remove it once that's fixed.
NS_ASSERTION(!aContent->GetPrimaryFrame() ||
aContent->GetPrimaryFrame()->GetContent() != aContent ||
aState.mCreatingExtraFrames,
"asked to create frame construction item for a node that already has a frame");
if (aContent->GetPrimaryFrame() &&
aContent->GetPrimaryFrame()->GetContent() == aContent &&
!aState.mCreatingExtraFrames) {
NS_ERROR("asked to create frame construction item for a node that already "
"has a frame");
return;
}
// don't create a whitespace frame if aParent doesn't want it
if (!NeedFrameFor(aState, aParentFrame, aContent)) {