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 25921 9732452737d87c69c8bf5daa3bb469e5ffda054c
parent 25920 c1a7081602682ef4e631355439992bde010d374e
child 25922 cf479e101ec275144e1e3e855288ac0abcfd2654
push id1673
push usergsharp@mozilla.com
push dateWed, 10 Jun 2009 03:01:49 +0000
reviewersgavin
bugs497098
milestone1.9.1pre
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 "";
   }
 };