From 478008d9f6c054861e6e4fe8c5731eb2c35e3ed7 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 24 Sep 2006 21:20:32 +0000 Subject: [PATCH] Don't return mInitialContainingBlock if we find no absolute containing block. That can Just Happen. Bug 330909, patch by bernd, r+sr=roc --- layout/base/nsCSSFrameConstructor.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index c2eee52128e4..efbe98a8f375 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -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*