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;