Fixed some bustage I introduced with the factoring

This commit is contained in:
troy@netscape.com
1998-09-29 02:18:09 +00:00
parent 297d38c5fa
commit 1f46553277
8 changed files with 34 additions and 32 deletions

View File

@@ -226,8 +226,13 @@ nsHTMLContainerFrame::MoveFrameOutOfFlow(nsIPresContext& aPresContext,
{
aPlaceholderFrame = nsnull;
nsIFrame* nextSibling;
// See if the element wants to be floated or absolutely positioned
if (NS_STYLE_FLOAT_NONE != aDisplay->mFloats) {
aFrame->GetNextSibling(nextSibling);
aFrame->SetNextSibling(nsnull);
// Create a placeholder frame that will serve as the anchor point.
nsPlaceholderFrame* placeholder =
CreatePlaceholderFrame(aPresContext, aFrame);
@@ -242,6 +247,9 @@ nsHTMLContainerFrame::MoveFrameOutOfFlow(nsIPresContext& aPresContext,
aPlaceholderFrame = placeholder;
} else if (NS_STYLE_POSITION_ABSOLUTE == aPosition->mPosition) {
aFrame->GetNextSibling(nextSibling);
aFrame->SetNextSibling(nsnull);
// Create a placeholder frame that will serve as the anchor point.
nsAbsoluteFrame* placeholder =
CreateAbsolutePlaceholderFrame(aPresContext, aFrame);
@@ -256,7 +264,12 @@ nsHTMLContainerFrame::MoveFrameOutOfFlow(nsIPresContext& aPresContext,
aPlaceholderFrame = placeholder;
}
return aPlaceholderFrame != nsnull;
if (nsnull == aPlaceholderFrame) {
return PR_FALSE;
} else {
aPlaceholderFrame->SetNextSibling(nextSibling);
return PR_TRUE;
}
}
/**