diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index e5129c42277..3c58a304e47 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -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 shell = blankDoc->GetShell(); + if (shell && !shell->DidInitialReflow()) { + nsRect r = shell->GetPresContext()->GetVisibleArea(); + shell->InitialReflow(r.width, r.height); + } + } } } } diff --git a/docshell/test/Makefile.in b/docshell/test/Makefile.in index 887a8a4a887..7cd2ea52fb3 100644 --- a/docshell/test/Makefile.in +++ b/docshell/test/Makefile.in @@ -93,8 +93,10 @@ _TEST_FILES = \ test_bug590573.html \ file_bug590573_1.html \ file_bug590573_2.html \ + test_bug598895.html \ test_bug634834.html \ file_bug634834.html \ + test_bug637644.html \ $(NULL) ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) diff --git a/docshell/test/test_bug598895.html b/docshell/test/test_bug598895.html new file mode 100644 index 00000000000..f99c11d4124 --- /dev/null +++ b/docshell/test/test_bug598895.html @@ -0,0 +1,54 @@ + + + + + Test for Bug 598895 + + + + + + +Mozilla Bug 598895 +

+ +
+
+
+ + diff --git a/docshell/test/test_bug637644.html b/docshell/test/test_bug637644.html new file mode 100644 index 00000000000..0f769c77ba2 --- /dev/null +++ b/docshell/test/test_bug637644.html @@ -0,0 +1,54 @@ + + + + + Test for Bug 637644 + + + + + + +Mozilla Bug 637644 +

+ +
+
+
+ +