From e21f3ad4c89bdb50d67c485da88ee76e8852452b Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Thu, 29 Jul 1999 23:19:52 +0000 Subject: [PATCH] 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 --- mozilla/layout/html/table/src/nsTableFrame.cpp | 4 ++++ mozilla/layout/html/table/src/nsTableRowFrame.cpp | 3 +-- mozilla/layout/tables/nsTableFrame.cpp | 4 ++++ mozilla/layout/tables/nsTableRowFrame.cpp | 3 +-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 4a35d59bd26..27fa68dabf7 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -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; diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index fccb0a19cee..c26a52495ac 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -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; diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 4a35d59bd26..27fa68dabf7 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -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; diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index fccb0a19cee..c26a52495ac 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -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;