зеркало из https://github.com/mozilla/gecko-dev.git
Bug 920377 part.10 Get rid of nsScrollAreaEvent r=roc
This commit is contained in:
Родитель
3e0f295f1b
Коммит
323a652628
|
@ -629,10 +629,10 @@ nsDOMEvent::DuplicatePrivateData()
|
|||
}
|
||||
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;
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
#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)
|
||||
{
|
||||
|
@ -23,7 +25,7 @@ nsDOMScrollAreaEvent::~nsDOMScrollAreaEvent()
|
|||
{
|
||||
if (mEventIsInternal && mEvent) {
|
||||
if (mEvent->eventStructType == NS_SCROLLAREA_EVENT) {
|
||||
delete static_cast<nsScrollAreaEvent *>(mEvent);
|
||||
delete static_cast<InternalScrollAreaEvent*>(mEvent);
|
||||
mEvent = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +104,7 @@ nsresult
|
|||
NS_NewDOMScrollAreaEvent(nsIDOMEvent **aInstancePtrResult,
|
||||
mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
nsScrollAreaEvent *aEvent)
|
||||
InternalScrollAreaEvent* aEvent)
|
||||
{
|
||||
nsDOMScrollAreaEvent* ev =
|
||||
new nsDOMScrollAreaEvent(aOwner, aPresContext, aEvent);
|
||||
|
|
|
@ -20,7 +20,7 @@ class nsDOMScrollAreaEvent : public nsDOMUIEvent,
|
|||
public:
|
||||
nsDOMScrollAreaEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
nsScrollAreaEvent *aEvent);
|
||||
mozilla::InternalScrollAreaEvent* aEvent);
|
||||
virtual ~nsDOMScrollAreaEvent();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -698,7 +698,7 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
|
|||
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));
|
||||
|
|
|
@ -360,7 +360,7 @@ 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,
|
||||
|
|
|
@ -4204,7 +4204,7 @@ nsGfxScrollFrameInner::FireScrolledAreaEvent()
|
|||
{
|
||||
mScrolledAreaEvent.Forget();
|
||||
|
||||
nsScrollAreaEvent event(true, NS_SCROLLEDAREACHANGED, nullptr);
|
||||
InternalScrollAreaEvent event(true, NS_SCROLLEDAREACHANGED, nullptr);
|
||||
nsPresContext *prescontext = mOuter->PresContext();
|
||||
nsIContent* content = mOuter->GetContent();
|
||||
|
||||
|
|
|
@ -250,6 +250,5 @@ public:
|
|||
// TODO: Remove following typedefs
|
||||
typedef mozilla::InternalScriptErrorEvent nsScriptErrorEvent;
|
||||
typedef mozilla::InternalScrollPortEvent nsScrollPortEvent;
|
||||
typedef mozilla::InternalScrollAreaEvent nsScrollAreaEvent;
|
||||
|
||||
#endif // mozilla_ContentEvents_h__
|
||||
|
|
|
@ -130,6 +130,5 @@ typedef mozilla::WidgetSimpleGestureEvent nsSimpleGestureEvent;
|
|||
typedef mozilla::WidgetTouchEvent nsTouchEvent;
|
||||
typedef mozilla::InternalScriptErrorEvent nsScriptErrorEvent;
|
||||
typedef mozilla::InternalScrollPortEvent nsScrollPortEvent;
|
||||
typedef mozilla::InternalScrollAreaEvent nsScrollAreaEvent;
|
||||
|
||||
#endif // mozilla_EventForwards_h__
|
||||
|
|
Загрузка…
Ссылка в новой задаче