bug 162691 - don't include siblings which will be next in flows when ordering row groups. sr=kin, r=bernd.

This commit is contained in:
karnaze%netscape.com 2002-08-30 16:30:04 +00:00
parent 0e331f5cf3
commit 9bdca7c014
2 changed files with 18 additions and 16 deletions

View File

@ -3167,8 +3167,15 @@ nsTableFrame::OrderRowGroups(nsVoidArray& aChildren,
else {
nonRowGroups.AppendElement(kidFrame);
}
kidFrame->GetNextSibling(&kidFrame);
// Get the next sibling but skip it if it's also the next-in-flow, since
// a next-in-flow will not be part of the current table.
while (kidFrame) {
nsIFrame* nif;
kidFrame->GetNextInFlow(&nif);
kidFrame->GetNextSibling(&kidFrame);
if (kidFrame != nif)
break;
}
}
aNumRowGroups = aChildren.Count();
// put the thead first
@ -3352,12 +3359,6 @@ nsTableFrame::ReflowChildren(nsIPresContext* aPresContext,
}
break;
}
else if (kidNextInFlow) {
// during printing, the unfortunate situation arises where a next in flow can be a
// next sibling and the next sibling can get destroyed during the reflow. By reordering
// the row groups, the rowGroups array can be kept in sync.
OrderRowGroups(rowGroups, numRowGroups, nsnull);
}
}
}
else if (childX < numRowGroups) { // it is a row group but isn't being reflowed

View File

@ -3167,8 +3167,15 @@ nsTableFrame::OrderRowGroups(nsVoidArray& aChildren,
else {
nonRowGroups.AppendElement(kidFrame);
}
kidFrame->GetNextSibling(&kidFrame);
// Get the next sibling but skip it if it's also the next-in-flow, since
// a next-in-flow will not be part of the current table.
while (kidFrame) {
nsIFrame* nif;
kidFrame->GetNextInFlow(&nif);
kidFrame->GetNextSibling(&kidFrame);
if (kidFrame != nif)
break;
}
}
aNumRowGroups = aChildren.Count();
// put the thead first
@ -3352,12 +3359,6 @@ nsTableFrame::ReflowChildren(nsIPresContext* aPresContext,
}
break;
}
else if (kidNextInFlow) {
// during printing, the unfortunate situation arises where a next in flow can be a
// next sibling and the next sibling can get destroyed during the reflow. By reordering
// the row groups, the rowGroups array can be kept in sync.
OrderRowGroups(rowGroups, numRowGroups, nsnull);
}
}
}
else if (childX < numRowGroups) { // it is a row group but isn't being reflowed