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
Родитель bfb43eb8a8
Коммит d43d3b5132
2 изменённых файлов: 18 добавлений и 16 удалений

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

@ -3167,8 +3167,15 @@ nsTableFrame::OrderRowGroups(nsVoidArray& aChildren,
else { else {
nonRowGroups.AppendElement(kidFrame); nonRowGroups.AppendElement(kidFrame);
} }
// Get the next sibling but skip it if it's also the next-in-flow, since
kidFrame->GetNextSibling(&kidFrame); // 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(); aNumRowGroups = aChildren.Count();
// put the thead first // put the thead first
@ -3352,12 +3359,6 @@ nsTableFrame::ReflowChildren(nsIPresContext* aPresContext,
} }
break; 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 else if (childX < numRowGroups) { // it is a row group but isn't being reflowed

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

@ -3167,8 +3167,15 @@ nsTableFrame::OrderRowGroups(nsVoidArray& aChildren,
else { else {
nonRowGroups.AppendElement(kidFrame); nonRowGroups.AppendElement(kidFrame);
} }
// Get the next sibling but skip it if it's also the next-in-flow, since
kidFrame->GetNextSibling(&kidFrame); // 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(); aNumRowGroups = aChildren.Count();
// put the thead first // put the thead first
@ -3352,12 +3359,6 @@ nsTableFrame::ReflowChildren(nsIPresContext* aPresContext,
} }
break; 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 else if (childX < numRowGroups) { // it is a row group but isn't being reflowed