Bug 1956801. Add CSP to win.xhtml r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D243580
This commit is contained in:
@@ -100,10 +100,10 @@ async function takeScreenshot(
|
||||
let browser = doc.createXULElement("browser");
|
||||
browser.setAttribute("remote", "true");
|
||||
browser.setAttribute("type", "content");
|
||||
browser.setAttribute(
|
||||
"style",
|
||||
`width: ${contentWidth}px; min-width: ${contentWidth}px; height: ${contentHeight}px; min-height: ${contentHeight}px;`
|
||||
);
|
||||
browser.style.width = `${contentWidth}px`;
|
||||
browser.style.minWidth = `${contentWidth}px`;
|
||||
browser.style.height = `${contentHeight}px`;
|
||||
browser.style.minHeight = `${contentHeight}px`;
|
||||
browser.setAttribute("maychangeremoteness", "true");
|
||||
doc.documentElement.appendChild(browser);
|
||||
|
||||
|
||||
@@ -1960,7 +1960,6 @@ void nsContentSecurityUtils::AssertChromePageHasCSP(Document* aDocument) {
|
||||
"chrome://global/content/backgroundPageThumbs.xhtml"_ns,
|
||||
"chrome://global/content/megalist/megalist.html"_ns,
|
||||
"chrome://global/content/selectDialog.xhtml"_ns,
|
||||
"chrome://global/content/win.xhtml"_ns,
|
||||
// Test files
|
||||
"chrome://mochikit/"_ns,
|
||||
"chrome://mochitests/"_ns,
|
||||
|
||||
@@ -167,15 +167,10 @@ export const HiddenBrowserManager = new (class HiddenBrowserManager {
|
||||
let browser = doc.createXULElement("browser");
|
||||
browser.setAttribute("remote", "true");
|
||||
browser.setAttribute("type", "content");
|
||||
browser.setAttribute(
|
||||
"style",
|
||||
`
|
||||
width: ${BACKGROUND_WIDTH}px;
|
||||
min-width: ${BACKGROUND_WIDTH}px;
|
||||
height: ${BACKGROUND_HEIGHT}px;
|
||||
min-height: ${BACKGROUND_HEIGHT}px;
|
||||
`
|
||||
);
|
||||
browser.style.width = `${BACKGROUND_WIDTH}px`;
|
||||
browser.style.minWidth = `${BACKGROUND_WIDTH}px`;
|
||||
browser.style.height = `${BACKGROUND_HEIGHT}px`;
|
||||
browser.style.minHeight = `${BACKGROUND_HEIGHT}px`;
|
||||
browser.setAttribute("maychangeremoteness", "true");
|
||||
doc.documentElement.appendChild(browser);
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<?csp default-src chrome:; ?>
|
||||
|
||||
<window id="win" />
|
||||
|
||||
Reference in New Issue
Block a user