Don't return mInitialContainingBlock if we find no absolute containing block.

That can Just Happen.  Bug 330909, patch by bernd, r+sr=roc
This commit is contained in:
bzbarsky%mit.edu 2006-09-24 21:20:32 +00:00
Родитель e51f288321
Коммит 478008d9f6
1 изменённых файлов: 6 добавлений и 5 удалений

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

@ -8323,11 +8323,12 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame)
}
// If we found an absolutely positioned containing block, then use the first-in-flow.
// If we didn't find it, then use the initial containing block.
return (containingBlock) ?
AdjustAbsoluteContainingBlock(mPresShell->GetPresContext(),
containingBlock) :
mInitialContainingBlock;
if (containingBlock)
return AdjustAbsoluteContainingBlock(mPresShell->GetPresContext(),
containingBlock);
// If we didn't find it, then there isn't one.
return nsnull;
}
nsIFrame*