diff options
Diffstat (limited to 'application')
20 files changed, 128 insertions, 42 deletions
diff --git a/application/basilisk/base/content/tab-content.js b/application/basilisk/base/content/tab-content.js index 35ef8ceb2..fec13eba7 100644 --- a/application/basilisk/base/content/tab-content.js +++ b/application/basilisk/base/content/tab-content.js @@ -20,6 +20,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "AboutReader", "resource://gre/modules/AboutReader.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Readerable", + "resource://gre/modules/Readerable.jsm"); XPCOMUtils.defineLazyGetter(this, "SimpleServiceDiscovery", function() { let ssdp = Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm", {}).SimpleServiceDiscovery; // Register targets @@ -336,7 +338,7 @@ var AboutReaderListener = { * painted is not going to work. */ updateReaderButton: function(forceNonArticle) { - if (!ReaderMode.isEnabledForParseOnLoad || this.isAboutReader || + if (!Readerable.isEnabledForParseOnLoad || this.isAboutReader || !content || !(content.document instanceof content.HTMLDocument) || content.document.mozSyntheticDocument) { return; @@ -375,7 +377,7 @@ var AboutReaderListener = { this.cancelPotentialPendingReadabilityCheck(); // Only send updates when there are articles; there's no point updating with // |false| all the time. - if (ReaderMode.isProbablyReaderable(content.document)) { + if (Readerable.isProbablyReaderable(content.document)) { sendAsyncMessage("Reader:UpdateReaderButton", { isArticle: true }); } else if (forceNonArticle) { sendAsyncMessage("Reader:UpdateReaderButton", { isArticle: false }); diff --git a/application/basilisk/base/content/utilityOverlay.js b/application/basilisk/base/content/utilityOverlay.js index f3ebf3b7e..3d27f7d27 100644 --- a/application/basilisk/base/content/utilityOverlay.js +++ b/application/basilisk/base/content/utilityOverlay.js @@ -17,6 +17,9 @@ XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService", "@mozilla.org/browser/aboutnewtab-service;1", "nsIAboutNewTabService"); +XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", + "resource://gre/modules/Deprecated.jsm"); + this.__defineGetter__("BROWSER_NEW_TAB_URL", () => { if (PrivateBrowsingUtils.isWindowPrivate(window) && !PrivateBrowsingUtils.permanentPrivateBrowsing && @@ -34,7 +37,7 @@ var gBidiUI = false; * Determines whether the given url is considered a special URL for new tabs. */ function isBlankPageURL(aURL) { - return aURL == "about:blank" || aURL == "about:newtab" || aURL == "about:logopage"; + return aURL == "about:blank" || aURL == BROWSER_NEW_TAB_URL || aURL == "about:logopage"; } function getBrowserURL() @@ -42,6 +45,13 @@ function getBrowserURL() return "chrome://browser/content/browser.xul"; } +function getBoolPref(pref, defaultValue) { + Deprecated.warning("getBoolPref is deprecated and will be removed in a future release. " + + "You should use Services.pref.getBoolPref (Services.jsm).", + "https://github.com/MoonchildProductions/UXP/issues/989"); + return Services.prefs.getBoolPref(pref, defaultValue); +} + function getTopWin(skipPopups) { // If this is called in a browser window, use that window regardless of // whether it's the frontmost window, since commands can be executed in diff --git a/application/palemoon/app/moz.build b/application/palemoon/app/moz.build index c11f4c37e..8166760af 100644 --- a/application/palemoon/app/moz.build +++ b/application/palemoon/app/moz.build @@ -20,6 +20,7 @@ if CONFIG['LIBXUL_SDK']: SOURCES += ['nsBrowserApp.cpp'] FINAL_TARGET_FILES += ['blocklist.xml'] +FINAL_TARGET_FILES.defaults += ['permissions'] FINAL_TARGET_FILES.defaults.profile += ['profile/prefs.js'] DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION'] diff --git a/application/palemoon/app/permissions b/application/palemoon/app/permissions new file mode 100644 index 000000000..4d90be82a --- /dev/null +++ b/application/palemoon/app/permissions @@ -0,0 +1,14 @@ +# This file has default permissions for the permission manager.
+# The file-format is strict:
+# * matchtype \t type \t permission \t host
+# * "origin" should be used for matchtype, "host" is supported for legacy reasons
+# * type is a string that identifies the type of permission (e.g. "cookie")
+# * permission is an integer between 1 and 15
+# See nsPermissionManager.cpp for more...
+
+# XPInstall
+origin install 1 http://www.palemoon.org
+origin install 1 https://www.palemoon.org
+
+origin install 1 http://addons.palemoon.org
+origin install 1 https://addons.palemoon.org
diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js index bd1b62cc3..974d76d4b 100644 --- a/application/palemoon/app/profile/palemoon.js +++ b/application/palemoon/app/profile/palemoon.js @@ -206,9 +206,6 @@ pref("extensions.dss.switchPending", false); // Non-dynamic switch pending af pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://browser/locale/browser.properties"); pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties"); -pref("xpinstall.whitelist.add", "addons.mozilla.org,www.palemoon.org,addons.palemoon.org"); -pref("xpinstall.whitelist.add.36", ""); -pref("xpinstall.whitelist.add.180", ""); pref("xpinstall.whitelist.required", false); // Allow installing XPI add-ons by direct URL requests (no referrer) pref("xpinstall.whitelist.directRequest", true); @@ -1103,6 +1100,9 @@ pref("full-screen-api.enabled", true); // 0-100 (currently) pref("permissions.places-sites-limit", 50); +// Built-in default permissions. +pref("permissions.manager.defaultsUrl", "resource://app/defaults/permissions"); + // Startup Crash Tracking // number of startup crashes that can occur before starting into safe mode automatically // (this pref has no effect if more than 6 hours have passed since the last crash) diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul index a006ed5c6..bccdec265 100644 --- a/application/palemoon/base/content/baseMenuOverlay.xul +++ b/application/palemoon/base/content/baseMenuOverlay.xul @@ -57,15 +57,21 @@ label="&helpTroubleshootingInfo.label;" oncommand="openTroubleshootingPage()" onclick="checkForMiddleClick(this, event);"/> + <menuitem id="helpSafeMode" + accesskey="&helpSafeMode.accesskey;" + label="&helpSafeMode.label;" + oncommand="restart(true);"/> + <menuseparator/> + <menuitem id="releaseNotes" + accesskey="&helpReleaseNotes.accesskey;" + label="&helpReleaseNotes.label;" + oncommand="openReleaseNotes();" + onclick="checkForMiddleClick(this, event);"/> <menuitem id="feedbackPage" accesskey="&helpFeedbackPage.accesskey;" label="&helpFeedbackPage.label;" oncommand="openFeedbackPage()" onclick="checkForMiddleClick(this, event);"/> - <menuitem id="helpSafeMode" - accesskey="&helpSafeMode.accesskey;" - label="&helpSafeMode.label;" - oncommand="restart(true);"/> <menuseparator id="updatesSeparator"/> <menuitem id="checkForUpdates" class="menuitem-iconic" #ifdef MOZ_UPDATER diff --git a/application/palemoon/base/content/browser-appmenu.inc b/application/palemoon/base/content/browser-appmenu.inc index ffb117a60..9d202c965 100644 --- a/application/palemoon/base/content/browser-appmenu.inc +++ b/application/palemoon/base/content/browser-appmenu.inc @@ -350,14 +350,19 @@ label="&helpTroubleshootingInfo.label;" oncommand="openTroubleshootingPage()" onclick="checkForMiddleClick(this,event);"/> + <menuitem id="appmenu_safeMode" + label="&appMenuSafeMode.label;" + oncommand="restart(true);"/> + <menuseparator/> + <menuitem id="appmenu_releaseNotes" + accesskey="&helpReleaseNotes.accesskey;" + label="&helpReleaseNotes.label;" + oncommand="openReleaseNotes();" + onclick="checkForMiddleClick(this, event);"/> <menuitem id="appmenu_feedbackPage" label="&helpFeedbackPage.label;" oncommand="openFeedbackPage()" onclick="checkForMiddleClick(this, event);"/> - <menuseparator/> - <menuitem id="appmenu_safeMode" - label="&appMenuSafeMode.label;" - oncommand="restart(true);"/> #ifdef MOZ_UPDATER <menuseparator/> <menuitem id="appmenu_checkForUpdates" diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 7672fa3a8..3f8a584bf 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -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(); diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index d9366f488..aa1a89200 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -402,11 +402,18 @@ let promptBox = { appendPrompt : function(args, onCloseCallback) { let newPrompt = document.createElementNS(XUL_NS, "tabmodalprompt"); - stack.appendChild(newPrompt); + // stack.appendChild(newPrompt); + stack.insertBefore(newPrompt, browser.nextSibling); browser.setAttribute("tabmodalPromptShowing", true); newPrompt.clientTop; // style flush to assure binding is attached + let prompts = this.listPrompts(); + if (prompts.length > 1) { + // Let's hide ourself behind the current prompt. + newPrompt.hidden = true; + } + let tab = self._getTabForContentWindow(browser.contentWindow); newPrompt.init(args, tab, onCloseCallback); return newPrompt; @@ -418,6 +425,7 @@ let prompts = this.listPrompts(); if (prompts.length) { let prompt = prompts[prompts.length - 1]; + prompt.hidden = false; prompt.Dialog.setDefaultFocus(); } else { browser.removeAttribute("tabmodalPromptShowing"); @@ -823,13 +831,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"); diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index c2a8baeed..d7c8088c7 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -12,6 +12,9 @@ Components.utils.import("resource:///modules/RecentWindow.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ShellService", "resource:///modules/ShellService.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", + "resource://gre/modules/Deprecated.jsm"); + XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () { const PREF = "browser.newtab.url"; @@ -57,6 +60,14 @@ function getBrowserURL() return "chrome://browser/content/browser.xul"; } +function getBoolPref(pref, defaultValue) { + Deprecated.warning("getBoolPref is deprecated and will be removed in a future release. " + + "You should use Services.pref.getBoolPref (Services.jsm).", + "https://github.com/MoonchildProductions/UXP/issues/989"); + return Services.prefs.getBoolPref(pref, defaultValue); +} + + function getTopWin(skipPopups) { // If this is called in a browser window, use that window regardless of // whether it's the frontmost window, since commands can be executed in @@ -573,10 +584,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; @@ -612,19 +629,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 @@ -692,6 +721,18 @@ function openAdvancedPreferences(tabID) } /** + * Opens the release notes page for this version of the application. + */ +function openReleaseNotes() +{ + var relnotesURL = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] + .getService(Components.interfaces.nsIURLFormatter) + .formatURLPref("app.releaseNotesURL"); + + openUILinkIn(relnotesURL, "tab"); +} + +/** * Opens the troubleshooting information (about:support) page for this version * of the application. */ diff --git a/application/palemoon/branding/official/firefox.ico b/application/palemoon/branding/official/firefox.ico Binary files differindex 33bb04e99..0f55f0ba5 100644 --- a/application/palemoon/branding/official/firefox.ico +++ b/application/palemoon/branding/official/firefox.ico diff --git a/application/palemoon/components/fuel/fuelApplication.js b/application/palemoon/components/fuel/fuelApplication.js index 017813143..bc3a091ea 100644 --- a/application/palemoon/components/fuel/fuelApplication.js +++ b/application/palemoon/components/fuel/fuelApplication.js @@ -6,6 +6,8 @@ const Ci = Components.interfaces; const Cc = Components.classes; Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", + "resource://gre/modules/Deprecated.jsm"); const APPLICATION_CID = Components.ID("fe74cf80-aa2d-11db-abbd-0800200c9a66"); const APPLICATION_CONTRACTID = "@mozilla.org/fuel/application;1"; @@ -734,6 +736,8 @@ var ApplicationFactory = { //================================================= // Application constructor function Application() { + Deprecated.warning("FUEL is deprecated, you should use the standard Toolkit API instead.", + "https://github.com/MoonchildProductions/UXP/issues/1083"); this.initToolkitHelpers(); } diff --git a/application/palemoon/components/places/PlacesUIUtils.jsm b/application/palemoon/components/places/PlacesUIUtils.jsm index 05d79241c..e3a9e1322 100644 --- a/application/palemoon/components/places/PlacesUIUtils.jsm +++ b/application/palemoon/components/places/PlacesUIUtils.jsm @@ -1170,11 +1170,8 @@ this.PlacesUIUtils = { * @return The URL with the fragment at the end */ getImageURLForResolution: - function PUIU_getImageURLForResolution(aWindow, aURL, aWidth = 16, aHeight = 16) { - let width = Math.round(aWidth * aWindow.devicePixelRatio); - let height = Math.round(aHeight * aWindow.devicePixelRatio); - return aURL + (aURL.includes("#") ? "&" : "#") + - "-moz-resolution=" + width + "," + height; + function PUIU_getImageURLForResolution(aWindow, aURL, aWidth, aHeight) { + return aURL; } }; diff --git a/application/palemoon/components/search/content/search.xml b/application/palemoon/components/search/content/search.xml index 4532f5720..0c33b1527 100644 --- a/application/palemoon/components/search/content/search.xml +++ b/application/palemoon/components/search/content/search.xml @@ -283,11 +283,6 @@ <parameter name="element"/> <parameter name="uri"/> <body><![CDATA[ - if (uri) { - let size = Math.round(16 * window.devicePixelRatio); - if (!uri.includes("#")) - uri += "#-moz-resolution=" + size + "," + size; - } element.setAttribute("src", uri); ]]></body> </method> diff --git a/application/palemoon/config/version.txt b/application/palemoon/config/version.txt index b5df67405..bcbf0fd12 100644 --- a/application/palemoon/config/version.txt +++ b/application/palemoon/config/version.txt @@ -1 +1 @@ -28.5.0a2
\ No newline at end of file +28.6.0a1
\ No newline at end of file diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in index d8722bf08..0d80e15f9 100644 --- a/application/palemoon/installer/package-manifest.in +++ b/application/palemoon/installer/package-manifest.in @@ -231,6 +231,7 @@ ; [Default Preferences] ; All the pref files must be part of base to prevent migration bugs +@RESPATH@/browser/defaults/permissions @RESPATH@/browser/@PREF_DIR@/palemoon.js @RESPATH@/browser/@PREF_DIR@/palemoon-branding.js @RESPATH@/greprefs.js diff --git a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd b/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd index 27de3797f..dd88a3384 100644 --- a/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd +++ b/application/palemoon/locales/en-US/chrome/browser/baseMenuOverlay.dtd @@ -15,6 +15,8 @@ <!ENTITY helpMenuWin.label "Help"> <!ENTITY helpMenuWin.accesskey "H"> <!ENTITY updateCmd.label "Check for Updates…"> +<!ENTITY helpReleaseNotes.label "Release Notes"> +<!ENTITY helpReleaseNotes.accesskey "N"> <!ENTITY aboutProduct.label "About &brandShortName;"> <!ENTITY aboutProduct.accesskey "A"> <!ENTITY productHelp.label "&brandShortName; Help"> diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css index 01b3f5c9e..4933b4069 100644 --- a/application/palemoon/themes/linux/browser.css +++ b/application/palemoon/themes/linux/browser.css @@ -1608,7 +1608,7 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- } /* When the tab bar is collapsed, show a 1px border in its place. */ -#TabsToolbar[tabsontop="false"][collapsed="true"] { +#TabsToolbar[tabsontop="false"][collapsed="true"]:not([customizing="true"]) { visibility: visible; height: 1px; border-bottom-width: 1px; diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css index 6d0d92015..20e453d11 100644 --- a/application/palemoon/themes/osx/browser.css +++ b/application/palemoon/themes/osx/browser.css @@ -1631,7 +1631,7 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url- } /* When the tab bar is collapsed, show a 1px border in its place. */ -#TabsToolbar[tabsontop="false"][collapsed="true"] { +#TabsToolbar[tabsontop="false"][collapsed="true"]:not([customizing="true"]) { visibility: visible; height: 1px; border-bottom-width: 1px; diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css index 9f32b59cf..88c3087ae 100644 --- a/application/palemoon/themes/windows/browser.css +++ b/application/palemoon/themes/windows/browser.css @@ -1844,7 +1844,7 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- } /* When the tab bar is collapsed, show a 1px border in its place. */ -#TabsToolbar[tabsontop="false"][collapsed="true"] { +#TabsToolbar[tabsontop="false"][collapsed="true"]:not([customizing="true"]) { visibility: visible; height: 1px; border-bottom-width: 1px; |