[Pkg-mozext-commits] [tabmixplus] 108/147: Follow up bug 1190687 - [webext] webNavigation.onCreatedNavigationTarget on new windows/tabs from context menu and user clicks on links
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:27:42 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 7bb16794cae32929ad4649a6b2fdb948420dd394
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Mar 5 09:38:05 2017 +0200
Follow up bug 1190687 - [webext] webNavigation.onCreatedNavigationTarget on new windows/tabs from context menu and user clicks on links
---
chrome/content/places/places.js | 10 +++++++++-
chrome/content/scripts/content.js | 8 ++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index a9740f1..7ce4ec7 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -859,7 +859,15 @@ Tabmix.onContentLoaded = {
'let newWin = $&\n' +
' if (newWin && bookMarkId) {\n' +
' newWin.bookMarkIds = bookMarkId;\n' +
- ' }'
+ ' }',
+ {check: !Tabmix.isVersion(540)}
+ )._replace(
+ /win = Services.ww.openWindow[^;]*;/,
+ '$&\n' +
+ ' if (win && bookMarkId) {\n' +
+ ' win.bookMarkIds = bookMarkId;\n' +
+ ' }',
+ {check: Tabmix.isVersion(540)}
)._replace(
/(})(\)?)$/,
' const targetTab = where == "current" ?\n' +
diff --git a/chrome/content/scripts/content.js b/chrome/content/scripts/content.js
index 0a9cfef..a2dbbdf 100644
--- a/chrome/content/scripts/content.js
+++ b/chrome/content/scripts/content.js
@@ -237,6 +237,13 @@ TabmixClickEventHandler = {
}
}
+ let frameOuterWindowID;
+ if (TabmixSvc.version(540)) {
+ frameOuterWindowID = ownerDoc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDOMWindowUtils)
+ .outerWindowID;
+ }
+
let json = {
button: event.button,
shiftKey: event.shiftKey,
@@ -247,6 +254,7 @@ TabmixClickEventHandler = {
title: null,
bookmark: false,
referrerPolicy,
+ frameOuterWindowID,
triggeringPrincipal: principal,
originAttributes: principal ? principal.originAttributes : {},
isContentWindowPrivate: TabmixSvc.version(510) && PrivateBrowsingUtils.isContentWindowPrivate(ownerDoc.defaultView),
--
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