[Pkg-mozext-commits] [tabmixplus] 10/56: Follow up bug 1178337 - Part 1: Supports all referrer policies for element atrributes
David Prévot
taffit at moszumanska.debian.org
Mon Jun 6 00:02:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 32bc1b4048360b2c5457dbb4f88dc84fd5815b5b
Author: onemen <tabmix.onemen at gmail.com>
Date: Thu Apr 28 22:13:10 2016 +0300
Follow up bug 1178337 - Part 1: Supports all referrer policies for element atrributes
---
chrome/content/content.js | 3 ++-
modules/SingleWindowModeUtils.jsm | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/chrome/content/content.js b/chrome/content/content.js
index 029a1c3..2e3f349 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -206,7 +206,8 @@ TabmixClickEventHandler = {
node) {
let value = node.getAttribute(TabmixSvc.version(450) ? "referrerpolicy" : "referrer");
let referrerAttrValue = Services.netUtils.parseAttributePolicyString(value);
- if (referrerAttrValue !== Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT) {
+ let policy = TabmixSvc.version(490) ? "REFERRER_POLICY_UNSET" : "REFERRER_POLICY_DEFAULT";
+ if (referrerAttrValue !== Ci.nsIHttpChannel[policy]) {
referrerPolicy = referrerAttrValue;
}
}
diff --git a/modules/SingleWindowModeUtils.jsm b/modules/SingleWindowModeUtils.jsm
index 7e8292d..7a5ae16 100644
--- a/modules/SingleWindowModeUtils.jsm
+++ b/modules/SingleWindowModeUtils.jsm
@@ -95,10 +95,17 @@ this.SingleWindowModeUtils = {
var existingBrowser = existingWindow.gBrowser;
existingWindow.tablib.init(); // just in case tablib isn't init yet
var uriToLoad = args[0];
+
var urls = [];
var params = {
referrerURI: null,
- referrerPolicy: TabmixSvc.version(390) && Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT,
+ referrerPolicy: (function() {
+ if (TabmixSvc.version(390)) {
+ let policy = TabmixSvc.version(490) ? "REFERRER_POLICY_UNSET" : "REFERRER_POLICY_DEFAULT";
+ return Ci.nsIHttpChannel[policy];
+ }
+ return null;
+ }()),
postData: null,
allowThirdPartyFixup: false
};
--
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