[Pkg-mozext-commits] [tabmixplus] 129/147: Follow up bug 1344706 - Do not reuse originPrincipal as triggeringPrincipal within utilityOverlay.js and bug 1284395
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:27:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit b0ebdf5bffc87d10d286763d955440f06a3a5988
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Apr 12 14:13:07 2017 +0300
Follow up bug 1344706 - Do not reuse originPrincipal as triggeringPrincipal within utilityOverlay.js and bug 1284395
---
chrome/content/scripts/content.js | 5 +++++
modules/ContentClick.jsm | 2 ++
modules/SingleWindowModeUtils.jsm | 3 +++
3 files changed, 10 insertions(+)
diff --git a/chrome/content/scripts/content.js b/chrome/content/scripts/content.js
index 2519c3a..1a28fec 100644
--- a/chrome/content/scripts/content.js
+++ b/chrome/content/scripts/content.js
@@ -267,6 +267,10 @@ TabmixClickEventHandler = {
// for the case there is no href
let linkNode = href ? node : LinkNodeUtils.getNodeWithOnClick(event.target);
if (linkNode) {
+ if (!href) {
+ json.originPrincipal = ownerDoc.nodePrincipal;
+ json.triggeringPrincipal = ownerDoc.nodePrincipal;
+ }
linkNode = LinkNodeUtils.wrap(linkNode, TabmixUtils.focusedWindow(content),
href && event.button === 0);
}
@@ -328,6 +332,7 @@ TabmixClickEventHandler = {
}
}
json.originPrincipal = ownerDoc.nodePrincipal;
+ json.triggeringPrincipal = ownerDoc.nodePrincipal;
sendAsyncMessage("Content:Click", json);
return;
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 574c691..ebf81d4 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -197,7 +197,9 @@ ContentClickInternal = {
referrerURI: browser.documentURI,
referrerPolicy: event.referrerPolicy,
noReferrer: event.noReferrer,
+ originPrincipal: event.nodePrincipal,
triggeringPrincipal: event.triggeringPrincipal,
+ frameOuterWindowID: event.frameOuterWindowID,
isContentWindowPrivate: event.isContentWindowPrivate,
charset: browser.characterSet,
suppressTabsOnFileDownload: result.suppressTabsOnFileDownload
diff --git a/modules/SingleWindowModeUtils.jsm b/modules/SingleWindowModeUtils.jsm
index bfdd782..35bf1bb 100644
--- a/modules/SingleWindowModeUtils.jsm
+++ b/modules/SingleWindowModeUtils.jsm
@@ -168,6 +168,9 @@ this.SingleWindowModeUtils = {
if (TabmixSvc.version(500)) {
params.userContextId = args[6] != undefined ? args[6] :
Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID;
+ params.originPrincipal = args[7];
+ params.forceAboutBlankViewerInCurrent = Boolean(args[7]);
+ params.triggeringPrincipal = args[8];
}
urls = [uriToLoad];
} else {
--
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