Bug 461810 - Video content menu should operate on .currentSrc, not .src. r=gavin
authorJustin Dolske <dolske@mozilla.com>
Tue, 28 Oct 2008 11:52:04 -0700
changeset 21007 831818cf28652aa411c0127fad2b3a8ebdba85ee
parent 21006 bb3a920e7cfe40bc69129859007e5d757a820fcb
child 21008 860d0f29f0be1bca33fa6df79386b7e76a509800
push idunknown
push userunknown
push dateunknown
reviewersgavin
bugs461810
milestone1.9.1b2pre
Bug 461810 - Video content menu should operate on .currentSrc, not .src. r=gavin
browser/base/content/nsContextMenu.js
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -458,21 +458,21 @@ nsContextMenu.prototype = {
         if (this.target.ownerDocument instanceof ImageDocument)
           this.onStandaloneImage = true;
       }
       else if (this.target instanceof HTMLCanvasElement) {
         this.onCanvas = true;
       }
       else if (this.target instanceof HTMLVideoElement) {
         this.onVideo = true;
-        this.mediaURL = this.target.src;
+        this.mediaURL = this.target.currentSrc;
       }
       else if (this.target instanceof HTMLAudioElement) {
         this.onAudio = true;
-        this.mediaURL = this.target.src;
+        this.mediaURL = this.target.currentSrc;
       }
       else if (this.target instanceof HTMLInputElement ) {
         this.onTextInput = this.isTargetATextBox(this.target);
         // allow spellchecking UI on all writable text boxes except passwords
         if (this.onTextInput && ! this.target.readOnly &&
             this.target.type != "password") {
           this.possibleSpellChecking = true;
           InlineSpellCheckerUI.init(this.target.QueryInterface(Ci.nsIDOMNSEditableElement).editor);