Bug 1103203 - rm visitLink, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 24 Nov 2014 15:15:40 +0000
changeset 217204 313043e41d71ed332f9ecd12cd5ec55ef6d4d910
parent 217203 cbda402629674b14325a27cdb886606cea43afa5
child 217205 279e0f4d0262f530b9cdc1eb7fa88ce24731d6ba
push id27875
push userkwierso@gmail.com
push dateTue, 25 Nov 2014 00:28:08 +0000
treeherdermozilla-central@4771d3210ca2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1103203
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1103203 - rm visitLink, r=jaws
toolkit/content/globalOverlay.js
--- a/toolkit/content/globalOverlay.js
+++ b/toolkit/content/globalOverlay.js
@@ -143,44 +143,16 @@ function goOnEvent(aNode, aEvent)
 
   for (var controllerIndex = 0; controllerIndex < numControllers; controllerIndex++) {
     controller = aNode.controllers.getControllerAt(controllerIndex);
     if (controller)
       controller.onEvent(aEvent);
   }
 }
 
-function visitLink(aEvent) {
-  var node = aEvent.target;
-  while (node.nodeType != Node.ELEMENT_NODE)
-    node = node.parentNode;
-  var url = node.getAttribute("link");
-  if (!url)
-    return;
-
-  var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
-                              .getService(Components.interfaces.nsIExternalProtocolService);
-  var ioService = Components.classes["@mozilla.org/network/io-service;1"]
-                            .getService(Components.interfaces.nsIIOService);
-  var uri = ioService.newURI(url, null, null);
-
-  // if the scheme is not an exposed protocol, then opening this link
-  // should be deferred to the system's external protocol handler
-  if (protocolSvc.isExposedProtocol(uri.scheme)) {
-    var win = window.top;
-    if (win instanceof Components.interfaces.nsIDOMChromeWindow) {
-      while (win.opener && !win.opener.closed)
-        win = win.opener;
-    }
-    win.open(uri.spec);
-  }
-  else
-    protocolSvc.loadUrl(uri);
-}
-
 function setTooltipText(aID, aTooltipText)
 {
   var element = document.getElementById(aID);
   if (element)
     element.setAttribute("tooltiptext", aTooltipText);
 }
 
 this.__defineGetter__("NS_ASSERT", function() {