Backed out changeset 15e478e4abd8
authorDão Gottwald <dao@mozilla.com>
Wed, 27 Jan 2010 13:26:21 +0100
changeset 37541 e5210d6b9e7cf9e4da64cc9593ec0d25591f9136
parent 37399 15e478e4abd8bb33679ebdd0dc9c512ba9a0476e
child 37542 51caa47ea5bd9d657af20e7eb5cd32df375b588a
push id11367
push userdgottwald@mozilla.com
push dateWed, 27 Jan 2010 12:29:58 +0000
treeherdermozilla-central@3cdf3bd2608c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.3a1pre
backs out15e478e4abd8bb33679ebdd0dc9c512ba9a0476e
Backed out changeset 15e478e4abd8
browser/base/content/browser-context.inc
browser/base/content/nsContextMenu.js
browser/base/content/test/test_contextmenu.html
browser/locales/en-US/chrome/browser/browser.dtd
--- a/browser/base/content/browser-context.inc
+++ b/browser/base/content/browser-context.inc
@@ -72,20 +72,16 @@
       <menuitem id="context-copyemail"
                 label="&copyEmailCmd.label;"
                 accesskey="&copyEmailCmd.accesskey;"
                 oncommand="gContextMenu.copyEmail();"/>
       <menuitem id="context-copylink"
                 label="&copyLinkCmd.label;"
                 accesskey="&copyLinkCmd.accesskey;"
                 oncommand="goDoCommand('cmd_copyLink');"/>
-      <menuitem id="context-copylinktext"
-                label="&copyLinkText2Cmd.label;"
-                accesskey="&copyLinkText2Cmd.accesskey;"
-                oncommand="gContextMenu.copyLinkText();"/>
       <menuseparator id="context-sep-copylink"/>
       <menuitem id="context-media-play"
                 label="&mediaPlay.label;"
                 accesskey="&mediaPlay.accesskey;"
                 oncommand="gContextMenu.mediaCommand('play');"/>
       <menuitem id="context-media-pause"
                 label="&mediaPause.label;"
                 accesskey="&mediaPause.accesskey;"
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -433,18 +433,16 @@ nsContextMenu.prototype = {
     // nsDocumentViewer.cpp has code to determine whether we're
     // on a link or an image. we really ought to be using that...
 
     // Copy email link depends on whether we're on an email link.
     this.showItem("context-copyemail", this.onMailtoLink);
 
     // Copy link location depends on whether we're on a non-mailto link.
     this.showItem("context-copylink", this.onLink && !this.onMailtoLink);
-    this.showItem("context-copylinktext",
-                  this.onLink && !this.onImage && !this.isTextSelected);
     this.showItem("context-sep-copylink", this.onLink &&
                   (this.onImage || this.onVideo || this.onAudio));
 
 #ifdef CONTEXT_COPY_IMAGE_CONTENTS
     // Copy image contents depends on whether we're on an image.
     this.showItem("context-copyimage-contents", this.onImage);
 #endif
     // Copy image location depends on whether we're on an image.
@@ -1175,24 +1173,16 @@ nsContextMenu.prototype = {
       // Do nothing.
     }
 
     var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
                     getService(Ci.nsIClipboardHelper);
     clipboard.copyString(addresses);
   },
 
-  copyLinkText: function() {
-    let text = this.linkText();
-
-    let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
-                    getService(Ci.nsIClipboardHelper);
-    clipboard.copyString(text);
-  },
-
   ///////////////
   // Utilities //
   ///////////////
 
   // Show/hide one item (specified via name or the item element itself).
   showItem: function(aItemOrId, aShow) {
     var item = aItemOrId.constructor == String ?
       document.getElementById(aItemOrId) : aItemOrId;
--- a/browser/base/content/test/test_contextmenu.html
+++ b/browser/base/content/test/test_contextmenu.html
@@ -168,26 +168,24 @@ function runTest(testNum) {
     case 3:
         // Context menu for text link
         checkContextMenu(["context-openlink",      true,
                           "context-openlinkintab", true,
                           "---",                   null,
                           "context-bookmarklink",  true,
                           "context-savelink",      true,
                           "context-sendlink",      true,
-                          "context-copylink",      true,
-                          "context-copylinktext",  true]);
+                          "context-copylink",      true]);
         closeContextMenu();
         openContextMenuFor(mailto); // Invoke context menu for next test.
         break;
 
     case 4:
         // Context menu for text mailto-link
-        checkContextMenu(["context-copyemail",    true,
-                          "context-copylinktext", true]);
+        checkContextMenu(["context-copyemail", true]);
         closeContextMenu();
         openContextMenuFor(input); // Invoke context menu for next test.
         break;
 
     case 5:
         // Context menu for text input field
         checkContextMenu(["context-undo",        false,
                           "---",                 null,
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -303,18 +303,16 @@
 <!ENTITY sendImageCmd.label           "Send Image…">
 <!ENTITY sendImageCmd.accesskey       "n">
 <!ENTITY sendVideoCmd.label           "Send Video…">
 <!ENTITY sendVideoCmd.accesskey       "n">
 <!ENTITY sendAudioCmd.label           "Send Audio…">
 <!ENTITY sendAudioCmd.accesskey       "n">
 <!ENTITY copyLinkCmd.label            "Copy Link Location">
 <!ENTITY copyLinkCmd.accesskey        "a">
-<!ENTITY copyLinkText2Cmd.label       "Copy Link Text">
-<!ENTITY copyLinkText2Cmd.accesskey   "x">
 <!ENTITY copyImageCmd.label           "Copy Image Location">
 <!ENTITY copyImageCmd.accesskey       "o">
 <!ENTITY copyImageContentsCmd.label   "Copy Image">
 <!ENTITY copyImageContentsCmd.accesskey  "y"> 
 <!ENTITY copyVideoURLCmd.label        "Copy Video Location">
 <!ENTITY copyVideoURLCmd.accesskey    "o">
 <!ENTITY copyAudioURLCmd.label        "Copy Audio Location">
 <!ENTITY copyAudioURLCmd.accesskey    "o">