Fix for bug 193257 (AIM Today page renders incorrectly)

Modified AppendFrames() and InsertFrames() to call SetNeedStrategyBalance(PR_TRUE) when the table isn't auto height. This forces any previously reflowed rows, who were adjusted to take up all of the table's height, to recalculate their height during the dirty reflow that gets generated, so all rows get resized properly.

r=bernd_mozilla@gmx.de  sr=dbaron@dbaron.org
This commit is contained in:
kin%netscape.com 2003-06-05 17:44:28 +00:00
parent 396fcc17c2
commit 0cfd50ccf4
2 changed files with 36 additions and 0 deletions

View File

@ -1442,6 +1442,15 @@ nsTableRowGroupFrame::AppendFrames(nsIPresContext* aPresContext,
if (tableFrame->RowIsSpannedInto(rowIndex)) {
tableFrame->SetNeedStrategyInit(PR_TRUE);
}
else if (!tableFrame->IsAutoHeight()) {
// The table isn't auto height, so any previously reflowed rows
// it contains were already adjusted so that they take up all of
// the table's height. We need to trigger a strategy balance to
// ensure that all rows are resized properly during the dirty reflow we
// generated above.
tableFrame->SetNeedStrategyBalance(PR_TRUE);
}
}
}
@ -1494,6 +1503,15 @@ nsTableRowGroupFrame::InsertFrames(nsIPresContext* aPresContext,
tableFrame->RowHasSpanningCells(rowIndex + numRows - 1)) {
tableFrame->SetNeedStrategyInit(PR_TRUE);
}
else if (!tableFrame->IsAutoHeight()) {
// The table isn't auto height, so any previously reflowed rows
// it contains were already adjusted so that they take up all of
// the table's height. We need to trigger a strategy balance to
// ensure that all rows are resized properly during the dirty reflow we
// generated above.
tableFrame->SetNeedStrategyBalance(PR_TRUE);
}
}
return NS_OK;
}

View File

@ -1442,6 +1442,15 @@ nsTableRowGroupFrame::AppendFrames(nsIPresContext* aPresContext,
if (tableFrame->RowIsSpannedInto(rowIndex)) {
tableFrame->SetNeedStrategyInit(PR_TRUE);
}
else if (!tableFrame->IsAutoHeight()) {
// The table isn't auto height, so any previously reflowed rows
// it contains were already adjusted so that they take up all of
// the table's height. We need to trigger a strategy balance to
// ensure that all rows are resized properly during the dirty reflow we
// generated above.
tableFrame->SetNeedStrategyBalance(PR_TRUE);
}
}
}
@ -1494,6 +1503,15 @@ nsTableRowGroupFrame::InsertFrames(nsIPresContext* aPresContext,
tableFrame->RowHasSpanningCells(rowIndex + numRows - 1)) {
tableFrame->SetNeedStrategyInit(PR_TRUE);
}
else if (!tableFrame->IsAutoHeight()) {
// The table isn't auto height, so any previously reflowed rows
// it contains were already adjusted so that they take up all of
// the table's height. We need to trigger a strategy balance to
// ensure that all rows are resized properly during the dirty reflow we
// generated above.
tableFrame->SetNeedStrategyBalance(PR_TRUE);
}
}
return NS_OK;
}