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

This commit is contained in:
Roy Tam 2019-05-17 22:18:17 +08:00
commit ec217d91d9
20 changed files with 70 additions and 789 deletions

View file

@ -412,6 +412,10 @@ var gURLBarSettings = {
},
writePlaceholder: function() {
if (!gURLBar) {
return;
}
let attribute = "placeholder";
let prefs = this.prefSuggests.map(pref => {
return this.prefSuggest + pref;
@ -3471,6 +3475,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
// Update the urlbar
if (gURLBar) {
gURLBarSettings.writePlaceholder();
URLBarSetURI();
XULBrowserWindow.asyncUpdateUI();
BookmarkingUI.updateStarState();

View file

@ -833,13 +833,8 @@
}
let sizedIconUrl = browser.mIconURL || "";
if (sizedIconUrl) {
let size = Math.round(16 * window.devicePixelRatio);
sizedIconUrl += (sizedIconUrl.includes("#") ? "&" : "#") +
"-moz-resolution=" + size + "," + size;
}
if (sizedIconUrl != aTab.getAttribute("image")) {
if (browser.mIconURL)
if (sizedIconUrl)
aTab.setAttribute("image", sizedIconUrl);
else
aTab.removeAttribute("image");

View file

@ -594,10 +594,16 @@ function buildHelpMenu()
var checkForUpdates = document.getElementById("checkForUpdates");
var appMenuCheckForUpdates = document.getElementById("appmenu_checkForUpdates");
var canCheckForUpdates = updates.canCheckForUpdates;
checkForUpdates.setAttribute("disabled", !canCheckForUpdates);
appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates);
if (!canCheckForUpdates)
if (appMenuCheckForUpdates) {
appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates);
}
if (!canCheckForUpdates) {
return;
}
var strings = document.getElementById("bundle_browser");
var activeUpdate = um.activeUpdate;
@ -633,19 +639,31 @@ function buildHelpMenu()
}
checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
if (appMenuCheckForUpdates) {
appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
}
// updatesItem_default.accesskey, updatesItem_downloading.accesskey,
// updatesItem_resume.accesskey or updatesItem_pending.accesskey
checkForUpdates.accessKey = strings.getString("updatesItem_" + key +
".accesskey");
appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key +
".accesskey");
if (appMenuCheckForUpdates) {
appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key +
".accesskey");
}
if (um.activeUpdate && updates.isDownloading) {
checkForUpdates.setAttribute("loading", "true");
appMenuCheckForUpdates.setAttribute("loading", "true");
if (appMenuCheckForUpdates) {
appMenuCheckForUpdates.setAttribute("loading", "true");
}
} else {
checkForUpdates.removeAttribute("loading");
appMenuCheckForUpdates.removeAttribute("loading");
if (appMenuCheckForUpdates) {
appMenuCheckForUpdates.removeAttribute("loading");
}
}
#else
#ifndef XP_MACOSX