Bug 1725257 - Part 2. Add a blank about:unloads. r=NeilDeakin,flod

Differential Revision: https://phabricator.services.mozilla.com/D123987
This commit is contained in:
Toshihito Kikuchi 2021-09-07 00:46:59 +00:00
Родитель eed9a0176e
Коммит 5686cf3408
9 изменённых файлов: 70 добавлений и 0 удалений

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

@ -56,6 +56,8 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_CAN_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
nsIAboutModule::HIDE_FROM_ABOUTABOUT},
{"unloads", "chrome://browser/content/tabunloader/aboutUnloads.html",
nsIAboutModule::ALLOW_SCRIPT},
{"framecrashed", "chrome://browser/content/aboutFrameCrashed.html",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::HIDE_FROM_ABOUTABOUT},

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

@ -28,6 +28,7 @@ pages = [
'robots',
'sessionrestore',
'tabcrashed',
'unloads',
'welcome',
'welcomeback',
]

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

@ -54,6 +54,7 @@ DIRS += [
"sessionstore",
"shell",
"syncedtabs",
"tabunloader",
"uitour",
"urlbar",
"translation",

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

@ -0,0 +1,3 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */

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

@ -0,0 +1,21 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title data-l10n-id="about-unloads-page-title"></title>
<meta http-equiv="Content-Security-Policy"
content="default-src chrome:; object-src 'none'"/>
<link rel="stylesheet"
href="chrome://global/skin/in-content/info-pages.css"/>
<link rel="stylesheet"
href="chrome://browser/content/tabunloader/aboutUnloads.css"/>
<link rel="localization" href="browser/aboutUnloads.ftl"/>
<script src="chrome://browser/content/tabunloader/aboutUnloads.js">
</script>
</head>
<body>
<h1 data-l10n-id="about-unloads-page-title"></h1>
</body>
</html>

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

@ -0,0 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
"use strict";
const { TabUnloader } = ChromeUtils.import(
"resource:///modules/TabUnloader.jsm"
);
function onLoad() {}
try {
document.addEventListener("DOMContentLoaded", onLoad, { once: true });
} catch (ex) {
Cu.reportError(ex);
}

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

@ -0,0 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
browser.jar:
content/browser/tabunloader/aboutUnloads.css (content/aboutUnloads.css)
content/browser/tabunloader/aboutUnloads.html (content/aboutUnloads.html)
content/browser/tabunloader/aboutUnloads.js (content/aboutUnloads.js)

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

@ -0,0 +1,10 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
JAR_MANIFESTS += ["jar.mn"]
with Files("**"):
BUG_COMPONENT = ("Firefox", "Tabbed Browser")

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

@ -0,0 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
### Strings used in about:unloads, allowing users to manage the "tab unloading"
### feature.
about-unloads-page-title = Tab Unloading