mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
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:
parent
d05af532a2
commit
f987894585
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user