Bug 219821 - can't open a 'news:' URI in new tab/window (enable Open Link in New Tab/Window context menu entries for news URLs) r=neil a=callek
authorIan Neal <iann_cvs@blueyonder.co.uk>
Mon, 05 Sep 2011 22:44:03 +0100
changeset 8430 5d79475fb1889f3f5e228836a62fc9115dd8575d
parent 8424 e2ce5e42bbb85baa7a5d64325ccdc667f8c9d127
child 8431 54f2d228378ebddaac4a47f93da16e219f50b22c
push id110
push useriann_cvs@blueyonder.co.uk
push dateMon, 05 Sep 2011 21:44:18 +0000
treeherdercomm-beta@5d79475fb188 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil, callek
bugs219821
Bug 219821 - can't open a 'news:' URI in new tab/window (enable Open Link in New Tab/Window context menu entries for news URLs) r=neil a=callek
suite/common/nsContextMenu.js
--- a/suite/common/nsContextMenu.js
+++ b/suite/common/nsContextMenu.js
@@ -687,23 +687,18 @@ nsContextMenu.prototype = {
     for (var i = 0; i < url.length; i++)
       if (url[i].primitiveType == CSSPrimitiveValue.CSS_URI)
         return url[i].getStringValue();
     return null;
   },
 
   // Returns true if clicked-on link targets a resource that can be saved.
   isLinkSaveable: function() {
-    // We don't do the Right Thing for news/snews yet, so turn them off
-    // until we do.
-    return this.linkProtocol && !(
-           this.linkProtocol == "mailto"     ||
-           this.linkProtocol == "javascript" ||
-           this.linkProtocol == "news"       ||
-           this.linkProtocol == "snews"      );
+    return this.linkProtocol && this.linkProtocol != "mailto" &&
+           this.linkProtocol != "javascript";
   },
 
   // Block popup windows
   rejectPopupWindows: function(aAndClose) {
     const PM = Components.classes["@mozilla.org/PopupWindowManager;1"]
                .getService(Components.interfaces.nsIPopupWindowManager);
     PM.add(this.popupURL, false);
     if (aAndClose)