mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 740192 - Screen orientation needs a specific security model for installed web apps. r=jlebar
This commit is contained in:
parent
18041509b8
commit
38e33bedc8
@ -45,6 +45,7 @@
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
@ -381,11 +382,15 @@ nsScreen::MozLockOrientation(const nsAString& aOrientation, bool* aReturn)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool fullscreen;
|
||||
doc->GetMozFullScreen(&fullscreen);
|
||||
if (!fullscreen) {
|
||||
*aReturn = false;
|
||||
return NS_OK;
|
||||
// Apps and frames contained in apps can lock orientation.
|
||||
// But non-apps can lock orientation only if they're fullscreen.
|
||||
if (!static_cast<nsGlobalWindow*>(GetOwner())->IsPartOfApp()) {
|
||||
bool fullscreen;
|
||||
doc->GetMozFullScreen(&fullscreen);
|
||||
if (!fullscreen) {
|
||||
*aReturn = false;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(GetOwner());
|
||||
|
Loading…
Reference in New Issue
Block a user