When root content frame doesn't have any children make sure the aDesiredSize out parameter is properly setup

This commit is contained in:
kipp 1998-06-03 17:44:23 +00:00
parent 1dea854825
commit a5e8fccf79

View File

@ -401,6 +401,16 @@ NS_METHOD RootContentFrame::Reflow(nsIPresContext* aPresContext,
mFirstChild->DidReflow(*aPresContext, NS_FRAME_REFLOW_FINISHED); mFirstChild->DidReflow(*aPresContext, NS_FRAME_REFLOW_FINISHED);
} }
} }
else {
aDesiredSize.width = aReflowState.maxSize.width;
aDesiredSize.height = aReflowState.maxSize.height;
aDesiredSize.ascent = aDesiredSize.height;
aDesiredSize.descent = 0;
if (nsnull != aDesiredSize.maxElementSize) {
aDesiredSize.maxElementSize->width = 0;
aDesiredSize.maxElementSize->height = 0;
}
}
} }
#ifdef NS_DEBUG #ifdef NS_DEBUG