Bug 920377 part.10 Get rid of nsScrollAreaEvent r=roc
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 27 Sep 2013 15:20:56 +0900
changeset 162769 bd82d2c60f4654055505f012ce8fbc0b8ef7c953
parent 162768 65a887bb7f110bacdeaf3c39c5092ac7f7066f39
child 162770 299f2671ffc5a085d5c68609460337e52fcb209e
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs920377
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 920377 part.10 Get rid of nsScrollAreaEvent r=roc
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMScrollAreaEvent.cpp
content/events/src/nsDOMScrollAreaEvent.h
content/events/src/nsEventDispatcher.cpp
dom/interfaces/events/nsIDOMEvent.idl
layout/generic/nsGfxScrollFrame.cpp
widget/ContentEvents.h
widget/EventForwards.h
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -624,20 +624,20 @@ nsDOMEvent::DuplicatePrivateData()
       nsScrollPortEvent* scrollPortEvent =
         new nsScrollPortEvent(false, msg, nullptr);
       scrollPortEvent->AssignScrollPortEventData(*oldScrollPortEvent, true);
       newEvent = scrollPortEvent;
       break;
     }
     case NS_SCROLLAREA_EVENT:
     {
-      nsScrollAreaEvent* oldScrollAreaEvent =
-        static_cast<nsScrollAreaEvent*>(mEvent);
-      nsScrollAreaEvent* scrollAreaEvent = 
-        new nsScrollAreaEvent(false, msg, nullptr);
+      InternalScrollAreaEvent* oldScrollAreaEvent =
+        static_cast<InternalScrollAreaEvent*>(mEvent);
+      InternalScrollAreaEvent* scrollAreaEvent = 
+        new InternalScrollAreaEvent(false, msg, nullptr);
       scrollAreaEvent->AssignScrollAreaEventData(*oldScrollAreaEvent, true);
       newEvent = scrollAreaEvent;
       break;
     }
     case NS_MUTATION_EVENT:
     {
       InternalMutationEvent* mutationEvent =
         new InternalMutationEvent(false, msg);
--- a/content/events/src/nsDOMScrollAreaEvent.cpp
+++ b/content/events/src/nsDOMScrollAreaEvent.cpp
@@ -5,30 +5,32 @@
 
 #include "base/basictypes.h"
 #include "ipc/IPCMessageUtils.h"
 #include "mozilla/ContentEvents.h"
 
 #include "nsDOMScrollAreaEvent.h"
 #include "nsClientRect.h"
 
+using namespace mozilla;
+
 nsDOMScrollAreaEvent::nsDOMScrollAreaEvent(mozilla::dom::EventTarget* aOwner,
                                            nsPresContext *aPresContext,
-                                           nsScrollAreaEvent *aEvent)
+                                           InternalScrollAreaEvent* aEvent)
   : nsDOMUIEvent(aOwner, aPresContext, aEvent)
   , mClientArea(nullptr)
 {
   mClientArea.SetLayoutRect(aEvent ? aEvent->mArea : nsRect());
 }
 
 nsDOMScrollAreaEvent::~nsDOMScrollAreaEvent()
 {
   if (mEventIsInternal && mEvent) {
     if (mEvent->eventStructType == NS_SCROLLAREA_EVENT) {
-      delete static_cast<nsScrollAreaEvent *>(mEvent);
+      delete static_cast<InternalScrollAreaEvent*>(mEvent);
       mEvent = nullptr;
     }
   }
 }
 
 NS_IMPL_ADDREF_INHERITED(nsDOMScrollAreaEvent, nsDOMUIEvent)
 NS_IMPL_RELEASE_INHERITED(nsDOMScrollAreaEvent, nsDOMUIEvent)
 
@@ -97,14 +99,14 @@ nsDOMScrollAreaEvent::Deserialize(const 
 
   return true;
 }
 
 nsresult
 NS_NewDOMScrollAreaEvent(nsIDOMEvent **aInstancePtrResult,
                          mozilla::dom::EventTarget* aOwner,
                          nsPresContext *aPresContext,
-                         nsScrollAreaEvent *aEvent)
+                         InternalScrollAreaEvent* aEvent)
 {
   nsDOMScrollAreaEvent* ev =
     new nsDOMScrollAreaEvent(aOwner, aPresContext, aEvent);
   return CallQueryInterface(ev, aInstancePtrResult);
 }
--- a/content/events/src/nsDOMScrollAreaEvent.h
+++ b/content/events/src/nsDOMScrollAreaEvent.h
@@ -15,17 +15,17 @@
 #include "mozilla/dom/ScrollAreaEventBinding.h"
 
 class nsDOMScrollAreaEvent : public nsDOMUIEvent,
                              public nsIDOMScrollAreaEvent
 {
 public:
   nsDOMScrollAreaEvent(mozilla::dom::EventTarget* aOwner,
                        nsPresContext *aPresContext,
-                       nsScrollAreaEvent *aEvent);
+                       mozilla::InternalScrollAreaEvent* aEvent);
   virtual ~nsDOMScrollAreaEvent();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIDOMSCROLLAREAEVENT
 
   NS_FORWARD_NSIDOMUIEVENT(nsDOMUIEvent::)
 
--- a/content/events/src/nsEventDispatcher.cpp
+++ b/content/events/src/nsEventDispatcher.cpp
@@ -693,17 +693,17 @@ nsEventDispatcher::CreateEvent(mozilla::
                static_cast<InternalMutationEvent*>(aEvent));
     case NS_GUI_EVENT:
     case NS_SCROLLPORT_EVENT:
     case NS_UI_EVENT:
       return NS_NewDOMUIEvent(aDOMEvent, aOwner, aPresContext,
                               static_cast<nsGUIEvent*>(aEvent));
     case NS_SCROLLAREA_EVENT:
       return NS_NewDOMScrollAreaEvent(aDOMEvent, aOwner, aPresContext,
-                                      static_cast<nsScrollAreaEvent *>(aEvent));
+               static_cast<InternalScrollAreaEvent*>(aEvent));
     case NS_KEY_EVENT:
       return NS_NewDOMKeyboardEvent(aDOMEvent, aOwner, aPresContext,
                                     static_cast<nsKeyEvent*>(aEvent));
     case NS_COMPOSITION_EVENT:
       return NS_NewDOMCompositionEvent(
         aDOMEvent, aOwner,
         aPresContext, static_cast<nsCompositionEvent*>(aEvent));
     case NS_MOUSE_EVENT:
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -355,17 +355,17 @@ nsresult
 NS_NewDOMSimpleGestureEvent(nsIDOMEvent** aInstancePtrResult,
                             mozilla::dom::EventTarget* aOwner,
                             nsPresContext* aPresContext,
                             nsSimpleGestureEvent* aEvent);
 nsresult
 NS_NewDOMScrollAreaEvent(nsIDOMEvent** aInstancePtrResult,
                          mozilla::dom::EventTarget* aOwner,
                          nsPresContext* aPresContext,
-                         nsScrollAreaEvent* aEvent);
+                         mozilla::InternalScrollAreaEvent* aEvent);
 nsresult
 NS_NewDOMTransitionEvent(nsIDOMEvent** aInstancePtrResult,
                          mozilla::dom::EventTarget* aOwner,
                          nsPresContext* aPresContext,
                          mozilla::InternalTransitionEvent* aEvent);
 nsresult
 NS_NewDOMAnimationEvent(nsIDOMEvent** aInstancePtrResult,
                         mozilla::dom::EventTarget* aOwner,
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -4199,17 +4199,17 @@ nsGfxScrollFrameInner::ScrolledAreaEvent
   return NS_OK;
 }
 
 void
 nsGfxScrollFrameInner::FireScrolledAreaEvent()
 {
   mScrolledAreaEvent.Forget();
 
-  nsScrollAreaEvent event(true, NS_SCROLLEDAREACHANGED, nullptr);
+  InternalScrollAreaEvent event(true, NS_SCROLLEDAREACHANGED, nullptr);
   nsPresContext *prescontext = mOuter->PresContext();
   nsIContent* content = mOuter->GetContent();
 
   event.mArea = mScrolledFrame->GetScrollableOverflowRectRelativeToParent();
 
   nsIDocument *doc = content->GetCurrentDoc();
   if (doc) {
     nsEventDispatcher::Dispatch(doc, prescontext, &event, nullptr);
--- a/widget/ContentEvents.h
+++ b/widget/ContentEvents.h
@@ -245,11 +245,10 @@ public:
   }
 };
 
 } // namespace mozilla
 
 // TODO: Remove following typedefs
 typedef mozilla::InternalScriptErrorEvent nsScriptErrorEvent;
 typedef mozilla::InternalScrollPortEvent  nsScrollPortEvent;
-typedef mozilla::InternalScrollAreaEvent  nsScrollAreaEvent;
 
 #endif // mozilla_ContentEvents_h__
--- a/widget/EventForwards.h
+++ b/widget/EventForwards.h
@@ -125,11 +125,10 @@ namespace mozilla {
 typedef WidgetWheelEvent                   WheelEvent;
 }
 
 typedef mozilla::WidgetGestureNotifyEvent  nsGestureNotifyEvent;
 typedef mozilla::WidgetSimpleGestureEvent  nsSimpleGestureEvent;
 typedef mozilla::WidgetTouchEvent          nsTouchEvent;
 typedef mozilla::InternalScriptErrorEvent  nsScriptErrorEvent;
 typedef mozilla::InternalScrollPortEvent   nsScrollPortEvent;
-typedef mozilla::InternalScrollAreaEvent   nsScrollAreaEvent;
 
 #endif // mozilla_EventForwards_h__