Bug 300247: "Set as desktop background" is not disabled for javascript images, r=mconnor, a=asa

git-svn-id: svn://10.0.0.236/trunk@176276 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com 2005-07-19 21:22:12 +00:00
parent e01ddec624
commit 514658ac34

View File

@ -4005,14 +4005,14 @@ nsContextMenu.prototype = {
var disableDesktopBackground = false;
if (("complete" in this.target) && !this.target.complete)
disableSetWallpaper = true;
else if (makeURI(this.target.src).scheme == "javascript")
disableDesktopBackground = true;
else if (this.target instanceof nsIImageLoadingContent) {
var request = this.target.QueryInterface(nsIImageLoadingContent)
.getRequest(nsIImageLoadingContent.CURRENT_REQUEST);
if (!request)
disableDesktopBackground = true;
}
else if (makeURI(this.target.src).scheme == "javascript")
disableDesktopBackground = true;
this.setItemAttr( "context-setDesktopBackground", "disabled", disableDesktopBackground);
}