Bug 495764 - remove unused methods from nsIPrivateDOMEvent, r+sr=jst
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 24 Jun 2009 12:02:37 +0300
changeset 29524 86c78567c82692f10648f9b14be2685948983e07
parent 29523 e6f7426fb975362a505ffabff8120de8ba1f6769
child 29525 fde224dd1e4d30cb9237d1d2a838c29b6b7a2835
push idunknown
push userunknown
push dateunknown
bugs495764
milestone1.9.2a1pre
Bug 495764 - remove unused methods from nsIPrivateDOMEvent, r+sr=jst
content/base/src/nsXMLHttpRequest.h
content/events/public/nsIPrivateDOMEvent.h
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMEvent.h
security/manager/ssl/src/nsSmartCardEvent.cpp
security/manager/ssl/src/nsSmartCardEvent.h
--- a/content/base/src/nsXMLHttpRequest.h
+++ b/content/base/src/nsXMLHttpRequest.h
@@ -460,36 +460,24 @@ public:
   NS_IMETHOD DuplicatePrivateData()
   {
     return mInner->DuplicatePrivateData();
   }
   NS_IMETHOD SetTarget(nsIDOMEventTarget* aTarget)
   {
     return mInner->SetTarget(aTarget);
   }
-  NS_IMETHOD SetCurrentTarget(nsIDOMEventTarget* aTarget)
-  {
-    return mInner->SetCurrentTarget(aTarget);
-  }
-  NS_IMETHOD SetOriginalTarget(nsIDOMEventTarget* aTarget)
-  {
-    return mInner->SetOriginalTarget(aTarget);
-  }
   NS_IMETHOD_(PRBool) IsDispatchStopped()
   {
     return mInner->IsDispatchStopped();
   }
   NS_IMETHOD_(nsEvent*) GetInternalNSEvent()
   {
     return mInner->GetInternalNSEvent();
   }
-  NS_IMETHOD_(PRBool) HasOriginalTarget()
-  {
-    return mInner->HasOriginalTarget();
-  }
   NS_IMETHOD SetTrusted(PRBool aTrusted)
   {
     return mInner->SetTrusted(aTrusted);
   }
 
 protected:
   // Use nsDOMProgressEvent so that we can forward
   // most of the method calls easily.
--- a/content/events/public/nsIPrivateDOMEvent.h
+++ b/content/events/public/nsIPrivateDOMEvent.h
@@ -41,37 +41,34 @@
 #include "nsISupports.h"
 
 class nsPresContext;
 
 /*
  * Event listener manager interface.
  */
 #define NS_IPRIVATEDOMEVENT_IID \
-{0x5b3543d3, 0x84ed, 0x4b59, \
-{0x95, 0xca, 0xa4, 0x21, 0xf2, 0x59, 0x22, 0x22}}
+{ 0x1da4c501, 0xe87e, 0x49b4, \
+  { 0xb0, 0x49, 0xdf, 0x9f, 0xc3, 0x6b, 0x56, 0xd4 } }
 
 class nsIDOMEventTarget;
 class nsIDOMEvent;
 class nsEvent;
 class nsCommandEvent;
 class nsRegion;
 
 class nsIPrivateDOMEvent : public nsISupports
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPRIVATEDOMEVENT_IID)
 
   NS_IMETHOD DuplicatePrivateData() = 0;
   NS_IMETHOD SetTarget(nsIDOMEventTarget* aTarget) = 0;
-  NS_IMETHOD SetCurrentTarget(nsIDOMEventTarget* aTarget) = 0;
-  NS_IMETHOD SetOriginalTarget(nsIDOMEventTarget* aTarget) = 0;
   NS_IMETHOD_(PRBool) IsDispatchStopped() = 0;
   NS_IMETHOD_(nsEvent*) GetInternalNSEvent() = 0;
-  NS_IMETHOD_(PRBool) HasOriginalTarget() = 0;
   NS_IMETHOD SetTrusted(PRBool aTrusted) = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIPrivateDOMEvent, NS_IPRIVATEDOMEVENT_IID)
 
 nsresult
 NS_NewDOMEvent(nsIDOMEvent** aInstancePtrResult, nsPresContext* aPresContext, nsEvent *aEvent);
 nsresult
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -337,22 +337,16 @@ nsDOMEvent::GetOriginalTarget(nsIDOMEven
 {
   if (mEvent->originalTarget) {
     return GetDOMEventTarget(mEvent->originalTarget, aOriginalTarget);
   }
 
   return GetTarget(aOriginalTarget);
 }
 
-NS_IMETHODIMP_(PRBool)
-nsDOMEvent::HasOriginalTarget()
-{
-  return !!mEvent->originalTarget;
-}
-
 NS_IMETHODIMP
 nsDOMEvent::SetTrusted(PRBool aTrusted)
 {
   if (aTrusted) {
     mEvent->flags |= NS_EVENT_FLAG_TRUSTED;
   } else {
     mEvent->flags &= ~NS_EVENT_FLAG_TRUSTED;
   }
@@ -1030,46 +1024,16 @@ NS_METHOD nsDOMEvent::SetTarget(nsIDOMEv
                  "Uh, inner window set as event target!");
   }
 #endif
 
   mEvent->target = aTarget;
   return NS_OK;
 }
 
-NS_METHOD nsDOMEvent::SetCurrentTarget(nsIDOMEventTarget* aCurrentTarget)
-{
-#ifdef DEBUG
-  {
-    nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aCurrentTarget);
-
-    NS_ASSERTION(!win || !win->IsInnerWindow(),
-                 "Uh, inner window set as event target!");
-  }
-#endif
-
-  mEvent->currentTarget = aCurrentTarget;
-  return NS_OK;
-}
-
-NS_METHOD nsDOMEvent::SetOriginalTarget(nsIDOMEventTarget* aOriginalTarget)
-{
-#ifdef DEBUG
-  {
-    nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aOriginalTarget);
-
-    NS_ASSERTION(!win || !win->IsInnerWindow(),
-                 "Uh, inner window set as event target!");
-  }
-#endif
-
-  mEvent->originalTarget = aOriginalTarget;
-  return NS_OK;
-}
-
 NS_IMETHODIMP_(PRBool)
 nsDOMEvent::IsDispatchStopped()
 {
   return !!(mEvent->flags & NS_EVENT_FLAG_STOP_DISPATCH);
 }
 
 NS_IMETHODIMP_(nsEvent*)
 nsDOMEvent::GetInternalNSEvent()
--- a/content/events/src/nsDOMEvent.h
+++ b/content/events/src/nsDOMEvent.h
@@ -183,21 +183,18 @@ public:
   NS_DECL_NSIDOMEVENT
 
   // nsIDOMNSEvent Interface
   NS_DECL_NSIDOMNSEVENT
 
   // nsIPrivateDOMEvent interface
   NS_IMETHOD    DuplicatePrivateData();
   NS_IMETHOD    SetTarget(nsIDOMEventTarget* aTarget);
-  NS_IMETHOD    SetCurrentTarget(nsIDOMEventTarget* aCurrentTarget);
-  NS_IMETHOD    SetOriginalTarget(nsIDOMEventTarget* aOriginalTarget);
   NS_IMETHOD_(PRBool)    IsDispatchStopped();
   NS_IMETHOD_(nsEvent*)    GetInternalNSEvent();
-  NS_IMETHOD_(PRBool)    HasOriginalTarget();
   NS_IMETHOD    SetTrusted(PRBool aTrusted);
 
   static PopupControlState GetEventPopupControlState(nsEvent *aEvent);
 
   static void PopupAllowedEventsChanged();
 
   static void Shutdown();
 
--- a/security/manager/ssl/src/nsSmartCardEvent.cpp
+++ b/security/manager/ssl/src/nsSmartCardEvent.cpp
@@ -101,52 +101,32 @@ NS_IMETHODIMP nsSmartCardEvent::Duplicat
 }
 
 NS_IMETHODIMP nsSmartCardEvent::SetTarget(nsIDOMEventTarget *aTarget)
 {
   NS_ASSERTION(mPrivate, "SmartCardEvent called without Init");
   return mPrivate->SetTarget(aTarget);
 }
 
-NS_IMETHODIMP nsSmartCardEvent::SetCurrentTarget(nsIDOMEventTarget *aTarget)
-{
-  NS_ASSERTION(mPrivate, "SmartCardEvent called without Init");
-  return mPrivate->SetCurrentTarget(aTarget);
-}
-
-NS_IMETHODIMP nsSmartCardEvent::SetOriginalTarget(nsIDOMEventTarget *aTarget)
-{
-  NS_ASSERTION(mPrivate, "SmartCardEvent called without Init");
-  return mPrivate->SetOriginalTarget(aTarget);
-}
-
 NS_IMETHODIMP_(PRBool ) nsSmartCardEvent::IsDispatchStopped()
 {
   PRBool  isDispatchPrevented = nsnull;
   PRBool * aIsDispatchPrevented = &isDispatchPrevented;
   NS_ASSERTION(mPrivate, "SmartCardEvent called without Init");
   return mPrivate->IsDispatchStopped();
 }
 
 NS_IMETHODIMP_(nsEvent*) nsSmartCardEvent::GetInternalNSEvent()
 {
   nsEvent* nSEvent = nsnull;
   nsEvent** aNSEvent = &nSEvent;
   NS_ASSERTION(mPrivate, "SmartCardEvent called without Init");
   return mPrivate->GetInternalNSEvent();
 }
 
-NS_IMETHODIMP_(PRBool ) nsSmartCardEvent::HasOriginalTarget()
-{
-  PRBool  result = nsnull;
-  PRBool * aResult = &result;
-  NS_ASSERTION(mPrivate, "SmartCardEvent called without Init");
-  return mPrivate->HasOriginalTarget();
-}
-
 NS_IMETHODIMP nsSmartCardEvent::SetTrusted(PRBool aResult)
 {
   NS_ASSERTION(mPrivate, "SmartCardEvent called without Init");
   return mPrivate->SetTrusted(aResult);
 }
 
 
 // IDOMNSEvent maps
--- a/security/manager/ssl/src/nsSmartCardEvent.h
+++ b/security/manager/ssl/src/nsSmartCardEvent.h
@@ -58,21 +58,18 @@ public:
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMSMARTCARDEVENT
   NS_DECL_NSIDOMNSEVENT
 
   //NS_DECL_NSIPRIVATEDOMEEVENT
   NS_IMETHOD DuplicatePrivateData();
   NS_IMETHOD SetTarget(nsIDOMEventTarget *aTarget);
-  NS_IMETHOD SetCurrentTarget(nsIDOMEventTarget *aTarget);
-  NS_IMETHOD SetOriginalTarget(nsIDOMEventTarget *aTarget);
   NS_IMETHOD_(nsEvent*) GetInternalNSEvent();
   NS_IMETHOD_(PRBool ) IsDispatchStopped();
-  NS_IMETHOD_(PRBool ) HasOriginalTarget();
   NS_IMETHOD SetTrusted(PRBool aResult);
 
   NS_DECL_NSIDOMEVENT
 
 protected:
   nsCOMPtr<nsIDOMEvent> mInner;
   nsCOMPtr<nsIPrivateDOMEvent> mPrivate;
   nsCOMPtr<nsIDOMNSEvent> mNSEvent;