mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Bug 574778 - Disable intrinsic sizing for chrome documents when enabling fullscreen mode. r=smaug.
This commit is contained in:
parent
f741260b17
commit
20178f3b8a
@ -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<nsIBaseWindow> treeOwnerAsWin;
|
||||
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
|
||||
nsCOMPtr<nsIXULWindow> xulWin(do_GetInterface(treeOwnerAsWin));
|
||||
if (aFullScreen && xulWin) {
|
||||
xulWin->SetIntrinsicallySized(PR_FALSE);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = GetMainWidget();
|
||||
if (widget)
|
||||
widget->MakeFullScreen(aFullScreen);
|
||||
|
Loading…
x
Reference in New Issue
Block a user