From cff2e2851cb8a1ee112bb8cf4da901b67a606334 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 6 Dec 2011 01:39:14 +1300 Subject: [PATCH] Bug 699351. Part 2: fix assertion. r=tn --- layout/generic/nsViewportFrame.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index 10a999d75bb5..d9b1c1781311 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -211,8 +211,6 @@ ViewportFrame::Reflow(nsPresContext* aPresContext, nsresult rv = NS_OK; - aDesiredSize.SetOverflowAreasToDesiredBounds(); - if (mFrames.NotEmpty()) { // Deal with a non-incremental reflow or an incremental reflow // targeted at our one-and-only principal child frame. @@ -237,7 +235,6 @@ ViewportFrame::Reflow(nsPresContext* aPresContext, } else { kidHeight = mFrames.FirstChild()->GetSize().height; } - ConsiderChildOverflow(aDesiredSize.mOverflowAreas, mFrames.FirstChild()); } NS_ASSERTION(aReflowState.availableWidth != NS_UNCONSTRAINEDSIZE, @@ -250,6 +247,11 @@ ViewportFrame::Reflow(nsPresContext* aPresContext, aDesiredSize.height = aReflowState.ComputedHeight() != NS_UNCONSTRAINEDSIZE ? aReflowState.ComputedHeight() : kidHeight; + aDesiredSize.SetOverflowAreasToDesiredBounds(); + + if (mFrames.NotEmpty()) { + ConsiderChildOverflow(aDesiredSize.mOverflowAreas, mFrames.FirstChild()); + } // Make a copy of the reflow state and change the computed width and height // to reflect the available space for the fixed items