adjust the starting column index always if a entire colgroup needs adjusted colindices bug 339315 r/sr=bzbarsky

This commit is contained in:
bmlk%gmx.de 2006-06-24 05:42:38 +00:00
parent 7b1e11248b
commit 12ffb8ee63

View File

@ -72,10 +72,12 @@ void nsTableColGroupFrame::ResetColIndices(nsIFrame* aFirstColGroup,
PRInt32 colIndex = aFirstColIndex;
while (colGroupFrame) {
if (nsLayoutAtoms::tableColGroupFrame == colGroupFrame->GetType()) {
// reset the starting col index for the first cg only if
// reset the starting col index for the first cg only if we should reset
// the whole colgroup (aStartColFrame defaults to nsnull) or if
// aFirstColIndex is smaller than the existing starting col index
if ((colIndex != aFirstColIndex) ||
(colIndex < colGroupFrame->GetStartColumnIndex())) {
(colIndex < colGroupFrame->GetStartColumnIndex()) ||
!aStartColFrame) {
colGroupFrame->SetStartColumnIndex(colIndex);
}
nsIFrame* colFrame = aStartColFrame;