From cb2f0f614362d3e986d585d6d1b4a2eaa20a1365 Mon Sep 17 00:00:00 2001 From: JustOff Date: Sun, 23 Dec 2018 22:47:45 +0200 Subject: [PALEMOON] Initialize the search service asynchronously from 'about:home' and 'about:newtab' --- application/palemoon/base/content/browser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 591d00fbb..8a635e91b 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -2456,7 +2456,7 @@ function BrowserOnAboutPageLoad(doc) { docElt.setAttribute("searchEnginePostData", engine.postDataString || ""); docElt.setAttribute("searchEngineURL", engine.searchURL); } - updateSearchEngine(); + Services.search.init(updateSearchEngine); // Listen for the event that's triggered when the user changes search engine. // At this point we simply reload about:home to reflect the change. @@ -2481,7 +2481,7 @@ function BrowserOnAboutPageLoad(doc) { docElt.setAttribute("searchEnginePostData", engine.postDataString || ""); docElt.setAttribute("searchEngineURL", engine.searchURL); } - updateSearchEngine(); + Services.search.init(updateSearchEngine); // Listen for the event that's triggered when the user changes search engine. // At this point we simply reload about:newtab to reflect the change. -- cgit v1.2.3 From accd61429eee73dd3564957cf3d6480c280d44e7 Mon Sep 17 00:00:00 2001 From: JustOff Date: Wed, 26 Dec 2018 13:48:49 +0200 Subject: [PALEMOON] Initialize the search service asynchronously when calling 'BrowserSearch.addEngine()' --- application/palemoon/base/content/browser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 8a635e91b..eb4916e37 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -3046,7 +3046,9 @@ const DOMLinkHandler = { /^(?:https?|ftp):/i.test(link.href) && !PrivateBrowsingUtils.isWindowPrivate(window)) { var engine = { title: link.title, href: link.href }; - BrowserSearch.addEngine(engine, link.ownerDocument); + Services.search.init(function () { + BrowserSearch.addEngine(engine, link.ownerDocument); + }); searchAdded = true; } } -- cgit v1.2.3 From 192715be578758ad2dc0cc85f2fba78a9ab747cb Mon Sep 17 00:00:00 2001 From: FranklinDM Date: Sat, 2 Feb 2019 14:22:17 +0800 Subject: [Pale Moon] Use mousemove events instead of MousePosTracker for hiding the navigation bar in fullscreen * Tag #336 --- .../palemoon/base/content/browser-fullScreen.js | 37 ++++++---------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js index b1235a8d3..e816ce5c1 100644 --- a/application/palemoon/base/content/browser-fullScreen.js +++ b/application/palemoon/base/content/browser-fullScreen.js @@ -53,17 +53,9 @@ var FullScreen = { document.addEventListener("popupshown", this._setPopupOpen, false); document.addEventListener("popuphidden", this._setPopupOpen, false); this._shouldAnimate = true; - // If it is not safe to collapse, add the mouse position tracker or - // else it won't be possible to hide the navigation toolbox again - if (!this._safeToCollapse(document.mozFullScreen)) { - let rect = gBrowser.mPanelContainer.getBoundingClientRect(); - this._mouseTargetRect = { - top: rect.top + 50, - bottom: rect.bottom, - left: rect.left, - right: rect.right - }; - MousePosTracker.addListener(this); + if (gPrefService.getBoolPref("browser.fullscreen.autohide")) { + gBrowser.mPanelContainer.addEventListener("mousemove", + this._collapseCallback, false); } // We don't animate the toolbar collapse if in DOM full-screen mode, // as the size of the content area would still be changing after the @@ -149,7 +141,8 @@ var FullScreen = { cleanup: function () { if (!window.fullScreen) { - MousePosTracker.removeListener(this); + gBrowser.mPanelContainer.removeEventListener("mousemove", + this._collapseCallback, false); document.removeEventListener("keypress", this._keyToggleCallback, false); document.removeEventListener("popupshown", this._setPopupOpen, false); document.removeEventListener("popuphidden", this._setPopupOpen, false); @@ -164,17 +157,12 @@ var FullScreen = { } }, - getMouseTargetRect: function() - { - return this._mouseTargetRect; - }, - // Event callbacks _expandCallback: function() { FullScreen.showNavToolbox(); }, - onMouseEnter: function() + _collapseCallback: function() { FullScreen.hideNavToolbox(); }, @@ -328,14 +316,8 @@ var FullScreen = { // Track whether mouse is near the toolbox this._isChromeCollapsed = false; if (trackMouse) { - let rect = gBrowser.mPanelContainer.getBoundingClientRect(); - this._mouseTargetRect = { - top: rect.top + 50, - bottom: rect.bottom, - left: rect.left, - right: rect.right - }; - MousePosTracker.addListener(this); + gBrowser.mPanelContainer.addEventListener("mousemove", + this._collapseCallback, false); } }, @@ -378,7 +360,8 @@ var FullScreen = { gNavToolbox.style.marginTop = -gNavToolbox.getBoundingClientRect().height + "px"; this._isChromeCollapsed = true; - MousePosTracker.removeListener(this); + gBrowser.mPanelContainer.removeEventListener("mousemove", + this._collapseCallback, false); }, showXULChrome: function(aTag, aShow) -- cgit v1.2.3 From e057156093c5ff2fbb13110dd62bbca2e52bd6c7 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 5 Feb 2019 14:09:00 +0100 Subject: Make sure Glass doesn't override LWT style for the title bar. This resolves #965. --- application/palemoon/base/content/browser-title.css | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser-title.css b/application/palemoon/base/content/browser-title.css index 66b5e6731..5f7e77564 100644 --- a/application/palemoon/base/content/browser-title.css +++ b/application/palemoon/base/content/browser-title.css @@ -50,13 +50,6 @@ right: -12px; } -/* Lightweight Themes */ - -#main-window:-moz-lwtheme::after { - color: inherit; - text-shadow: inherit; -} - /* Windows Classic theme */ @media all and (-moz-windows-classic) { @@ -192,6 +185,13 @@ } +/* Lightweight Themes */ + +#main-window:-moz-lwtheme::after { + color: inherit; + text-shadow: inherit; +} + /* Hide for small windows */ -- cgit v1.2.3 From d9a05498806ede2978623019ce222150c5cfcef5 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 6 Feb 2019 15:59:19 +0100 Subject: Add "check for updates" to main menu and AppMenu Tag #963. --- .../palemoon/base/content/baseMenuOverlay.xul | 6 ++++++ .../palemoon/base/content/browser-appmenu.inc | 5 +++++ .../palemoon/base/content/utilityOverlay.js | 23 ++++++++++++++++++++++ 3 files changed, 34 insertions(+) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul index e9019dc55..903e93fa2 100644 --- a/application/palemoon/base/content/baseMenuOverlay.xul +++ b/application/palemoon/base/content/baseMenuOverlay.xul @@ -67,6 +67,12 @@ label="&helpSafeMode.label;" oncommand="restart(true);"/> +#ifdef MOZ_UPDATER + +#endif +#ifdef MOZ_UPDATER + +#endif diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index 2c1a95f83..a37ce1d3e 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -590,6 +590,29 @@ function openAdvancedPreferences(tabID) openPreferences("paneAdvanced", { "advancedTab" : tabID }); } +#ifdef MOZ_UPDATER +/** + * Opens the update manager and checks for updates to the application. + */ +function checkForUpdates() +{ + var um = + Components.classes["@mozilla.org/updates/update-manager;1"]. + getService(Components.interfaces.nsIUpdateManager); + var prompter = + Components.classes["@mozilla.org/updates/update-prompt;1"]. + createInstance(Components.interfaces.nsIUpdatePrompt); + + // If there's an update ready to be applied, show the "Update Downloaded" + // UI instead and let the user know they have to restart the browser for + // the changes to be applied. + if (um.activeUpdate && um.activeUpdate.state == "pending") + prompter.showUpdateDownloaded(um.activeUpdate); + else + prompter.checkForUpdates(); +} +#endif + /** * Opens the troubleshooting information (about:support) page for this version * of the application. -- cgit v1.2.3 From 8db772d2ca44ff44f32d434e7f62acba289b4155 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 6 Feb 2019 16:15:27 +0100 Subject: Revert "Add "check for updates" to main menu and AppMenu" This reverts commit d9a05498806ede2978623019ce222150c5cfcef5. --- .../palemoon/base/content/baseMenuOverlay.xul | 6 ------ .../palemoon/base/content/browser-appmenu.inc | 5 ----- .../palemoon/base/content/utilityOverlay.js | 23 ---------------------- 3 files changed, 34 deletions(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul index 903e93fa2..e9019dc55 100644 --- a/application/palemoon/base/content/baseMenuOverlay.xul +++ b/application/palemoon/base/content/baseMenuOverlay.xul @@ -67,12 +67,6 @@ label="&helpSafeMode.label;" oncommand="restart(true);"/> -#ifdef MOZ_UPDATER - -#endif -#ifdef MOZ_UPDATER - -#endif diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index a37ce1d3e..2c1a95f83 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -590,29 +590,6 @@ function openAdvancedPreferences(tabID) openPreferences("paneAdvanced", { "advancedTab" : tabID }); } -#ifdef MOZ_UPDATER -/** - * Opens the update manager and checks for updates to the application. - */ -function checkForUpdates() -{ - var um = - Components.classes["@mozilla.org/updates/update-manager;1"]. - getService(Components.interfaces.nsIUpdateManager); - var prompter = - Components.classes["@mozilla.org/updates/update-prompt;1"]. - createInstance(Components.interfaces.nsIUpdatePrompt); - - // If there's an update ready to be applied, show the "Update Downloaded" - // UI instead and let the user know they have to restart the browser for - // the changes to be applied. - if (um.activeUpdate && um.activeUpdate.state == "pending") - prompter.showUpdateDownloaded(um.activeUpdate); - else - prompter.checkForUpdates(); -} -#endif - /** * Opens the troubleshooting information (about:support) page for this version * of the application. -- cgit v1.2.3 From 8906ccd05ee2d59e85cc6262c775b924ff0347ae Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Sat, 9 Feb 2019 14:05:34 -0500 Subject: Pale Moon: Add loop context menu to HTML5 media elements. --- application/palemoon/base/content/browser-context.inc | 5 +++++ application/palemoon/base/content/nsContextMenu.js | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser-context.inc b/application/palemoon/base/content/browser-context.inc index f672ede61..8ef376999 100644 --- a/application/palemoon/base/content/browser-context.inc +++ b/application/palemoon/base/content/browser-context.inc @@ -99,6 +99,11 @@ oncommand="gContextMenu.mediaCommand('playbackRate', 2.0);"/> + Date: Sun, 10 Feb 2019 11:24:27 -0500 Subject: Rename mediaPlaybackRate to mediaPlaybackRate2. --- application/palemoon/base/content/browser-context.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser-context.inc b/application/palemoon/base/content/browser-context.inc index 8ef376999..38c472508 100644 --- a/application/palemoon/base/content/browser-context.inc +++ b/application/palemoon/base/content/browser-context.inc @@ -70,7 +70,7 @@ label="&mediaUnmute.label;" accesskey="&mediaUnmute.accesskey;" oncommand="gContextMenu.mediaCommand('unmute');"/> - + Date: Tue, 12 Feb 2019 16:13:57 +0100 Subject: Add "check for updates" to main menu and AppMenu v2 Tag #963. --- .../palemoon/base/content/baseMenuOverlay.xul | 10 +- .../palemoon/base/content/browser-appmenu.inc | 9 +- .../palemoon/base/content/utilityOverlay.js | 111 +++++++++++++++++++++ 3 files changed, 128 insertions(+), 2 deletions(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul index e9019dc55..d7c983671 100644 --- a/application/palemoon/base/content/baseMenuOverlay.xul +++ b/application/palemoon/base/content/baseMenuOverlay.xul @@ -41,7 +41,7 @@ label="&helpMenu.label;" accesskey="&helpMenu.accesskey;"> #endif - + + + +#else + hidden="true"/> +#endif - + +#ifdef MOZ_UPDATER + + +#endif Date: Wed, 13 Feb 2019 09:23:25 +0100 Subject: Treat aContext as a bitfield in openURI. Potential fix for #971 --- application/palemoon/base/content/browser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index eb4916e37..3feeef9b6 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -4408,7 +4408,13 @@ nsBrowserAccess.prototype = { openURI: function (aURI, aOpener, aWhere, aContext) { var newWindow = null; - var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL); + var isExternal = !!(aContext & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL); + + if (aOpener && isExternal) { + Cu.reportError("nsBrowserAccess.openURI did not expect an opener to be " + + "passed if the context is OPEN_EXTERNAL."); + throw Cr.NS_ERROR_FAILURE; + } if (isExternal && aURI && aURI.schemeIs("chrome")) { dump("use -chrome command-line option to load external chrome urls\n"); -- cgit v1.2.3 From c962e2051a1f3767a221254487bcfc6d53aa59a1 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 28 Feb 2019 10:02:19 +0100 Subject: WIP fix 1 --- application/palemoon/base/content/browser.js | 5 +++++ application/palemoon/base/content/tabbrowser.xml | 5 ++++- application/palemoon/base/content/urlbarBindings.xml | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 3feeef9b6..4e753d422 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -2661,6 +2661,11 @@ function getWebNavigation() } function BrowserReloadWithFlags(reloadFlags) { + + // Reset DOS mitigation for auth prompts when user initiates a reload. + let browser = gBrowser.selectedBrowser; + delete browser.authPromptCounter; + /* First, we'll try to use the session history object to reload so * that framesets are handled properly. If we're in a special * window (such as view-source) that has no session history, fall diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index 988cae55c..c3b4872db 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -2458,7 +2458,10 @@ diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml index d188e6658..d2d9cc720 100644 --- a/application/palemoon/base/content/urlbarBindings.xml +++ b/application/palemoon/base/content/urlbarBindings.xml @@ -302,6 +302,10 @@ // but don't let that interfere with the loading of the url. Cu.reportError(ex); } + + // Reset DOS mitigations for the basic auth prompt. + let browser = gBrowser.selectedBrowser; + delete browser.authPromptCounter; function loadCurrent() { let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP; -- cgit v1.2.3 From c1ece93c2be6fb571a013f9735dc629d7279f389 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 1 Mar 2019 14:01:09 +0100 Subject: Make the Auth prompt DOS protection a browser-element opt-in feature. --- application/palemoon/base/content/browser.xul | 3 ++- application/palemoon/base/content/tabbrowser.xml | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'application/palemoon/base') diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul index ce2a7c5a8..ddc305a7b 100644 --- a/application/palemoon/base/content/browser.xul +++ b/application/palemoon/base/content/browser.xul @@ -965,7 +965,8 @@ tabcontainer="tabbrowser-tabs" contentcontextmenu="contentAreaContextMenu" autocompletepopup="PopupAutoComplete" - datetimepicker="DateTimePickerPanel"/> + datetimepicker="DateTimePickerPanel" + authdosprotected="true"/>