Changed Reflow() to make sure the desired-size members of the reflow metrics

struct are set in the case where there is no child frame
This commit is contained in:
troy%netscape.com 1999-01-31 18:46:22 +00:00
parent d05af532a2
commit f987894585
2 changed files with 12 additions and 2 deletions

View File

@ -192,7 +192,12 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
// Reflow our one and only child frame
nsHTMLReflowMetrics kidDesiredSize(nsnull);
if (mFrames.NotEmpty()) {
if (mFrames.IsEmpty()) {
// Return our desired size
aDesiredSize.width = aDesiredSize.height = 0;
aDesiredSize.ascent = aDesiredSize.descent = 0;
} else {
nsIFrame* kidFrame = mFrames.FirstChild();
// We must pass in that the available height is unconstrained, because

View File

@ -192,7 +192,12 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
// Reflow our one and only child frame
nsHTMLReflowMetrics kidDesiredSize(nsnull);
if (mFrames.NotEmpty()) {
if (mFrames.IsEmpty()) {
// Return our desired size
aDesiredSize.width = aDesiredSize.height = 0;
aDesiredSize.ascent = aDesiredSize.descent = 0;
} else {
nsIFrame* kidFrame = mFrames.FirstChild();
// We must pass in that the available height is unconstrained, because