From cf9a69d02bae40eb19494493387731da28629b9b Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Wed, 19 May 2010 15:04:33 +1200 Subject: [PATCH] Bug 559241. Reflow non-dirty overflow container children if we're supposed to reflow all kids. r=dbaron --- layout/generic/nsColumnSetFrame.cpp | 2 +- layout/generic/nsContainerFrame.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index 4741933c835c..65ab6efd7bcd 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -1071,7 +1071,7 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext, NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize); - NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus) || + NS_ASSERTION(NS_FRAME_IS_FULLY_COMPLETE(aStatus) || aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE, "Column set should be complete if the available height is unconstrained"); diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 99563e0c42ed..b4b3b2d32cd0 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -899,6 +899,8 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres return NS_OK; // nothing to reflow nsOverflowContinuationTracker tracker(aPresContext, this, PR_FALSE, PR_FALSE); + PRBool shouldReflowAllKids = aReflowState.ShouldReflowAllKids(); + for (nsIFrame* frame = overflowContainers->FirstChild(); frame; frame = frame->GetNextSibling()) { if (frame->GetPrevInFlow()->GetParent() != GetPrevInFlow()) { @@ -906,7 +908,9 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres // it will get reflowed once it's been placed continue; } - if (NS_SUBTREE_DIRTY(frame)) { + // If the available vertical height has changed, we need to reflow + // even if the frame isn't dirty. + if (shouldReflowAllKids || NS_SUBTREE_DIRTY(frame)) { // Get prev-in-flow nsIFrame* prevInFlow = frame->GetPrevInFlow(); NS_ASSERTION(prevInFlow,