[Pkg-mozext-commits] [tabmixplus] 02/13: Follow up bug 1354331 - Remove network.http.enablePerElementReferrer usages
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:28:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 0.5.0.4pre.170525a1
in repository tabmixplus.
commit 221e8e293fd34129ee019c06d5f9a986f4e64827
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat May 6 09:04:54 2017 +0300
Follow up bug 1354331 - Remove network.http.enablePerElementReferrer usages
---
chrome/content/scripts/content.js | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/chrome/content/scripts/content.js b/chrome/content/scripts/content.js
index 1a28fec..f3999ab 100644
--- a/chrome/content/scripts/content.js
+++ b/chrome/content/scripts/content.js
@@ -222,13 +222,14 @@ TabmixClickEventHandler = {
let [href, node, principal] = this._hrefAndLinkNodeForClickEvent(event);
- // get referrer attribute from clicked link and parse it
- // if per element referrer is enabled, the element referrer overrules
- // the document wide referrer
+ // first get document wide referrer policy, then
+ // get referrer attribute from clicked link and parse it and
+ // allow per element referrer to overrule the document wide referrer if enabled
let referrerPolicy = TabmixSvc.version(380) ? ownerDoc.referrerPolicy : null;
- if (TabmixSvc.version(420) &&
- Services.prefs.getBoolPref("network.http.enablePerElementReferrer") &&
- node) {
+ let setReferrerPolicy = node && (TabmixSvc.version(550) ||
+ TabmixSvc.version(420) &&
+ Services.prefs.getBoolPref("network.http.enablePerElementReferrer"));
+ if (setReferrerPolicy) {
let value = node.getAttribute(TabmixSvc.version(450) ? "referrerpolicy" : "referrer");
let referrerAttrValue = Services.netUtils.parseAttributePolicyString(value);
let policy = TabmixSvc.version(490) ? "REFERRER_POLICY_UNSET" : "REFERRER_POLICY_DEFAULT";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list