bug 115818, context menu slow to appear when images are present, c=ajfeldman@brown.edu, r=morse, sr=waterson -- this is better patch than the one in bug 146048

This commit is contained in:
morse%netscape.com 2006-07-27 14:55:01 +00:00
parent 01ca0583d8
commit 78ea7de70c

View File

@ -45,12 +45,10 @@
var permissionmanager =
Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
if(permissionmanager.testForBlocking(gContextMenu.imageURL,IMAGEPERMISSION))
return false;
/* image is not already being blocked, so "Block Image" can appear on the menu */
if(!permissionmanager) {
return true;
}
return !permissionmanager.testForBlocking(gContextMenu.imageURL, IMAGEPERMISSION);
},
// Determine if "imageBlocker.enabled" pref is set