From 890df88cf570c7aa8a7bc69a10e5475a4bf93534 Mon Sep 17 00:00:00 2001 From: "bmlk%gmx.de" Date: Sat, 5 Jun 2004 16:59:46 +0000 Subject: [PATCH] during incr. reflow table cells have a unconstrained computed size, they need to ensure that a second constrained reflow is issued on the children, bug 237366, initial idea by saito@densan.co.jp r/sr=dbaron --- layout/html/table/src/nsTableRowFrame.cpp | 2 ++ layout/tables/nsTableRowFrame.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/layout/html/table/src/nsTableRowFrame.cpp b/layout/html/table/src/nsTableRowFrame.cpp index 5ebc447e2d03..b32da342f98a 100644 --- a/layout/html/table/src/nsTableRowFrame.cpp +++ b/layout/html/table/src/nsTableRowFrame.cpp @@ -1203,6 +1203,8 @@ nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext, // which will bias the balancing. Leave the avail width alone, since it is a best guess. // After the table balances, the cell will get reflowed with the correct computed width. PRBool resetComputedWidth = aTableFrame.NeedStrategyInit() || aTableFrame.NeedStrategyBalance(); + if (resetComputedWidth) + cellFrame->SetNeedPass2Reflow(PR_TRUE); InitChildReflowState(*aPresContext, cellAvailSize, aTableFrame.IsBorderCollapse(), p2t, kidRS, resetComputedWidth); diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 5ebc447e2d03..b32da342f98a 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -1203,6 +1203,8 @@ nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext, // which will bias the balancing. Leave the avail width alone, since it is a best guess. // After the table balances, the cell will get reflowed with the correct computed width. PRBool resetComputedWidth = aTableFrame.NeedStrategyInit() || aTableFrame.NeedStrategyBalance(); + if (resetComputedWidth) + cellFrame->SetNeedPass2Reflow(PR_TRUE); InitChildReflowState(*aPresContext, cellAvailSize, aTableFrame.IsBorderCollapse(), p2t, kidRS, resetComputedWidth);