summaryrefslogtreecommitdiffstats
path: root/application/palemoon
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2019-05-23 13:29:20 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2019-05-23 13:29:20 +0800
commit797697e26d43b69342bdffd05575133fe8484d87 (patch)
tree2db8985b833532a55884624c474e3db97a4e12e6 /application/palemoon
parentf9dc4e8ccdc2a582cefff9e5389995ab73e7a420 (diff)
downloadUXP-797697e26d43b69342bdffd05575133fe8484d87.tar
UXP-797697e26d43b69342bdffd05575133fe8484d87.tar.gz
UXP-797697e26d43b69342bdffd05575133fe8484d87.tar.lz
UXP-797697e26d43b69342bdffd05575133fe8484d87.tar.xz
UXP-797697e26d43b69342bdffd05575133fe8484d87.zip
Issue #1104 - Set the browser's opener when adding a new tab
- This modifies `loadOneTab` and `addTab` to accept an opener - This code was adapted from Basilisk's copy of tabbrowser.xml without the refactored code changes (which is a lot more involved as it divides addTab's functions into multiple functions)
Diffstat (limited to 'application/palemoon')
-rw-r--r--application/palemoon/base/content/tabbrowser.xml11
1 files changed, 10 insertions, 1 deletions
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index aa1a89200..b5edd54b7 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -1337,6 +1337,7 @@
var aFromExternal;
var aRelatedToCurrent;
var aOriginPrincipal;
+ var aOpener;
if (arguments.length == 2 &&
typeof arguments[1] == "object" &&
!(arguments[1] instanceof Ci.nsIURI)) {
@@ -1351,6 +1352,7 @@
aFromExternal = params.fromExternal;
aRelatedToCurrent = params.relatedToCurrent;
aOriginPrincipal = params.originPrincipal;
+ aOpener = params.opener;
}
var bgLoad = (aLoadInBackground != null) ? aLoadInBackground :
@@ -1366,7 +1368,8 @@
allowThirdPartyFixup: aAllowThirdPartyFixup,
fromExternal: aFromExternal,
originPrincipal: aOriginPrincipal,
- relatedToCurrent: aRelatedToCurrent});
+ relatedToCurrent: aRelatedToCurrent,
+ opener: aOpener });
if (!bgLoad)
this.selectedTab = tab;
@@ -1489,6 +1492,7 @@
var aSkipAnimation;
var aOriginPrincipal;
var aSkipBackgroundNotify;
+ var aOpener;
if (arguments.length == 2 &&
typeof arguments[1] == "object" &&
!(arguments[1] instanceof Ci.nsIURI)) {
@@ -1504,6 +1508,7 @@
aRelatedToCurrent = params.relatedToCurrent;
aSkipAnimation = params.skipAnimation;
aOriginPrincipal = params.originPrincipal;
+ aOpener = params.opener;
aSkipBackgroundNotify = params.skipBackgroundNotify;
}
@@ -1578,6 +1583,10 @@
b.setAttribute("showresizer", "true");
}
+ if (aOpener) {
+ b.QueryInterface(Ci.nsIFrameLoaderOwner).presetOpenerWindow(aOpener);
+ }
+
if (this.hasAttribute("autocompletepopup"))
b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
b.setAttribute("autoscrollpopup", this._autoScrollPopup.id);