Oops, this got accidentally checked. Backing out.

This commit is contained in:
caillon%returnzero.com 2002-10-08 10:43:38 +00:00
parent 5ba9439c07
commit 0294527edd

View File

@ -89,8 +89,6 @@
#include "nsIDOMNSDocument.h"
#include "nsIWidget.h"
#include "nsContentUtils.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
@ -398,26 +396,6 @@ nsEventListenerManager::AddEventListener(nsIDOMEventListener *aListener,
{
NS_ENSURE_TRUE(aListener, NS_ERROR_FAILURE);
if (aSubType & NS_EVENT_BITS_CONTEXTMENU) {
nsCOMPtr<nsIPrefService> prefService =
do_GetService(NS_PREFSERVICE_CONTRACTID);
NS_ENSURE_TRUE(prefService, NS_ERROR_FAILURE);
nsCOMPtr<nsIPrefBranch> prefBranch;
prefService->GetBranch(nsnull, getter_AddRefs(prefBranch));
PRBool blockOnContextMenu = PR_FALSE;
// dom.disable.event.oncontextmenu ???
prefBranch->GetBoolPref("pref.name.here", &blockOnContextMenu);
// Only chrome is allowed to add a context menu listener if our
// pref is set to true.
if (blockOnContextMenu && !nsContentUtils::IsCallerChrome()) {
return NS_OK;
}
}
nsVoidArray* listeners = GetListenersByType(aType, aKey, PR_TRUE);
//We asked the GetListenersByType to create the array if it had to. If it didn't