bug 10809, incremental reflow of nested tables now reflows children.

git-svn-id: svn://10.0.0.236/trunk@41562 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1999-07-29 23:19:52 +00:00
parent 5725a0cbca
commit e21f3ad4c8
4 changed files with 10 additions and 4 deletions

View File

@@ -2166,6 +2166,10 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
aDesiredSize.maxElementSize->height = 0;
}
aStatus = NS_FRAME_COMPLETE;
if ((NS_UNCONSTRAINEDSIZE == aReflowState.availableWidth) &&
(this == (nsTableFrame *)GetFirstInFlow())) {
InvalidateFirstPassCache();
}
nsresult rv = NS_OK;

View File

@@ -1387,7 +1387,7 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
// size.
// XXX It would be nice if we could skip this step and the next step if the
// column width isn't dependent on the max cell width...
kidReflowState.reason = eReflowReason_Resize;
kidReflowState.reason = eReflowReason_Initial;
kidReflowState.reflowCommand = nsnull;
kidReflowState.availableWidth = NS_UNCONSTRAINEDSIZE;
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
@@ -1403,7 +1403,6 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
desiredSize.height = kidMaxElementSize.height;
((nsTableCellFrame *)aNextFrame)->SetPass1DesiredSize(desiredSize);
((nsTableCellFrame *)aNextFrame)->SetPass1MaxElementSize(kidMaxElementSize);
// Now reflow the cell again this time constraining the width
// XXX Ignore for now the possibility that the column width has changed...
kidReflowState.availableWidth = availWidth;

View File

@@ -2166,6 +2166,10 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
aDesiredSize.maxElementSize->height = 0;
}
aStatus = NS_FRAME_COMPLETE;
if ((NS_UNCONSTRAINEDSIZE == aReflowState.availableWidth) &&
(this == (nsTableFrame *)GetFirstInFlow())) {
InvalidateFirstPassCache();
}
nsresult rv = NS_OK;

View File

@@ -1387,7 +1387,7 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
// size.
// XXX It would be nice if we could skip this step and the next step if the
// column width isn't dependent on the max cell width...
kidReflowState.reason = eReflowReason_Resize;
kidReflowState.reason = eReflowReason_Initial;
kidReflowState.reflowCommand = nsnull;
kidReflowState.availableWidth = NS_UNCONSTRAINEDSIZE;
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
@@ -1403,7 +1403,6 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
desiredSize.height = kidMaxElementSize.height;
((nsTableCellFrame *)aNextFrame)->SetPass1DesiredSize(desiredSize);
((nsTableCellFrame *)aNextFrame)->SetPass1MaxElementSize(kidMaxElementSize);
// Now reflow the cell again this time constraining the width
// XXX Ignore for now the possibility that the column width has changed...
kidReflowState.availableWidth = availWidth;