зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1283526 part 2 - Remove fullscreen sandbox flag. r=smaug
MozReview-Commit-ID: 5qH4gZxvNQz --HG-- extra : rebase_source : fdc1fea2996b259a65c3068cd10fffccf6c5ebdb
This commit is contained in:
Родитель
dc193d9f49
Коммит
a90f7b0ea8
|
@ -2513,10 +2513,6 @@ nsDocShell::GetFullscreenAllowed(bool* aFullscreenAllowed)
|
|||
// Assume false until we determine otherwise...
|
||||
*aFullscreenAllowed = false;
|
||||
|
||||
// If it is sandboxed, fullscreen is not allowed.
|
||||
if (mSandboxFlags & SANDBOXED_FULLSCREEN) {
|
||||
return NS_OK;
|
||||
}
|
||||
nsCOMPtr<nsPIDOMWindowOuter> win = GetWindow();
|
||||
if (!win) {
|
||||
return NS_OK;
|
||||
|
|
|
@ -84,34 +84,29 @@ const unsigned long SANDBOXED_AUTOMATIC_FEATURES = 0x100;
|
|||
// We don't have an explicit representation of this one, apparently?
|
||||
// const unsigned long SANDBOXED_STORAGE_AREA_URLS = 0x200;
|
||||
|
||||
/**
|
||||
* This flag prevents content from using the requestFullscreen() method.
|
||||
*/
|
||||
const unsigned long SANDBOXED_FULLSCREEN = 0x400;
|
||||
|
||||
/**
|
||||
* This flag blocks the document from changing document.domain.
|
||||
*/
|
||||
const unsigned long SANDBOXED_DOMAIN = 0x800;
|
||||
const unsigned long SANDBOXED_DOMAIN = 0x400;
|
||||
|
||||
/**
|
||||
* This flag prevents content from using window.alert(), window.confirm(),
|
||||
* window.print(), window.prompt() and the beforeunload event from putting up
|
||||
* dialogs.
|
||||
*/
|
||||
const unsigned long SANDBOXED_MODALS = 0x1000;
|
||||
const unsigned long SANDBOXED_MODALS = 0x800;
|
||||
|
||||
/**
|
||||
* This flag prevents content from escaping the sandbox by ensuring that any
|
||||
* auxiliary browsing context it creates inherits the content's active
|
||||
* sandboxing flag set.
|
||||
*/
|
||||
const unsigned long SANDBOX_PROPAGATES_TO_AUXILIARY_BROWSING_CONTEXTS = 0x2000;
|
||||
const unsigned long SANDBOX_PROPAGATES_TO_AUXILIARY_BROWSING_CONTEXTS = 0x1000;
|
||||
|
||||
/**
|
||||
* This flag prevents locking screen orientation.
|
||||
*/
|
||||
const unsigned long SANDBOXED_ORIENTATION_LOCK = 0x4000;
|
||||
const unsigned long SANDBOXED_ORIENTATION_LOCK = 0x2000;
|
||||
|
||||
const unsigned long SANDBOX_ALL_FLAGS = 0x7FFF;
|
||||
const unsigned long SANDBOX_ALL_FLAGS = 0x3FFF;
|
||||
#endif
|
||||
|
|
|
@ -204,11 +204,7 @@ HTMLIFrameElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
|||
const nsAttrValue* aValue,
|
||||
bool aNotify)
|
||||
{
|
||||
if ((aName == nsGkAtoms::sandbox ||
|
||||
// The allowfullscreen attribute affects the sandboxed fullscreen
|
||||
// flag, thus we should also reapply it if that is changed.
|
||||
aName == nsGkAtoms::allowfullscreen ||
|
||||
aName == nsGkAtoms::mozallowfullscreen) &&
|
||||
if (aName == nsGkAtoms::sandbox &&
|
||||
aNameSpaceID == kNameSpaceID_None && mFrameLoader) {
|
||||
// If we have an nsFrameLoader, apply the new sandbox flags.
|
||||
// Since this is called after the setter, the sandbox flags have
|
||||
|
@ -244,15 +240,7 @@ HTMLIFrameElement::GetSandboxFlags()
|
|||
if (!sandboxAttr) {
|
||||
return SANDBOXED_NONE;
|
||||
}
|
||||
|
||||
uint32_t out = nsContentUtils::ParseSandboxAttributeToFlags(sandboxAttr);
|
||||
|
||||
if (GetParsedAttr(nsGkAtoms::allowfullscreen) ||
|
||||
GetParsedAttr(nsGkAtoms::mozallowfullscreen)) {
|
||||
out &= ~SANDBOXED_FULLSCREEN;
|
||||
}
|
||||
|
||||
return out;
|
||||
return nsContentUtils::ParseSandboxAttributeToFlags(sandboxAttr);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
|
|
Загрузка…
Ссылка в новой задаче