diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp
index f38440824b5..f3272d39752 100644
--- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp
+++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp
@@ -649,7 +649,8 @@ void HTMLContentSink::StartLayout()
nsIPresShell* shell = mDocument->GetShellAt(i);
if (nsnull != shell) {
nsIPresContext* cx = shell->GetPresContext();
- nsRect r = cx->GetVisibleArea();
+ nsRect r;
+ cx->GetVisibleArea(r);
shell->ResizeReflow(r.width, r.height);
NS_RELEASE(cx);
NS_RELEASE(shell);
diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp
index f38440824b5..f3272d39752 100644
--- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp
+++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp
@@ -649,7 +649,8 @@ void HTMLContentSink::StartLayout()
nsIPresShell* shell = mDocument->GetShellAt(i);
if (nsnull != shell) {
nsIPresContext* cx = shell->GetPresContext();
- nsRect r = cx->GetVisibleArea();
+ nsRect r;
+ cx->GetVisibleArea(r);
shell->ResizeReflow(r.width, r.height);
NS_RELEASE(cx);
NS_RELEASE(shell);