incremental reflow only does pass1 reflow on new frames when necessary

fixed some rotting bits in table frame classes having to do with breaking tables
This commit is contained in:
buster@netscape.com
1998-10-20 20:05:44 +00:00
parent ecd2d8b2f4
commit 63dfd5801b
8 changed files with 294 additions and 294 deletions

View File

@@ -948,17 +948,20 @@ NS_METHOD nsTableRowFrame::IR_CellInserted(nsIPresContext& aPresContext,
if (NS_FAILED(rv))
return rv;
// do a pass-1 layout of the cell
//XXX: check the table frame to see if we can skip this
rv = InitialReflow(aPresContext, aDesiredSize, aReflowState, aStatus,
aInsertedFrame, PR_FALSE);
if (NS_FAILED(rv))
return rv;
nsTableFrame *tableFrame=nsnull;
rv = nsTableFrame::GetTableFrame(this, tableFrame);
if (NS_FAILED(rv) || nsnull==tableFrame)
return rv;
// do a pass-1 layout of the cell
if (PR_TRUE==tableFrame->RequiresPass1Layout())
{
rv = InitialReflow(aPresContext, aDesiredSize, aReflowState, aStatus,
aInsertedFrame, PR_FALSE);
if (NS_FAILED(rv))
return rv;
}
tableFrame->InvalidateCellMap();
tableFrame->InvalidateColumnCache();
@@ -984,17 +987,20 @@ NS_METHOD nsTableRowFrame::IR_CellAppended(nsIPresContext& aPresContext,
if (NS_FAILED(rv))
return rv;
// do a pass-1 layout of the cell
//XXX: check the table frame to see if we can skip this
rv = InitialReflow(aPresContext, aDesiredSize, aReflowState, aStatus,
aAppendedFrame, PR_FALSE);
if (NS_FAILED(rv))
return rv;
nsTableFrame *tableFrame=nsnull;
rv = nsTableFrame::GetTableFrame(this, tableFrame);
if (NS_FAILED(rv) || nsnull==tableFrame)
return rv;
// do a pass-1 layout of the cell
if (PR_TRUE==tableFrame->RequiresPass1Layout())
{
rv = InitialReflow(aPresContext, aDesiredSize, aReflowState, aStatus,
aAppendedFrame, PR_FALSE);
if (NS_FAILED(rv))
return rv;
}
tableFrame->InvalidateCellMap();
tableFrame->InvalidateColumnCache();