Bug 1595424 - Replace remaining openTopWin calls in SeaMonkey. r=IanN a=IanN CLOSED TREE
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Tue, 19 Nov 2019 17:50:29 +0100
changeset 32369 e0970057c304ce9c645f1107cb224c297202cd98
parent 32368 78af4c1422a872a7c3c53ca7fcdec32f0719fe2c
child 32370 82d3335dc616590cf8a2802c190f03923ac9dd8b
push id230
push userfrgrahl@gmx.net
push dateTue, 19 Nov 2019 16:51:10 +0000
treeherdercomm-esr60@232db96d678a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1595424
Bug 1595424 - Replace remaining openTopWin calls in SeaMonkey. r=IanN a=IanN CLOSED TREE
suite/base/content/nsContextMenu.js
suite/base/content/viewApplyThemeOverlay.js
--- a/suite/base/content/nsContextMenu.js
+++ b/suite/base/content/nsContextMenu.js
@@ -1060,17 +1060,23 @@ nsContextMenu.prototype = {
 
   printFrame: function() {
     PrintUtils.printWindow(gContextMenuContentData.frameOuterWindowID,
                            this.browser);
   },
 
   // Open clicked-in frame in the same window
   showOnlyThisFrame: function() {
-    openTopWin( this.target.ownerDocument.location.href, this.target.ownerDocument.defaultView );
+    urlSecurityCheck(gContextMenuContentData.docLocation,
+                     this.principal,
+                     Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
+    let referrer = gContextMenuContentData.referrer;
+    openUILinkIn(gContextMenuContentData.docLocation, "current",
+                 { disallowInheritPrincipal: true,
+                   referrerURI: referrer ? makeURI(referrer) : null });
   },
 
   // View Partial Source
   viewPartialSource: function(aContext) {
     var browser = getBrowser().selectedBrowser;
     var target = aContext == "mathml" ? this.target : null;
     gViewSourceUtils.viewPartialSourceInBrowser(browser, target, null);
   },
--- a/suite/base/content/viewApplyThemeOverlay.js
+++ b/suite/base/content/viewApplyThemeOverlay.js
@@ -32,28 +32,28 @@ var gAddonListener = {
   onUninstalled: reloadThemes,
   onOperationCancelled: reloadThemes
 };
 
 function getNewThemes()
 {
   // get URL for more themes from prefs
   try {
-    openTopWin(Services.urlFormatter.formatURLPref("extensions.getMoreThemesURL"));
+    openURL(Services.urlFormatter.formatURLPref("extensions.getMoreThemesURL"));
   }
   catch (e) {
     dump(e);
   }
 }
 
 function getPersonas()
 {
   // get URL for more themes from prefs
   try {
-    openTopWin(Services.urlFormatter.formatURLPref("extensions.getPersonasURL"));
+    openURL(Services.urlFormatter.formatURLPref("extensions.getPersonasURL"));
   }
   catch (e) {
     dump(e);
   }
 }
 
 function checkTheme(popup)
 {