From b702c9adcae7234c3806a9c1fd3414ff8ecef066 Mon Sep 17 00:00:00 2001 From: JustOff Date: Tue, 17 Apr 2018 23:16:20 +0300 Subject: Use asyncOpen2 instead of asyncOpen everywhere in Pale Moon --- .../palemoon/components/feeds/FeedConverter.js | 2 +- application/palemoon/components/feeds/FeedWriter.js | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'application') diff --git a/application/palemoon/components/feeds/FeedConverter.js b/application/palemoon/components/feeds/FeedConverter.js index 75115cc94..d0f573774 100644 --- a/application/palemoon/components/feeds/FeedConverter.js +++ b/application/palemoon/components/feeds/FeedConverter.js @@ -260,7 +260,7 @@ FeedConverter.prototype = { } chromeChannel.loadGroup = this._request.loadGroup; - chromeChannel.asyncOpen(this._listener, null); + chromeChannel.asyncOpen2(this._listener); } finally { this._releaseHandles(); diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js index 28cf582c2..cbb146564 100644 --- a/application/palemoon/components/feeds/FeedWriter.js +++ b/application/palemoon/components/feeds/FeedWriter.js @@ -9,6 +9,7 @@ const Cr = Components.results; const Cu = Components.utils; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); +Cu.import("resource://gre/modules/NetUtil.jsm"); const FEEDWRITER_CID = Components.ID("{49bb6593-3aff-4eb3-a068-2712c28bd58e}"); const FEEDWRITER_CONTRACTID = "@mozilla.org/browser/feeds/result-writer;1"; @@ -1137,16 +1138,14 @@ FeedWriter.prototype = { var nullPrincipal = Cc["@mozilla.org/nullprincipal;1"]. createInstance(Ci.nsIPrincipal); - var resolvedURI = Cc["@mozilla.org/network/io-service;1"]. - getService(Ci.nsIIOService). - newChannel2("about:feeds", - null, - null, - null, // aLoadingNode - nullPrincipal, - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_OTHER).URI; + // this channel is not going to be openend, use a nullPrincipal + // and the most restrctive securityFlag. + let resolvedURI = NetUtil.newChannel({ + uri: "about:feeds", + loadingPrincipal: nullPrincipal, + securityFlags: Ci.nsILoadInfo.SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED, + contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER + }).URI; if (resolvedURI.equals(chan.URI)) return chan.originalURI; -- cgit v1.2.3 From 8361c83e41cb4b2306010e3a77836769f0423328 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 18 Apr 2018 10:57:23 +0200 Subject: Add extra JS scope for DownloadUtils in urlbarBinding.xml to cater to global lexical scope. --- application/palemoon/base/content/urlbarBindings.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'application') diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml index 6b4350f99..330a1b28a 100644 --- a/application/palemoon/base/content/urlbarBindings.xml +++ b/application/palemoon/base/content/urlbarBindings.xml @@ -990,9 +990,11 @@ document.getAnonymousElementByAttribute(this, "anonid", "cancel"); - let utils = {}; - Components.utils.import("resource://gre/modules/DownloadUtils.jsm", utils); - utils.DownloadUtils; + { + let utils = {}; + Components.utils.import("resource://gre/modules/DownloadUtils.jsm", utils); + utils.DownloadUtils; + } -- cgit v1.2.3 From 8058e08926afc5ec6528d233cf8cc5f7404dad38 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 18 Apr 2018 07:22:38 -0400 Subject: [PALEMOON] Only use the private autocomplete binding on the URL bar --- application/palemoon/base/content/autocomplete.xml | 46 ++++++++++----------- application/palemoon/base/content/browser.css | 40 +++++++++--------- application/palemoon/base/content/browser.xul | 4 +- .../palemoon/base/content/urlbarBindings.xml | 16 ++++---- application/palemoon/themes/linux/autocomplete.css | 46 ++++++++++----------- application/palemoon/themes/osx/autocomplete.css | 46 ++++++++++----------- .../palemoon/themes/windows/autocomplete.css | 48 +++++++++++----------- 7 files changed, 123 insertions(+), 123 deletions(-) (limited to 'application') diff --git a/application/palemoon/base/content/autocomplete.xml b/application/palemoon/base/content/autocomplete.xml index 3cb80b19d..9291b205b 100644 --- a/application/palemoon/base/content/autocomplete.xml +++ b/application/palemoon/base/content/autocomplete.xml @@ -3,13 +3,13 @@ - 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/. --> - - @@ -17,25 +17,25 @@ - + - + - - - + @@ -656,7 +656,7 @@ - + @@ -664,11 +664,11 @@ - + - + - + @@ -718,7 +718,7 @@ - null @@ -1010,14 +1010,14 @@ extends="chrome://global/content/bindings/popup.xml#popup"> - + - + @@ -1270,7 +1270,7 @@ extends="chrome://global/content/bindings/popup.xml#popup"> else { // set the class at the end so we can use the attributes // in the xbl constructor - item.className = "autocomplete-richlistitem"; + item.className = "private-autocomplete-richlistitem"; this.richlistbox.appendChild(item); } @@ -1322,7 +1322,7 @@ extends="chrome://global/content/bindings/popup.xml#popup"> - + @@ -2015,16 +2015,16 @@ extends="chrome://global/content/bindings/popup.xml#popup"> - + - + - + Date.now() -1 @@ -2068,7 +2068,7 @@ extends="chrome://global/content/bindings/popup.xml#popup"> - + Date.now() @@ -2093,7 +2093,7 @@ extends="chrome://global/content/bindings/popup.xml#popup"> - + @@ -2102,7 +2102,7 @@ extends="chrome://global/content/bindings/popup.xml#popup"> - + richlistbox > richlistitem[type~="action"] > .ac-url-box > .a visibility: hidden; } -/* Override xul.css for autocomplete bindings and css */ -textbox[type="autocomplete"] { +/* Private Autocomplete */ +textbox[type="private-autocomplete"] { -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete"); } -panel[type="autocomplete"] { +panel[type="private-autocomplete"] { -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete-result-popup"); } -panel[type="autocomplete-richlistbox"] { - -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete-rich-result-popup"); +panel[type="private-autocomplete-richlistbox"] { + -moz-binding: url("chrome://browser/content/autocomplete.xml#private-autocomplete-rich-result-popup"); } -/* FIXME: bug 616258 */ - -.autocomplete-tree { - -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete-tree"); +.private-autocomplete-tree { + -moz-binding: url("chrome://browser/content/autocomplete.xml#private-autocomplete-tree"); -moz-user-focus: ignore; } -.autocomplete-treebody { - -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete-treebody"); +.private-autocomplete-treebody { + -moz-binding: url("chrome://browser/content/autocomplete.xml#private-autocomplete-treebody"); } -.autocomplete-richlistbox { - -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete-richlistbox"); +.private-autocomplete-richlistbox { + -moz-binding: url("chrome://browser/content/autocomplete.xml#private-autocomplete-richlistbox"); -moz-user-focus: ignore; } -.autocomplete-richlistbox > scrollbox { +.private-autocomplete-richlistbox > scrollbox { overflow-x: hidden !important; } -.autocomplete-richlistitem { - -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete-richlistitem"); +.private-autocomplete-richlistitem { + -moz-binding: url("chrome://browser/content/autocomplete.xml#private-autocomplete-richlistitem"); -moz-box-orient: vertical; overflow: -moz-hidden-unscrollable; } -.autocomplete-treerows { - -moz-binding: url("chrome://browser/content/autocomplete.xml#autocomplete-treerows"); +.private-autocomplete-treerows { + -moz-binding: url("chrome://browser/content/autocomplete.xml#private-autocomplete-treerows"); } -.autocomplete-history-dropmarker { +.private-autocomplete-history-dropmarker { display: none; } -.autocomplete-history-dropmarker[enablehistory="true"] { +.private-autocomplete-history-dropmarker[enablehistory="true"] { display: -moz-box; - -moz-binding: url("chrome://browser/content/autocomplete.xml#history-dropmarker"); + -moz-binding: url("chrome://browser/content/autocomplete.xml#private-history-dropmarker"); } .ac-ellipsis-after { diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul index ea9c3f969..11c4f16f9 100644 --- a/application/palemoon/base/content/browser.xul +++ b/application/palemoon/base/content/browser.xul @@ -128,9 +128,11 @@