Bug 699351. Part 2: fix assertion. r=tn

This commit is contained in:
Robert O'Callahan 2011-12-06 01:39:14 +13:00
Родитель f68ef67da3
Коммит cff2e2851c
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -211,8 +211,6 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
nsresult rv = NS_OK; nsresult rv = NS_OK;
aDesiredSize.SetOverflowAreasToDesiredBounds();
if (mFrames.NotEmpty()) { if (mFrames.NotEmpty()) {
// Deal with a non-incremental reflow or an incremental reflow // Deal with a non-incremental reflow or an incremental reflow
// targeted at our one-and-only principal child frame. // targeted at our one-and-only principal child frame.
@ -237,7 +235,6 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
} else { } else {
kidHeight = mFrames.FirstChild()->GetSize().height; kidHeight = mFrames.FirstChild()->GetSize().height;
} }
ConsiderChildOverflow(aDesiredSize.mOverflowAreas, mFrames.FirstChild());
} }
NS_ASSERTION(aReflowState.availableWidth != NS_UNCONSTRAINEDSIZE, NS_ASSERTION(aReflowState.availableWidth != NS_UNCONSTRAINEDSIZE,
@ -250,6 +247,11 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
aDesiredSize.height = aReflowState.ComputedHeight() != NS_UNCONSTRAINEDSIZE aDesiredSize.height = aReflowState.ComputedHeight() != NS_UNCONSTRAINEDSIZE
? aReflowState.ComputedHeight() ? aReflowState.ComputedHeight()
: kidHeight; : 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 // Make a copy of the reflow state and change the computed width and height
// to reflect the available space for the fixed items // to reflect the available space for the fixed items