From 6d7278f503f059336bdcdd98ac25fd4358645465 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Mon, 19 Jul 2010 16:47:41 -0500 Subject: [PATCH] Bug 574778 - Disable intrinsic sizing for chrome documents when enabling fullscreen mode. r=smaug. --- dom/base/nsGlobalWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index e558f3312e..b7369e14f5 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -175,6 +175,7 @@ #include "nsNetUtil.h" #include "nsFocusManager.h" #include "nsIJSON.h" +#include "nsIXULWindow.h" #ifdef MOZ_XUL #include "nsXULPopupManager.h" #include "nsIDOMXULControlElement.h" @@ -3943,6 +3944,15 @@ nsGlobalWindow::SetFullScreen(PRBool aFullScreen) return NS_OK; } + // Prevent chrome documents which are still loading from resizing + // the window after we set fullscreen mode. + nsCOMPtr treeOwnerAsWin; + GetTreeOwner(getter_AddRefs(treeOwnerAsWin)); + nsCOMPtr xulWin(do_GetInterface(treeOwnerAsWin)); + if (aFullScreen && xulWin) { + xulWin->SetIntrinsicallySized(PR_FALSE); + } + nsCOMPtr widget = GetMainWidget(); if (widget) widget->MakeFullScreen(aFullScreen); -- 2.11.4.GIT