Fixed some bustage I introduced with the factoring

This commit is contained in:
troy%netscape.com 1998-09-29 02:18:09 +00:00
Родитель e095bc1ebd
Коммит f16e96f86c
8 изменённых файлов: 34 добавлений и 32 удалений

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

@ -2013,14 +2013,10 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext,
// its place a placeholder frame
nsIFrame* placeholder;
if (MoveFrameOutOfFlow(aPresContext, frame, kidDisplay, kidPosition, placeholder)) {
// Remove 'frame' from the flow, and replace it with 'placeholder'
// Adjust previous frame's next sibling pointer
if (nsnull != prevFrame) {
prevFrame->SetNextSibling(placeholder);
}
nsIFrame* nextSibling;
frame->GetNextSibling(nextSibling);
placeholder->SetNextSibling(nextSibling);
frame->SetNextSibling(nsnull);
// The placeholder frame is always inline
frame = placeholder;

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

@ -2013,14 +2013,10 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext,
// its place a placeholder frame
nsIFrame* placeholder;
if (MoveFrameOutOfFlow(aPresContext, frame, kidDisplay, kidPosition, placeholder)) {
// Remove 'frame' from the flow, and replace it with 'placeholder'
// Adjust previous frame's next sibling pointer
if (nsnull != prevFrame) {
prevFrame->SetNextSibling(placeholder);
}
nsIFrame* nextSibling;
frame->GetNextSibling(nextSibling);
placeholder->SetNextSibling(nextSibling);
frame->SetNextSibling(nsnull);
// The placeholder frame is always inline
frame = placeholder;

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

@ -2013,14 +2013,10 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext,
// its place a placeholder frame
nsIFrame* placeholder;
if (MoveFrameOutOfFlow(aPresContext, frame, kidDisplay, kidPosition, placeholder)) {
// Remove 'frame' from the flow, and replace it with 'placeholder'
// Adjust previous frame's next sibling pointer
if (nsnull != prevFrame) {
prevFrame->SetNextSibling(placeholder);
}
nsIFrame* nextSibling;
frame->GetNextSibling(nextSibling);
placeholder->SetNextSibling(nextSibling);
frame->SetNextSibling(nsnull);
// The placeholder frame is always inline
frame = placeholder;

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

@ -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;
}
}
/**

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

@ -2013,14 +2013,10 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext,
// its place a placeholder frame
nsIFrame* placeholder;
if (MoveFrameOutOfFlow(aPresContext, frame, kidDisplay, kidPosition, placeholder)) {
// Remove 'frame' from the flow, and replace it with 'placeholder'
// Adjust previous frame's next sibling pointer
if (nsnull != prevFrame) {
prevFrame->SetNextSibling(placeholder);
}
nsIFrame* nextSibling;
frame->GetNextSibling(nextSibling);
placeholder->SetNextSibling(nextSibling);
frame->SetNextSibling(nsnull);
// The placeholder frame is always inline
frame = placeholder;

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

@ -2013,14 +2013,10 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext,
// its place a placeholder frame
nsIFrame* placeholder;
if (MoveFrameOutOfFlow(aPresContext, frame, kidDisplay, kidPosition, placeholder)) {
// Remove 'frame' from the flow, and replace it with 'placeholder'
// Adjust previous frame's next sibling pointer
if (nsnull != prevFrame) {
prevFrame->SetNextSibling(placeholder);
}
nsIFrame* nextSibling;
frame->GetNextSibling(nextSibling);
placeholder->SetNextSibling(nextSibling);
frame->SetNextSibling(nsnull);
// The placeholder frame is always inline
frame = placeholder;

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

@ -2013,14 +2013,10 @@ nsBlockFrame::AppendNewFrames(nsIPresContext& aPresContext,
// its place a placeholder frame
nsIFrame* placeholder;
if (MoveFrameOutOfFlow(aPresContext, frame, kidDisplay, kidPosition, placeholder)) {
// Remove 'frame' from the flow, and replace it with 'placeholder'
// Adjust previous frame's next sibling pointer
if (nsnull != prevFrame) {
prevFrame->SetNextSibling(placeholder);
}
nsIFrame* nextSibling;
frame->GetNextSibling(nextSibling);
placeholder->SetNextSibling(nextSibling);
frame->SetNextSibling(nsnull);
// The placeholder frame is always inline
frame = placeholder;

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

@ -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;
}
}
/**