Bug 497098: add imageURL getter to nsContextMenu for extension compat, r=gavin
authorMark Finkle <mark.finkle@gmail.com>
Tue, 09 Jun 2009 21:59:18 -0400
changeset 29012 5bb2498771c4c4466f851a952e56ce386ec18278
parent 29011 5d1bf7e2c8dd5bb3169db52d729f60f9108c6535
child 29013 5973b78bae55b623f0836baac79ab7fb464836e3
push id7371
push usergsharp@mozilla.com
push dateWed, 10 Jun 2009 01:59:21 +0000
treeherderautoland@5bb2498771c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs497098
milestone1.9.2a1pre
Bug 497098: add imageURL getter to nsContextMenu for extension compat, r=gavin
browser/base/content/nsContextMenu.js
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1397,10 +1397,16 @@ nsContextMenu.prototype = {
         break;
     }
   },
 
   copyMediaLocation : function () {
     var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
                     getService(Ci.nsIClipboardHelper);
     clipboard.copyString(this.mediaURL);
+  },
+
+  get imageURL() {
+    if (this.onImage)
+      return this.mediaURL;
+    return "";
   }
 };