Bug 1595424 - Remove unused openTopWin function. r=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Tue, 19 Nov 2019 11:46:55 +0100
changeset 37556 79b9ad5996317355faf3f9f3aa8fac195e617bcf
parent 37555 122d65278cfe3f6080ed2b8e3aee219552a1db73
child 37557 64db1243761683963ff18fb414b61cf5ad9f2edc
push id396
push userclokep@gmail.com
push dateMon, 06 Jan 2020 23:11:57 +0000
reviewersIanN
bugs1595424
Bug 1595424 - Remove unused openTopWin function. r=IanN
suite/base/content/utilityOverlay.js
--- a/suite/base/content/utilityOverlay.js
+++ b/suite/base/content/utilityOverlay.js
@@ -597,48 +597,16 @@ function isRestricted( url )
     return Cc["@mozilla.org/network/util;1"]
              .getService(Ci.nsINetUtil)
              .URIChainHasFlags(uri, URI_INHERITS_SECURITY_CONTEXT);
   } catch (e) {
     return false;
   }
 }
 
-function openTopWin( url, opener )
-{
-    /* note that this chrome url should probably change to not have
-       all of the navigator controls, but if we do this we need to have
-       the option for chrome controls because goClickThrobber() needs to
-       use this function with chrome controls */
-    /* also, do we want to
-       limit the number of help windows that can be spawned? */
-    if ((url == null) || (url == "")) return null;
-
-    // avoid loading "", since this loads a directory listing
-    if (url == "") {
-        url = "about:blank";
-    }
-
-    var topWindowOfType = getTopWin();
-    if ( topWindowOfType )
-    {
-        if (!opener || !isRestricted(url))
-            topWindowOfType.loadURI(url);
-        else if (topWindowOfType.content == opener.top)
-            opener.open(url, "_top");
-        else
-            topWindowOfType.getBrowser().loadURIWithFlags(url,
-                Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL);
-
-        topWindowOfType.content.focus();
-        return topWindowOfType;
-    }
-    return window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url );
-}
-
 function goAbout(aProtocol)
 {
   var target;
   var url = "about:" + (aProtocol || "");
   var defaultAboutState = Services.prefs.getIntPref("browser.link.open_external");
 
   switch (defaultAboutState) {
   case kNewWindow: