Bug 1716676 - Port bug 1646560 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. rs=bustage-fix

--HG--
extra : rebase_source : d03f993445ee3d6e4236d3e6d3ad91c33623d9d8
This commit is contained in:
Geoff Lankow 2021-06-16 11:53:08 +12:00
Родитель c41c266969
Коммит e2186a9065
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -13,7 +13,7 @@ var gLogFile;
function onLoad() { function onLoad() {
gLogView = document.getElementById("logView"); gLogView = document.getElementById("logView");
gLogView.docShell.allowJavascript = false; // for security, disable JS gLogView.browsingContext.allowJavascript = false; // for security, disable JS
gLogView.addEventListener("load", () => { gLogView.addEventListener("load", () => {
addStyling(); addStyling();

Просмотреть файл

@ -841,7 +841,7 @@ nsresult nsMsgContentPolicy::SetDisableItemsOnMailNewsUrlDocshells(
if (!isAllowedContent) { if (!isAllowedContent) {
// Disable JavaScript on message URLs. // Disable JavaScript on message URLs.
rv = docShell->SetAllowJavascript(false); rv = browsingContext->SetAllowJavascript(false);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
rv = browsingContext->SetAllowContentRetargetingOnChildren(false); rv = browsingContext->SetAllowContentRetargetingOnChildren(false);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
@ -871,7 +871,7 @@ nsresult nsMsgContentPolicy::SetDisableItemsOnMailNewsUrlDocshells(
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
} else { } else {
// JavaScript is allowed on non-message URLs. // JavaScript is allowed on non-message URLs.
rv = docShell->SetAllowJavascript(true); rv = browsingContext->SetAllowJavascript(true);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
rv = browsingContext->SetAllowContentRetargetingOnChildren(true); rv = browsingContext->SetAllowContentRetargetingOnChildren(true);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);

Просмотреть файл

@ -19,7 +19,7 @@ function onLoad() {
gLogView = document.getElementById("logView"); gLogView = document.getElementById("logView");
// for security, disable JS // for security, disable JS
gLogView.docShell.allowJavascript = false; gLogView.browsingContext.allowJavascript = false;
MailE10SUtils.loadURI(gLogView, gFilterList.logURL); MailE10SUtils.loadURI(gLogView, gFilterList.logURL);
} }