Bug 1578084 - Add onCompletedImage to other context conditions. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Tue, 01 Oct 2019 16:39:56 +0200
changeset 27807 80b647910ff0037cf2b7022a705491b4dbdbf2e7
parent 27806 ba2b990c337c39e1f4e74f732e140983177d4bac
child 27808 8cb2fc11db8b1bd4796f8e5ae1c623c07e29179b
push id16496
push userfrgrahl@gmx.net
push dateTue, 01 Oct 2019 14:52:03 +0000
treeherdercomm-central@0e49bcfec167 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg
bugs1578084
Bug 1578084 - Add onCompletedImage to other context conditions. r=frg
suite/base/content/nsContextMenu.js
--- a/suite/base/content/nsContextMenu.js
+++ b/suite/base/content/nsContextMenu.js
@@ -196,17 +196,18 @@ nsContextMenu.prototype = {
     // Save/send link depends on whether we're in a link.
     if (this.onSaveableLink)
       goSetMenuValue("context-savelink",
                      this.autoDownload ? "valueSave" : "valueSaveAs");
     this.showItem("context-savelink", this.onSaveableLink);
     this.showItem("context-sendlink", this.onSaveableLink);
 
     // Save image depends on having loaded its content, video and audio don't.
-    showSave = this.onLoadedImage || this.onStandaloneImage || this.onCanvas;
+    showSave = (this.onLoadedImage && this.onCompletedImage) ||
+               this.onStandaloneImage || this.onCanvas;
     if (showSave)
       goSetMenuValue("context-saveimage",
                      this.autoDownload ? "valueSave" : "valueSaveAs");
     this.showItem("context-saveimage", showSave);
     this.showItem("context-savevideo", this.onVideo);
     this.showItem("context-saveaudio", this.onAudio);
     this.showItem("context-video-saveimage", this.onVideo);
     if (this.onVideo)