Bug 784508 - Stop using setIsBrowserElement in Frameworker.jsm. r=gavin

This commit is contained in:
Mark Hammond 2012-09-04 10:26:57 +10:00
parent fbaf1904eb
commit a9bd1399ee

View File

@ -231,6 +231,8 @@ function makeHiddenFrame() {
let hiddenDoc = Services.appShell.hiddenDOMWindow.document;
let iframe = hiddenDoc.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
iframe.setAttribute("mozframetype", "content");
// allow-same-origin is necessary for localStorage to work in the sandbox.
iframe.setAttribute("sandbox", "allow-same-origin");
hiddenDoc.documentElement.appendChild(iframe);
@ -241,10 +243,6 @@ function makeHiddenFrame() {
docShell.allowImages = false;
docShell.allowWindowControl = false;
// TODO: disable media (bug 759964)
// Mark this docShell as a "browserFrame", to break script access to e.g. window.top
docShell.setIsBrowserElement();
return iframe;
}