Bug 499667 - Remove nsIDOMDragListener, r+sr=sicking
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Tue, 23 Jun 2009 12:13:01 +0300
changeset 29466 068ff5c2592fe8ccb33e51a3dd0753a9aa5dbaa0
parent 29465 7d258c8e52e75dfae182ce0ee3275c9de4845bb5
child 29467 0fab3712e348077bf9b7a6ecd48fd59a2cb96b43
push idunknown
push userunknown
push dateunknown
bugs499667
milestone1.9.2a1pre
Bug 499667 - Remove nsIDOMDragListener, r+sr=sicking
content/events/src/nsEventListenerManager.cpp
content/xbl/src/nsXBLBinding.cpp
content/xul/content/src/nsXULElement.cpp
dom/public/coreEvents/Makefile.in
dom/public/coreEvents/nsIDOMDragListener.h
editor/libeditor/base/nsEditor.cpp
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -44,17 +44,16 @@
 #include "nsIDOMEventListener.h"
 #include "nsIDOMMouseListener.h"
 #include "nsIDOMMouseMotionListener.h"
 #include "nsIDOMContextMenuListener.h"
 #include "nsIDOMKeyListener.h"
 #include "nsIDOMFocusListener.h"
 #include "nsIDOMFormListener.h"
 #include "nsIDOMLoadListener.h"
-#include "nsIDOMDragListener.h"
 #include "nsIDOMTextListener.h"
 #include "nsIDOMCompositionListener.h"
 #include "nsIDOMXULListener.h"
 #include "nsIDOMUIListener.h"
 #include "nsITextControlFrame.h"
 #ifdef MOZ_SVG
 #include "nsIDOMSVGListener.h"
 #include "nsIDOMSVGZoomListener.h"
@@ -242,29 +241,16 @@ static const EventDispatchData sFormEven
 
 static const EventDispatchData sLoadEvents[] = {
   { NS_LOAD,               HANDLER(&nsIDOMLoadListener::Load)         },
   { NS_PAGE_UNLOAD,        HANDLER(&nsIDOMLoadListener::Unload)       },
   { NS_LOAD_ERROR,         HANDLER(&nsIDOMLoadListener::Error)        },
   { NS_BEFORE_PAGE_UNLOAD, HANDLER(&nsIDOMLoadListener::BeforeUnload) }
 };
 
-static const EventDispatchData sDragEvents[] = {
-  { NS_DRAGDROP_ENTER,       HANDLER(&nsIDOMDragListener::DragEnter)   },
-  { NS_DRAGDROP_OVER_SYNTH,  HANDLER(&nsIDOMDragListener::DragOver)    },
-  { NS_DRAGDROP_EXIT_SYNTH,  HANDLER(&nsIDOMDragListener::DragExit)    },
-  { NS_DRAGDROP_DRAGDROP,    HANDLER(&nsIDOMDragListener::DragDrop)    },
-  { NS_DRAGDROP_GESTURE,     HANDLER(&nsIDOMDragListener::DragGesture) },
-  { NS_DRAGDROP_DRAG,        HANDLER(&nsIDOMDragListener::Drag)        },
-  { NS_DRAGDROP_END,         HANDLER(&nsIDOMDragListener::DragEnd)     },
-  { NS_DRAGDROP_START,       HANDLER(&nsIDOMDragListener::DragStart)   },
-  { NS_DRAGDROP_LEAVE_SYNTH, HANDLER(&nsIDOMDragListener::DragLeave)   },
-  { NS_DRAGDROP_DROP,        HANDLER(&nsIDOMDragListener::Drop)        }
-};
-
 static const EventDispatchData sXULEvents[] = {
   { NS_XUL_POPUP_SHOWING,  HANDLER(&nsIDOMXULListener::PopupShowing)  },
   { NS_XUL_POPUP_SHOWN,    HANDLER(&nsIDOMXULListener::PopupShown)    },
   { NS_XUL_POPUP_HIDING,   HANDLER(&nsIDOMXULListener::PopupHiding)   },
   { NS_XUL_POPUP_HIDDEN,   HANDLER(&nsIDOMXULListener::PopupHidden)   },
   { NS_XUL_CLOSE,          HANDLER(&nsIDOMXULListener::Close)         },
   { NS_XUL_COMMAND,        HANDLER(&nsIDOMXULListener::Command)       },
   { NS_XUL_BROADCAST,      HANDLER(&nsIDOMXULListener::Broadcast)     },
@@ -304,17 +290,16 @@ static const EventDispatchData sSVGZoomE
 static const EventTypeData sEventTypes[] = {
   IMPL_EVENTTYPEDATA(Mouse),
   IMPL_EVENTTYPEDATA(MouseMotion),
   IMPL_EVENTTYPEDATA(ContextMenu),
   IMPL_EVENTTYPEDATA(Key),
   IMPL_EVENTTYPEDATA(Load),
   IMPL_EVENTTYPEDATA(Focus),
   IMPL_EVENTTYPEDATA(Form),
-  IMPL_EVENTTYPEDATA(Drag),
   IMPL_EVENTTYPEDATA(Text),
   IMPL_EVENTTYPEDATA(Composition),
   IMPL_EVENTTYPEDATA(XUL),
   IMPL_EVENTTYPEDATA(UI)
 #ifdef MOZ_SVG
  ,
   IMPL_EVENTTYPEDATA(SVG),
   IMPL_EVENTTYPEDATA(SVGZoom)
--- a/content/xbl/src/nsXBLBinding.cpp
+++ b/content/xbl/src/nsXBLBinding.cpp
@@ -75,17 +75,16 @@
 #include "nsIEventListenerManager.h"
 #include "nsIDOMMouseListener.h"
 #include "nsIDOMMouseMotionListener.h"
 #include "nsIDOMLoadListener.h"
 #include "nsIDOMFocusListener.h"
 #include "nsIDOMKeyListener.h"
 #include "nsIDOMFormListener.h"
 #include "nsIDOMXULListener.h"
-#include "nsIDOMDragListener.h"
 #include "nsIDOMContextMenuListener.h"
 #include "nsIDOMEventGroup.h"
 #include "nsAttrName.h"
 
 #include "nsGkAtoms.h"
 
 #include "nsIDOMAttr.h"
 #include "nsIDOMNamedNodeMap.h"
--- a/content/xul/content/src/nsXULElement.cpp
+++ b/content/xul/content/src/nsXULElement.cpp
@@ -70,17 +70,16 @@
 #include "nsIDOMMouseListener.h"
 #include "nsIDOMMouseMotionListener.h"
 #include "nsIDOMLoadListener.h"
 #include "nsIDOMFocusListener.h"
 #include "nsIDOMKeyListener.h"
 #include "nsIDOMFormListener.h"
 #include "nsIDOMXULListener.h"
 #include "nsIDOMContextMenuListener.h"
-#include "nsIDOMDragListener.h"
 #include "nsIDOMEventListener.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMNodeList.h"
 #include "nsIDOMXULCommandDispatcher.h"
 #include "nsIDOMXULElement.h"
 #include "nsIDOMElementCSSInlineStyle.h"
 #include "nsIDOMXULSelectCntrlItemEl.h"
 #include "nsIDocument.h"
--- a/dom/public/coreEvents/Makefile.in
+++ b/dom/public/coreEvents/Makefile.in
@@ -46,17 +46,16 @@ MODULE		= dom
 
 EXPORTS =				\
 	nsIDOMFocusListener.h		\
 	nsIDOMFormListener.h		\
 	nsIDOMKeyListener.h		\
 	nsIDOMLoadListener.h		\
 	nsIDOMMouseListener.h		\
 	nsIDOMMouseMotionListener.h	\
-	nsIDOMDragListener.h		\
 	nsIDOMTextListener.h		\
 	nsIDOMCompositionListener.h	\
 	nsIDOMXULListener.h		\
 	nsIDOMContextMenuListener.h	\
 	nsIDOMUIListener.h		\
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/dom/public/coreEvents/nsIDOMDragListener.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#ifndef nsIDOMDragListener_h__
-#define nsIDOMDragListener_h__
-
-#include "nsIDOMEvent.h"
-#include "nsIDOMEventListener.h"
-
-/*
- * The listener for drag events.
- *
- * The reason for two events for the same operation are for compatibility
- * between the WHAT-WG drag and drop spec and existing XUL code.
- */
-#define NS_IDOMDRAGLISTENER_IID \
-{ /* 1A107271-1E26-419A-BCF1-0A4CF7A66B45 */ \
-0x1a107271, 0x1e26, 0x419a, \
-{0xbc, 0xf1, 0x0a, 0x4c, 0xf7, 0xa6, 0x6b, 0x45} }
-
-
-
-class nsIDOMDragListener : public nsIDOMEventListener {
-
-public:
-
-   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMDRAGLISTENER_IID)
-
-  /**
-  * The dragenter event is fired when the mouse is moved from one node onto
-  * another. The target is the node that the mouse is moved onto and the
-  * related target is the node that the mouse left.
-  *
-  * @param aMouseEvent @see nsIDOMEvent.h 
-  * @returns whether the event was consumed or ignored. @see nsresult
-  */
-  NS_IMETHOD DragEnter(nsIDOMEvent* aMouseEvent) = 0;
-
-  /**
-  * The dragover event is fired at regular intervals (several times per second)
-  * while a drag is occuring. The target of this event is the node that the
-  * mouse is over.
-  *
-  * @param aMouseEvent @see nsIDOMEvent.h 
-  * @returns whether the event was consumed or ignored. @see nsresult
-  */
-  NS_IMETHOD DragOver(nsIDOMEvent* aMouseEvent) = 0;
-
-  /**
-  * The dragleave event is fired when the mouse leaves a node for another
-  * node. The dragexit event is fired immediately afterwards which will
-  * call this method. The target is the node that the mouse left and the
-  * related target is the node that the mouse is entering. A dragenter
-  * event will be fired on the node that the mouse is entering after both
-  * the dragleave and dragexit event are fired.
-  *
-  * @param aMouseEvent @see nsIDOMEvent.h 
-  * @returns whether the event was consumed or ignored. @see nsresult
-  */
-  NS_IMETHOD DragExit(nsIDOMEvent* aMouseEvent) = 0;
-
-  /**
-   * The drop event will be fired on the node that the mouse is over once
-   * the drag is complete. The dragdrop event will be fired immediately
-   * afterwards which will call this method.
-   *
-   * @param aMouseEvent @see nsIDOMEvent.h 
-   * @returns whether the event was consumed or ignored. @see nsresult
-   */
-  NS_IMETHOD DragDrop(nsIDOMEvent* aMouseEvent) = 0;
-  
-  /**
-   * When the user begins a drag by pressing the mouse button and moving the
-   * mouse slightly, a dragstart event will be fired. Afterwards a draggesture
-   * event will be fired which will call this method.
-   *
-   * @param aMouseEvent @see nsIDOMEvent.h 
-   * @returns whether the event was consumed or ignored. @see nsresult
-   */
-  NS_IMETHOD DragGesture(nsIDOMEvent* aMouseEvent) = 0;
-
-  /**
-   * The dragend event is fired when a drag is finished, whether the data was
-   * dropped successfully or whether the drag was cancelled. The target of
-   * this event is the source node of the drag.
-   *
-   * @param aMouseEvent @see nsIDOMEvent.h 
-   * @returns whether the event was consumed or ignored. @see nsresult
-   */
-  NS_IMETHOD DragEnd(nsIDOMEvent* aMouseEvent) = 0;
-
-  /**
-   * The drag event is fired just before a dragover event is fired. The target
-   * of this event is the source node of the drag.
-   *
-   * @param aMouseEvent @see nsIDOMEvent.h 
-   * @returns whether the event was consumed or ignored. @see nsresult
-   */
-  NS_IMETHOD Drag(nsIDOMEvent* aMouseEvent) = 0;
-
-  // these methods are for compatibility 
-  NS_IMETHOD DragStart(nsIDOMEvent* aMouseEvent) { return NS_OK; }
-  NS_IMETHOD DragLeave(nsIDOMEvent* aMouseEvent) { return NS_OK; }
-  NS_IMETHOD Drop(nsIDOMEvent* aMouseEvent) { return NS_OK; }
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMDragListener, NS_IDOMDRAGLISTENER_IID)
-
-#endif // nsIDOMDragListener_h__
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -60,17 +60,16 @@
 #include "nsIDOMNodeList.h"
 #include "nsIDOMRange.h"
 #include "nsIDOMEventListener.h"
 #include "nsIDOMEventGroup.h"
 #include "nsIDOMMouseListener.h"
 #include "nsIDOMFocusListener.h"
 #include "nsIDOMTextListener.h"
 #include "nsIDOMCompositionListener.h"
-#include "nsIDOMDragListener.h"
 #include "nsIDOMHTMLBRElement.h"
 #include "nsIDocument.h"
 #include "nsITransactionManager.h"
 #include "nsIAbsorbingTransaction.h"
 #include "nsIPresShell.h"
 #include "nsIViewManager.h"
 #include "nsISelection.h"
 #include "nsISelectionPrivate.h"