Bug 637644. Start layout on the new document in CreateAboutBlankContentViewer, since if we don't do it here no one ever will. r=jst, a=blocker

This commit is contained in:
Boris Zbarsky
2011-03-02 14:45:13 -05:00
parent c68bb6d8cb
commit 3c66269b99
4 changed files with 118 additions and 0 deletions

View File

@@ -6539,6 +6539,14 @@ nsDocShell::CreateAboutBlankContentViewer(nsIPrincipal* aPrincipal,
SetCurrentURI(blankDoc->GetDocumentURI(), nsnull, PR_TRUE);
rv = mIsBeingDestroyed ? NS_ERROR_NOT_AVAILABLE : NS_OK;
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIPresShell> shell = blankDoc->GetShell();
if (shell && !shell->DidInitialReflow()) {
nsRect r = shell->GetPresContext()->GetVisibleArea();
shell->InitialReflow(r.width, r.height);
}
}
}
}
}