Bug 1448482 - Remove <title> element from about:privatebrowsing since tabbrowser already sets the title. r=Gijs

MozReview-Commit-ID: 7oQrfiK0FRa

--HG--
extra : rebase_source : dcaeae1f53682531709bd8333cdf38a0a7e21298
This commit is contained in:
Dão Gottwald 2018-03-27 23:34:23 +02:00
Родитель 29234a8525
Коммит e71fb1aa39
7 изменённых файлов: 4 добавлений и 13 удалений

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

@ -854,7 +854,7 @@ window._gBrowser = {
docTitle = tab.getAttribute("label").replace(/\0/g, "");
}
if (!docTitle || docTitle == this.tabContainer.emptyTabTitle)
if (!docTitle)
docTitle = docElement.getAttribute("titledefault");
var modifier = docElement.getAttribute("titlemodifier");

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

@ -33,7 +33,6 @@ document.addEventListener("DOMContentLoaded", function() {
if (!aboutCapabilities.isWindowPrivate()) {
document.documentElement.classList.remove("private");
document.documentElement.classList.add("normal");
document.title = document.querySelector("title").getAttribute("notprivatetitle");
document.getElementById("favicon").setAttribute("href", FAVICON_QUESTION);
document.getElementById("startPrivateBrowsing").addEventListener("click", function() {
aboutCapabilities.sendAsyncMessage("OpenPrivateWindow", null);

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

@ -23,7 +23,6 @@
<link id="favicon" rel="icon" type="image/png" href="chrome://browser/skin/privatebrowsing/favicon.svg"/>
<link rel="stylesheet" href="chrome://browser/content/aboutPrivateBrowsing.css" type="text/css" media="all"/>
<link rel="stylesheet" href="chrome://browser/skin/privatebrowsing/aboutPrivateBrowsing.css" type="text/css" media="all"/>
<title notprivatetitle="&aboutPrivateBrowsing.notPrivate.title;">&aboutPrivateBrowsing.title;</title>
<script type="application/javascript" src="chrome://browser/content/aboutPrivateBrowsing.js"></script>
</head>

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

@ -23,14 +23,14 @@ add_task(async function test() {
if (isOSX) {
page_with_title = test_title;
page_without_title = app_name;
about_pb_title = "Open a private window?";
about_pb_title = app_name;
pb_page_with_title = test_title + " - (Private Browsing)";
pb_page_without_title = app_name + " - (Private Browsing)";
pb_about_pb_title = app_name + " - (Private Browsing)";
} else {
page_with_title = test_title + " - " + app_name;
page_without_title = app_name;
about_pb_title = "Open a private window? - " + app_name;
about_pb_title = app_name;
pb_page_with_title = test_title + " - " + app_name + " (Private Browsing)";
pb_page_without_title = app_name + " (Private Browsing)";
pb_about_pb_title = app_name + " (Private Browsing)";

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

@ -2,11 +2,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/. -->
<!-- LOCALIZATION NOTE (aboutPrivateBrowsing.title):
Please ensure this exactly matches tabs.emptyPrivateTabTitle in tabbrowser.properties -->
<!ENTITY aboutPrivateBrowsing.title "Private Browsing">
<!ENTITY aboutPrivateBrowsing.notPrivate.title "Open a private window?">
<!ENTITY aboutPrivateBrowsing.notPrivate "You are currently not in a private window.">
<!ENTITY privatebrowsingpage.openPrivateWindow.label "Open a Private Window">
<!ENTITY privatebrowsingpage.openPrivateWindow.accesskey "P">

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

@ -4,8 +4,6 @@
tabs.restoreLastTabs=Restore Tabs From Last Time
tabs.emptyTabTitle=New Tab
# LOCALIZATION NOTE (tabs.emptyPrivateTabTitle)
# Please ensure this exactly matches aboutPrivateBrowsing.dtd's window title (aboutPrivateBrowsing.title).
tabs.emptyPrivateTabTitle=Private Browsing
tabs.closeTab=Close Tab
tabs.close=Close

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

@ -132,7 +132,7 @@ async function allTabTitlesDisplayed(browserWindow) {
"about:home": "New Tab",
"about:newtab": "New Tab",
"about:addons": "Add-ons Manager",
"about:privatebrowsing": "Open a private window?"
"about:privatebrowsing": "about:privatebrowsing"
};
specToTitleMap[PREFS_TAB] = "browser/skin/settings.svg";
specToTitleMap[CUST_TAB] = "browser/skin/customize.svg";