From a12211ee7d4366f8bd233c3c2cf4ba7bc0f24b09 Mon Sep 17 00:00:00 2001 From: "bmlk%gmx.de" Date: Tue, 21 Jun 2005 04:50:42 +0000 Subject: [PATCH] fix reflow reason for special height reflow, reevaluate height reflow conditions as tables with fixed layout might have one reflow less bug 293761 r/sr=roc a=asa --- layout/tables/nsTableFrame.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index bf4e05de9ba..6efccc8e5f5 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1973,9 +1973,13 @@ NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext, ReflowTable(aDesiredSize, aReflowState, availHeight, nextReason, lastChildReflowed, balanced, aStatus); + nextReason = eReflowReason_Resize; reflowedChildren = PR_TRUE; } - if (willInitiateSpecialReflow && NS_FRAME_IS_COMPLETE(aStatus)) { + // reevaluate special height reflow conditions + if ((NeedToInitiateSpecialReflow() || InitiatedSpecialReflow()) && + (aReflowState.mFlags.mSpecialHeightReflow || !NeedSpecialReflow()) && + NS_FRAME_IS_COMPLETE(aStatus)) { // distribute extra vertical space to rows CalcDesiredHeight(aReflowState, aDesiredSize); ((nsHTMLReflowState::ReflowStateFlags&)aReflowState.mFlags).mSpecialHeightReflow = PR_TRUE;