Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
roytam1 2020-09-25 22:18:48 +08:00
commit 56aaf6a15a
8042 changed files with 294 additions and 8190 deletions

View file

@ -1,5 +1,4 @@
# -*- 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/.

View file

@ -247,8 +247,7 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
stateLabel = s.stateFailed;
}
let referrer = this.download.source.referrer || this.download.source.url;
let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer);
let [displayHost, fullHost] = DownloadUtils.getURIHost(this.download.source.url);
let date = new Date(this.download.endTime);
let [displayDate, fullDate] = DownloadUtils.getReadableDates(date);

View file

@ -958,6 +958,9 @@ pref("browser.bookmarks.editDialog.showForNewBookmarks", false);
// bookmarking dialog
pref("browser.bookmarks.editDialog.firstEditField", "namePicker");
// Prompt for master password on application startup?
pref("signon.startup.prompt", false);
// Whether to use a panel that looks like an OS X sheet for customization
#ifdef XP_MACOSX
pref("toolbar.customization.usesheet", true);
@ -1071,6 +1074,7 @@ pref("services.sync.prefs.sync.security.default_personal_cert", true);
pref("services.sync.prefs.sync.security.tls.version.min", true);
pref("services.sync.prefs.sync.security.tls.version.max", true);
pref("services.sync.prefs.sync.signon.rememberSignons", true);
pref("services.sync.prefs.sync.signon.startup.prompt", true);
pref("services.sync.prefs.sync.spellchecker.dictionary", true);
pref("services.sync.prefs.sync.xpinstall.whitelist.required", true);
#endif

View file

@ -80,17 +80,21 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
get extendedDisplayName() {
let s = DownloadsCommon.strings;
let referrer = this.download.source.referrer ||
this.download.source.url;
let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer);
let [displayHost, fullHost] = DownloadUtils.getURIHost(this.download.source.url);
return s.statusSeparator(this.displayName, displayHost);
},
get extendedDisplayNameTip() {
let s = DownloadsCommon.strings;
let referrer = this.download.source.referrer ||
this.download.source.url;
let [displayHost, fullHost] = DownloadUtils.getURIHost(referrer);
let referrer = this.download.source.referrer;
if (referrer) {
let [displayHost, fullHost] = DownloadUtils.getURIHost(this.download.source.url) +
' (' +
DownloadUtils.getURIHost(referrer) +
')';
} else {
let [displayHost, fullHost] = DownloadUtils.getURIHost(this.download.source.url);
}
return s.statusSeparator(this.displayName, fullHost);
},

View file

@ -286,6 +286,7 @@ BrowserGlue.prototype = {
break;
case "profile-after-change":
this._onProfileAfterChange();
this._promptForMasterPassword();
break;
case "browser-search-engine-modified":
if (data != "engine-default" && data != "engine-current") {
@ -405,10 +406,29 @@ BrowserGlue.prototype = {
},
// profile is available
_onProfileAfterChange: function()
{
_onProfileAfterChange: function() {
this._copyDefaultProfileFiles();
},
_promptForMasterPassword: function() {
if (!Services.prefs.getBoolPref("signon.startup.prompt", false))
return;
// Try to avoid the multiple master password prompts on startup scenario
// by prompting for the master password upfront.
let token = Components.classes["@mozilla.org/security/pk11tokendb;1"]
.getService(Components.interfaces.nsIPK11TokenDB)
.getInternalKeyToken();
// Only log in to the internal token if it is already initialized,
// otherwise we get a "Change Master Password" dialog.
try {
if (!token.needsUserInit)
token.login(false);
} catch (ex) {
// If user cancels an exception is expected.
}
},
_onAppDefaults: function() {
// apply distribution customizations (prefs)
@ -455,8 +475,7 @@ BrowserGlue.prototype = {
// Copies additional profile files from the default profile to the current profile.
// Only files not covered by the regular profile creation process.
// Currently only the userchrome examples.
_copyDefaultProfileFiles: function()
{
_copyDefaultProfileFiles: function() {
// Copy default chrome example files if they do not exist in the current profile.
var profileDir = Services.dirsvc.get("ProfD", Components.interfaces.nsILocalFile);
profileDir.append("chrome");

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,4 +1,3 @@
# 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.

View file

@ -1,5 +1,4 @@
# -*- Mode: python; c-basic-offset: 4; 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/.