Bug 523111 - DOMEvent implementations should inherit first the base class, r=jwatt, sr=jst
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 21 Oct 2009 12:38:39 +0300
changeset 34059 e5ee2a50083e4779ca0ca27f2b1ae8616ab02854
parent 34058 f0ba915153e41cedbc8035788fe3685a271f243b
child 34060 0a160bb9bea3e2cd13a439caeef4e37a3219384c
push idunknown
push userunknown
push dateunknown
reviewersjwatt, jst
bugs523111
milestone1.9.3a1pre
Bug 523111 - DOMEvent implementations should inherit first the base class, r=jwatt, sr=jst
content/events/src/nsDOMBeforeUnloadEvent.h
content/events/src/nsDOMDragEvent.h
content/events/src/nsDOMKeyboardEvent.h
content/events/src/nsDOMMessageEvent.h
content/events/src/nsDOMMouseScrollEvent.h
content/events/src/nsDOMMutationEvent.h
content/events/src/nsDOMNotifyPaintEvent.h
content/events/src/nsDOMOrientationEvent.h
content/events/src/nsDOMPageTransitionEvent.h
content/events/src/nsDOMPopupBlockedEvent.h
content/events/src/nsDOMProgressEvent.h
content/events/src/nsDOMSimpleGestureEvent.h
content/events/src/nsDOMUIEvent.h
content/svg/content/src/nsDOMSVGEvent.h
content/svg/content/src/nsDOMSVGZoomEvent.cpp
content/svg/content/src/nsDOMSVGZoomEvent.h
dom/base/nsDOMClassInfo.cpp
--- a/content/events/src/nsDOMBeforeUnloadEvent.h
+++ b/content/events/src/nsDOMBeforeUnloadEvent.h
@@ -37,18 +37,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsDOMBeforeUnloadEvent_h__
 #define nsDOMBeforeUnloadEvent_h__
 
 #include "nsIDOMBeforeUnloadEvent.h"
 #include "nsDOMEvent.h"
 
-class nsDOMBeforeUnloadEvent : public nsIDOMBeforeUnloadEvent,
-                               public nsDOMEvent
+class nsDOMBeforeUnloadEvent : public nsDOMEvent,
+                               public nsIDOMBeforeUnloadEvent
 {
 public:
   nsDOMBeforeUnloadEvent(nsPresContext* aPresContext, nsEvent* aEvent)
   : nsDOMEvent(aPresContext, aEvent) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Forward to nsDOMEvent
--- a/content/events/src/nsDOMDragEvent.h
+++ b/content/events/src/nsDOMDragEvent.h
@@ -40,18 +40,18 @@
 
 #include "nsIDOMDragEvent.h"
 #include "nsDOMMouseEvent.h"
 #include "nsIDOMDataTransfer.h"
 
 class nsIContent;
 class nsEvent;
 
-class nsDOMDragEvent : public nsIDOMDragEvent,
-                       public nsDOMMouseEvent
+class nsDOMDragEvent : public nsDOMMouseEvent,
+                       public nsIDOMDragEvent
 {
 public:
   nsDOMDragEvent(nsPresContext* aPresContext, nsInputEvent* aEvent);
   virtual ~nsDOMDragEvent();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIDOMDRAGEVENT
--- a/content/events/src/nsDOMKeyboardEvent.h
+++ b/content/events/src/nsDOMKeyboardEvent.h
@@ -37,18 +37,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsDOMKeyboardEvent_h__
 #define nsDOMKeyboardEvent_h__
 
 #include "nsIDOMKeyEvent.h"
 #include "nsDOMUIEvent.h"
 
-class nsDOMKeyboardEvent : public nsIDOMKeyEvent,
-                           public nsDOMUIEvent
+class nsDOMKeyboardEvent : public nsDOMUIEvent,
+                           public nsIDOMKeyEvent
 {
 public:
   nsDOMKeyboardEvent(nsPresContext* aPresContext, nsKeyEvent* aEvent);
   virtual ~nsDOMKeyboardEvent();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMKeyEvent Interface
--- a/content/events/src/nsDOMMessageEvent.h
+++ b/content/events/src/nsDOMMessageEvent.h
@@ -45,18 +45,18 @@
 
 /**
  * Implements the MessageEvent event, used for cross-document messaging and
  * server-sent events.
  *
  * See http://www.whatwg.org/specs/web-apps/current-work/#messageevent for
  * further details.
  */
-class nsDOMMessageEvent : public nsIDOMMessageEvent,
-                          public nsDOMEvent
+class nsDOMMessageEvent : public nsDOMEvent,
+                          public nsIDOMMessageEvent
 {
 public:
   nsDOMMessageEvent(nsPresContext* aPresContext, nsEvent* aEvent)
     : nsDOMEvent(aPresContext, aEvent)
   {
   }
                      
   NS_DECL_ISUPPORTS_INHERITED
--- a/content/events/src/nsDOMMouseScrollEvent.h
+++ b/content/events/src/nsDOMMouseScrollEvent.h
@@ -36,18 +36,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsDOMMouseScrollEvent_h__
 #define nsDOMMouseScrollEvent_h__
 
 #include "nsIDOMMouseScrollEvent.h"
 #include "nsDOMMouseEvent.h"
 
-class nsDOMMouseScrollEvent : public nsIDOMMouseScrollEvent,
-                              public nsDOMMouseEvent
+class nsDOMMouseScrollEvent : public nsDOMMouseEvent,
+                              public nsIDOMMouseScrollEvent
 {
 public:
   nsDOMMouseScrollEvent(nsPresContext* aPresContext, nsInputEvent* aEvent);
   virtual ~nsDOMMouseScrollEvent();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMMouseScrollEvent Interface
--- a/content/events/src/nsDOMMutationEvent.h
+++ b/content/events/src/nsDOMMutationEvent.h
@@ -39,18 +39,18 @@
 #ifndef nsDOMMutationEvent_h__
 #define nsDOMMutationEvent_h__
 
 #include "nsCOMPtr.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsDOMEvent.h"
 #include "nsContentUtils.h"
 
-class nsDOMMutationEvent : public nsIDOMMutationEvent,
-                           public nsDOMEvent
+class nsDOMMutationEvent : public nsDOMEvent,
+                           public nsIDOMMutationEvent
 {
 public:
   nsDOMMutationEvent(nsPresContext* aPresContext, nsMutationEvent* aEvent);
 
   virtual ~nsDOMMutationEvent();
                      
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/content/events/src/nsDOMNotifyPaintEvent.h
+++ b/content/events/src/nsDOMNotifyPaintEvent.h
@@ -40,18 +40,18 @@
 #define nsDOMNotifyPaintEvent_h_
 
 #include "nsIDOMNotifyPaintEvent.h"
 #include "nsDOMEvent.h"
 #include "nsPresContext.h"
 
 class nsPaintRequestList;
 
-class nsDOMNotifyPaintEvent : public nsIDOMNotifyPaintEvent,
-                              public nsDOMEvent
+class nsDOMNotifyPaintEvent : public nsDOMEvent,
+                              public nsIDOMNotifyPaintEvent
 {
 public:
   nsDOMNotifyPaintEvent(nsPresContext*           aPresContext,
                         nsEvent*                 aEvent,
                         PRUint32                 aEventType,
                         nsInvalidateRequestList* aInvalidateRequests);
 
   NS_DECL_ISUPPORTS_INHERITED
--- a/content/events/src/nsDOMOrientationEvent.h
+++ b/content/events/src/nsDOMOrientationEvent.h
@@ -35,17 +35,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsDOMOrientationEvent_h__
 #define nsDOMOrientationEvent_h__
 
 #include "nsIDOMOrientationEvent.h"
 #include "nsDOMEvent.h"
 
-class nsDOMOrientationEvent : public nsIDOMOrientationEvent, public nsDOMEvent
+class nsDOMOrientationEvent : public nsDOMEvent,
+                              public nsIDOMOrientationEvent
 {
 public:
 
   nsDOMOrientationEvent(nsPresContext* aPresContext, nsEvent* aEvent)
   : nsDOMEvent(aPresContext, aEvent),
     mX(0),
     mY(0),
     mZ(0) {}
--- a/content/events/src/nsDOMPageTransitionEvent.h
+++ b/content/events/src/nsDOMPageTransitionEvent.h
@@ -37,18 +37,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsDOMPageTransitionEvent_h__
 #define nsDOMPageTransitionEvent_h__
 
 #include "nsIDOMPageTransitionEvent.h"
 #include "nsDOMEvent.h"
 
-class nsDOMPageTransitionEvent : public nsIDOMPageTransitionEvent,
-                                 public nsDOMEvent
+class nsDOMPageTransitionEvent : public nsDOMEvent,
+                                 public nsIDOMPageTransitionEvent
 {
 public:
   nsDOMPageTransitionEvent(nsPresContext* aPresContext, nsEvent* aEvent) :
   nsDOMEvent(aPresContext, aEvent), mPersisted(PR_FALSE) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIDOMPAGETRANSITIONEVENT
--- a/content/events/src/nsDOMPopupBlockedEvent.h
+++ b/content/events/src/nsDOMPopupBlockedEvent.h
@@ -38,18 +38,18 @@
 
 #ifndef nsDOMPopupBlockedEvent_h__
 #define nsDOMPopupBlockedEvent_h__
 
 #include "nsIDOMPopupBlockedEvent.h"
 #include "nsDOMEvent.h"
 #include "nsIURI.h"
 
-class nsDOMPopupBlockedEvent : public nsIDOMPopupBlockedEvent,
-                               public nsDOMEvent
+class nsDOMPopupBlockedEvent : public nsDOMEvent,
+                               public nsIDOMPopupBlockedEvent
 {
 public:
 
   nsDOMPopupBlockedEvent(nsPresContext* aPresContext, nsEvent* aEvent)
   : nsDOMEvent(aPresContext, aEvent) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/content/events/src/nsDOMProgressEvent.h
+++ b/content/events/src/nsDOMProgressEvent.h
@@ -44,18 +44,18 @@
 
 /**
  * Implements the ProgressEvent event, used for progress events from the media
  * elements.
 
  * See http://www.whatwg.org/specs/web-apps/current-work/#progress0 for
  * further details.
  */
-class nsDOMProgressEvent : public nsIDOMProgressEvent,
-                           public nsDOMEvent
+class nsDOMProgressEvent : public nsDOMEvent,
+                           public nsIDOMProgressEvent
 {
 public:
   nsDOMProgressEvent(nsPresContext* aPresContext, nsEvent* aEvent)
     : nsDOMEvent(aPresContext, aEvent)
   {
   }
   
   NS_DECL_ISUPPORTS_INHERITED
--- a/content/events/src/nsDOMSimpleGestureEvent.h
+++ b/content/events/src/nsDOMSimpleGestureEvent.h
@@ -37,18 +37,18 @@
 #ifndef nsDOMSimpleGestureEvent_h__
 #define nsDOMSimpleGestureEvent_h__
 
 #include "nsIDOMSimpleGestureEvent.h"
 #include "nsDOMMouseEvent.h"
 
 class nsPresContext;
 
-class nsDOMSimpleGestureEvent : public nsIDOMSimpleGestureEvent,
-                                public nsDOMMouseEvent
+class nsDOMSimpleGestureEvent : public nsDOMMouseEvent,
+                                public nsIDOMSimpleGestureEvent
 {
 public:
   nsDOMSimpleGestureEvent(nsPresContext*, nsSimpleGestureEvent*);
   virtual ~nsDOMSimpleGestureEvent();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIDOMSIMPLEGESTUREEVENT
--- a/content/events/src/nsDOMUIEvent.h
+++ b/content/events/src/nsDOMUIEvent.h
@@ -40,20 +40,20 @@
 #define nsDOMUIEvent_h__
 
 #include "nsIDOMUIEvent.h"
 #include "nsIDOMNSUIEvent.h"
 #include "nsIDOMAbstractView.h"
 #include "nsIPrivateCompositionEvent.h"
 #include "nsDOMEvent.h"
 
-class nsDOMUIEvent : public nsIDOMUIEvent,
+class nsDOMUIEvent : public nsDOMEvent,
+                     public nsIDOMUIEvent,
                      public nsIDOMNSUIEvent,
-                     public nsIPrivateCompositionEvent,
-                     public nsDOMEvent
+                     public nsIPrivateCompositionEvent
 {
 public:
   nsDOMUIEvent(nsPresContext* aPresContext, nsGUIEvent* aEvent);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMUIEvent, nsDOMEvent)
 
   // nsIDOMUIEvent Interface
--- a/content/svg/content/src/nsDOMSVGEvent.h
+++ b/content/svg/content/src/nsDOMSVGEvent.h
@@ -36,18 +36,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef __NS_SVGEVENT_H__
 #define __NS_SVGEVENT_H__
 
 #include "nsIDOMSVGEvent.h"
 #include "nsDOMEvent.h"
 
-class nsDOMSVGEvent : public nsIDOMSVGEvent,
-                      public nsDOMEvent
+class nsDOMSVGEvent : public nsDOMEvent,
+                      public nsIDOMSVGEvent
 {
 public:
   nsDOMSVGEvent(nsPresContext* aPresContext, nsEvent* aEvent);
 
   // nsISupports interface:
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMSVGEvent interface:
--- a/content/svg/content/src/nsDOMSVGZoomEvent.cpp
+++ b/content/svg/content/src/nsDOMSVGZoomEvent.cpp
@@ -100,24 +100,23 @@ nsDOMSVGZoomEvent::nsDOMSVGZoomEvent(nsP
     }
   }
 }
 
 
 //----------------------------------------------------------------------
 // nsISupports methods:
 
-NS_IMPL_ADDREF_INHERITED(nsDOMSVGZoomEvent, nsDOMEvent)
-NS_IMPL_RELEASE_INHERITED(nsDOMSVGZoomEvent, nsDOMEvent)
+NS_IMPL_ADDREF_INHERITED(nsDOMSVGZoomEvent, nsDOMUIEvent)
+NS_IMPL_RELEASE_INHERITED(nsDOMSVGZoomEvent, nsDOMUIEvent)
 
 NS_INTERFACE_MAP_BEGIN(nsDOMSVGZoomEvent)
   NS_INTERFACE_MAP_ENTRY(nsIDOMSVGZoomEvent)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMUIEvent,nsIDOMSVGZoomEvent)
   NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(SVGZoomEvent)
-NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
+NS_INTERFACE_MAP_END_INHERITING(nsDOMUIEvent)
 
 
 //----------------------------------------------------------------------
 // nsIDOMSVGZoomEvent methods:
 
 /* readonly attribute SVGRect zoomRectScreen; */
 NS_IMETHODIMP nsDOMSVGZoomEvent::GetZoomRectScreen(nsIDOMSVGRect **aZoomRectScreen)
 {
--- a/content/svg/content/src/nsDOMSVGZoomEvent.h
+++ b/content/svg/content/src/nsDOMSVGZoomEvent.h
@@ -37,18 +37,18 @@
 
 #ifndef __NS_SVGZOOMEVENT_H__
 #define __NS_SVGZOOMEVENT_H__
 
 #include "nsIDOMSVGZoomEvent.h"
 #include "nsDOMUIEvent.h"
 #include "nsIDOMSVGSVGElement.h"
 
-class nsDOMSVGZoomEvent : public nsIDOMSVGZoomEvent,
-                          public nsDOMUIEvent
+class nsDOMSVGZoomEvent : public nsDOMUIEvent,
+                          public nsIDOMSVGZoomEvent
 {
 public:
   nsDOMSVGZoomEvent(nsPresContext* aPresContext, nsGUIEvent* aEvent);
                      
   // nsISupports interface:
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMSVGZoomEvent interface:
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -3426,17 +3426,17 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGUnitTypes, nsIDOMSVGUnitTypes)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGUnitTypes)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGZoomEvent, nsIDOMSVGZoomEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGZoomEvent)
-    DOM_CLASSINFO_EVENT_MAP_ENTRIES
+    DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 #endif // MOZ_SVG
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLCanvasElement, nsIDOMHTMLCanvasElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCanvasElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END