new popupblocked domevent. bug 199705 r=jaggernaut,jst

git-svn-id: svn://10.0.0.236/trunk@141209 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
danm%netscape.com
2003-04-16 00:00:46 +00:00
parent 4ff6e06e52
commit 2b68000bf3
3 changed files with 15 additions and 4 deletions

View File

@@ -41,6 +41,7 @@
#include "nsIDOMKeyEvent.h"
#include "nsIDOMMouseEvent.h"
#include "nsIDOMPopupBlockedEvent.h"
#include "nsIDOMNSUIEvent.h"
#include "nsIDOMNSEvent.h"
#include "nsISupports.h"
@@ -61,6 +62,7 @@ class nsIScrollableView;
class nsDOMEvent : public nsIDOMKeyEvent,
public nsIDOMNSEvent,
public nsIDOMMouseEvent,
public nsIDOMPopupBlockedEvent,
public nsIDOMNSUIEvent,
public nsIPrivateDOMEvent,
public nsIPrivateTextEvent,
@@ -118,7 +120,8 @@ public:
eDOMEvents_noderemovedfromdocument,
eDOMEvents_nodeinsertedintodocument,
eDOMEvents_attrmodified,
eDOMEvents_characterdatamodified
eDOMEvents_characterdatamodified,
eDOMEvents_popupBlocked
};
nsDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
@@ -136,6 +139,8 @@ public:
// nsIDOMUIEvent Interface
NS_DECL_NSIDOMUIEVENT
NS_DECL_NSIDOMPOPUPBLOCKEDEVENT
// nsIDOMMouseEvent Interface and nsIDOMKeyEvent Interface
NS_IMETHOD GetScreenX(PRInt32* aScreenX);
NS_IMETHOD GetScreenY(PRInt32* aScreenY);

View File

@@ -2327,9 +2327,13 @@ nsEventListenerManager::CreateEvent(nsIPresContext* aPresContext,
*aDOMEvent = nsnull;
nsAutoString str(aEventType);
if (!aEvent && !str.EqualsIgnoreCase("MouseEvents") && !str.EqualsIgnoreCase("KeyEvents") &&
!str.EqualsIgnoreCase("HTMLEvents") && !str.EqualsIgnoreCase("MutationEvents") &&
!str.EqualsIgnoreCase("MouseScrollEvents") && !str.EqualsIgnoreCase("Events")) {
if (!aEvent && !str.EqualsIgnoreCase("MouseEvents") &&
!str.EqualsIgnoreCase("KeyEvents") &&
!str.EqualsIgnoreCase("HTMLEvents") &&
!str.EqualsIgnoreCase("MutationEvents") &&
!str.EqualsIgnoreCase("MouseScrollEvents") &&
!str.EqualsIgnoreCase("PopupBlockedEvents") &&
!str.EqualsIgnoreCase("Events")) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}

View File

@@ -184,6 +184,7 @@
#include "nsIDOMEntityReference.h"
#include "nsIDOMNotation.h"
#include "nsIDOMMouseEvent.h"
#include "nsIDOMPopupBlockedEvent.h"
#include "nsIDOMMutationEvent.h"
#include "nsIDOMDocumentStyle.h"
#include "nsIDOMDocumentRange.h"
@@ -1456,6 +1457,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMKeyEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMPopupBlockedEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSUIEvent)
DOM_CLASSINFO_MAP_END