Bug 693099 - "Save Snapshot As" option on HTML5 videos creates PNG files with .JPG file extension. r=sparky
authorJustin Dolske <dolske@mozilla.com>
Tue, 11 Oct 2011 00:14:27 -0700
changeset 78981 ccea01542d0b174ddec140a061c7df70f9958055
parent 78951 b0e79255fa97e9dc415cdd86d7e4c47609ea4fe8
child 79017 568821b5cdcac68bf945f0f0be29c1bf1e0bc1b7
push idunknown
push userunknown
push dateunknown
reviewerssparky
bugs693099
milestone10.0a1
Bug 693099 - "Save Snapshot As" option on HTML5 videos creates PNG files with .JPG file extension. r=sparky
browser/base/content/nsContextMenu.js
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -849,17 +849,17 @@ nsContextMenu.prototype = {
     if (!name)
       name = "snapshot.jpg";
     var video = this.target;
     var canvas = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
     canvas.width = video.videoWidth;
     canvas.height = video.videoHeight;
     var ctxDraw = canvas.getContext("2d");
     ctxDraw.drawImage(video, 0, 0);
-    saveImageURL(canvas.toDataURL("image/jpg", ""), name, "SaveImageTitle", true, false, document.documentURIObject);
+    saveImageURL(canvas.toDataURL("image/jpeg", ""), name, "SaveImageTitle", true, false, document.documentURIObject);
   },
 
   fullScreenVideo: function () {
     this.target.pause();
 
     openDialog("chrome://browser/content/fullscreen-video.xhtml",
                "", "chrome,centerscreen,dialog=no", this.target);
   },