b=32301 r=buster@netscape.com Changed DeleteChildsNextInFlow() to also
check the frame's overflow list git-svn-id: svn://10.0.0.236/trunk@63483 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -807,7 +807,20 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext* aPresContext,
|
||||
|
||||
// Take the next-in-flow out of the parent's child list
|
||||
PRBool result = parent->mFrames.RemoveFrame(nextInFlow);
|
||||
NS_ASSERTION(result, "failed to remove frame");
|
||||
if (!result) {
|
||||
// We didn't find the child in the parent's principal child list.
|
||||
// Maybe it's on the overflow list?
|
||||
nsFrameList overflowFrames(parent->GetOverflowFrames(aPresContext, PR_TRUE));
|
||||
|
||||
if (overflowFrames.IsEmpty() || !overflowFrames.RemoveFrame(nextInFlow)) {
|
||||
NS_ASSERTION(result, "failed to remove frame");
|
||||
}
|
||||
|
||||
// Set the overflow property again
|
||||
if (overflowFrames.NotEmpty()) {
|
||||
parent->SetOverflowFrames(aPresContext, overflowFrames.FirstChild());
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the next-in-flow frame
|
||||
nextInFlow->Destroy(aPresContext);
|
||||
|
||||
@@ -807,7 +807,20 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext* aPresContext,
|
||||
|
||||
// Take the next-in-flow out of the parent's child list
|
||||
PRBool result = parent->mFrames.RemoveFrame(nextInFlow);
|
||||
NS_ASSERTION(result, "failed to remove frame");
|
||||
if (!result) {
|
||||
// We didn't find the child in the parent's principal child list.
|
||||
// Maybe it's on the overflow list?
|
||||
nsFrameList overflowFrames(parent->GetOverflowFrames(aPresContext, PR_TRUE));
|
||||
|
||||
if (overflowFrames.IsEmpty() || !overflowFrames.RemoveFrame(nextInFlow)) {
|
||||
NS_ASSERTION(result, "failed to remove frame");
|
||||
}
|
||||
|
||||
// Set the overflow property again
|
||||
if (overflowFrames.NotEmpty()) {
|
||||
parent->SetOverflowFrames(aPresContext, overflowFrames.FirstChild());
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the next-in-flow frame
|
||||
nextInFlow->Destroy(aPresContext);
|
||||
|
||||
Reference in New Issue
Block a user