[Pkg-mozext-commits] [firegestures] 02/07: [40.0a1] fix: 'Save Image' does not work

David Prévot taffit at moszumanska.debian.org
Wed Apr 15 16:19:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firegestures.

commit 9bad67d238c75d89e9fcbda3ae9335f5fe070969
Author: Gomita <gomita at xuldev.org>
Date:   Sat Apr 11 13:52:04 2015 +0900

    [40.0a1] fix: 'Save Image' does not work
---
 chrome/content/firegestures/browser.js | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/chrome/content/firegestures/browser.js b/chrome/content/firegestures/browser.js
index 464aa29..f962bb3 100644
--- a/chrome/content/firegestures/browser.js
+++ b/chrome/content/firegestures/browser.js
@@ -426,6 +426,7 @@ var FireGestures = {
 					throw this._getLocaleString("ERROR_NOT_ON_IMAGE");
 				var doc = this.sourceNode.ownerDocument;
 				var skipPrompt = aCommand == "FireGestures:SaveImageNow";
+				var refURI = this.isRemote ? makeURI(doc.location.href) : doc.documentURIObject;
 				if (this.sourceNode instanceof HTMLVideoElement || 
 				    this.sourceNode instanceof HTMLAudioElement) {
 					// save video and audio
@@ -437,14 +438,12 @@ var FireGestures = {
 				}
 				else if (this.sourceNode instanceof HTMLCanvasElement) {
 					// save canvas
-					saveImageURL(mediaURL, "canvas.png", "SaveImageTitle", 
-					             false, skipPrompt, doc.documentURIObject, doc);
+					saveImageURL(mediaURL, "canvas.png", "SaveImageTitle", false, skipPrompt, refURI, doc);
 				}
 				else {
 					// save image
 					this.checkURL(mediaURL, doc);
-					saveImageURL(mediaURL, null, "SaveImageTitle", 
-					             false, skipPrompt, doc.documentURIObject, doc);
+					saveImageURL(mediaURL, null, "SaveImageTitle", false, skipPrompt, refURI, doc);
 				}
 				break;
 			case "FireGestures:WebSearch": 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firegestures.git



More information about the Pkg-mozext-commits mailing list