Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert

MozReview-Commit-ID: 1rRcC76jWxN
This commit is contained in:
Mats Palmgren 2017-04-18 22:35:05 +02:00
Родитель 5a8f74cd29
Коммит 9dc89e761d
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -866,8 +866,8 @@ nsContainerFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
void void
nsContainerFrame::ReflowChild(nsIFrame* aKidFrame, nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
nsPresContext* aPresContext, nsPresContext* aPresContext,
ReflowOutput& aDesiredSize, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput, const ReflowInput& aReflowInput,
const WritingMode& aWM, const WritingMode& aWM,
const LogicalPoint& aPos, const LogicalPoint& aPos,
const nsSize& aContainerSize, const nsSize& aContainerSize,
@ -880,6 +880,9 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
NS_ASSERTION(aContainerSize.width != NS_UNCONSTRAINEDSIZE, NS_ASSERTION(aContainerSize.width != NS_UNCONSTRAINEDSIZE,
"ReflowChild with unconstrained container width!"); "ReflowChild with unconstrained container width!");
} }
MOZ_ASSERT(aDesiredSize.VisualOverflow() == nsRect(0,0,0,0) &&
aDesiredSize.ScrollableOverflow() == nsRect(0,0,0,0),
"please reset the overflow areas before calling ReflowChild");
// Position the child frame and its view if requested. // Position the child frame and its view if requested.
if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) { if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {