Bug 730041 - Disable "View Background Image" in context menu for stand-alone video content. r=dolske

This commit is contained in:
rsx11m 2012-02-29 19:35:48 -05:00
parent f976a2b6b5
commit 68a52ecffb

View File

@ -289,9 +289,14 @@ nsContextMenu.prototype = {
this.showItem("context-viewvideo", this.onVideo && (!this.inSyntheticDoc || this.inFrame));
this.setItemAttr("context-viewvideo", "disabled", !this.mediaURL);
// View background image depends on whether there is one.
this.showItem("context-viewbgimage", shouldShow && !this._hasMultipleBGImages);
this.showItem("context-sep-viewbgimage", shouldShow && !this._hasMultipleBGImages);
// View background image depends on whether there is one, but don't make
// background images of a stand-alone media document available.
this.showItem("context-viewbgimage", shouldShow &&
!this._hasMultipleBGImages &&
!this.inSyntheticDoc);
this.showItem("context-sep-viewbgimage", shouldShow &&
!this._hasMultipleBGImages &&
!this.inSyntheticDoc);
document.getElementById("context-viewbgimage")
.disabled = !this.hasBGImage;
@ -387,7 +392,9 @@ nsContextMenu.prototype = {
this.showItem("context-delete", this.onTextInput);
this.showItem("context-sep-paste", this.onTextInput);
this.showItem("context-selectall", !(this.onLink || this.onImage ||
this.onVideo || this.onAudio) || this.isDesignMode);
this.onVideo || this.onAudio ||
this.inSyntheticDoc) ||
this.isDesignMode);
this.showItem("context-sep-selectall", this.isContentSelected );
// XXX dr