Bug 920377 part.5 Get rid of nsAnimationEvent r=roc

This commit is contained in:
Masayuki Nakano 2013-09-27 15:20:54 +09:00
Родитель e08581e1a5
Коммит 8f0b224c34
8 изменённых файлов: 21 добавлений и 22 удалений

Просмотреть файл

@ -7,14 +7,15 @@
#include "prtime.h"
#include "mozilla/ContentEvents.h"
using namespace mozilla;
nsDOMAnimationEvent::nsDOMAnimationEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext *aPresContext,
nsAnimationEvent *aEvent)
InternalAnimationEvent* aEvent)
: nsDOMEvent(aOwner, aPresContext,
aEvent ? aEvent : new nsAnimationEvent(false, 0,
EmptyString(),
0.0,
EmptyString()))
aEvent ? aEvent :
new InternalAnimationEvent(false, 0, EmptyString(),
0.0, EmptyString()))
{
if (aEvent) {
mEventIsInternal = false;
@ -86,7 +87,7 @@ nsresult
NS_NewDOMAnimationEvent(nsIDOMEvent **aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
nsPresContext *aPresContext,
nsAnimationEvent *aEvent)
InternalAnimationEvent *aEvent)
{
nsDOMAnimationEvent* it =
new nsDOMAnimationEvent(aOwner, aPresContext, aEvent);

Просмотреть файл

@ -18,7 +18,7 @@ class nsDOMAnimationEvent : public nsDOMEvent,
public:
nsDOMAnimationEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext *aPresContext,
nsAnimationEvent *aEvent);
mozilla::InternalAnimationEvent* aEvent);
~nsDOMAnimationEvent();
NS_DECL_ISUPPORTS_INHERITED
@ -47,10 +47,10 @@ public:
}
private:
nsAnimationEvent* AnimationEvent() {
mozilla::InternalAnimationEvent* AnimationEvent() {
NS_ABORT_IF_FALSE(mEvent->eventStructType == NS_ANIMATION_EVENT,
"unexpected struct type");
return static_cast<nsAnimationEvent*>(mEvent);
return static_cast<mozilla::InternalAnimationEvent*>(mEvent);
}
};

Просмотреть файл

@ -723,13 +723,13 @@ nsDOMEvent::DuplicatePrivateData()
}
case NS_ANIMATION_EVENT:
{
nsAnimationEvent* oldAnimationEvent =
static_cast<nsAnimationEvent*>(mEvent);
nsAnimationEvent* animationEvent =
new nsAnimationEvent(false, msg,
oldAnimationEvent->animationName,
oldAnimationEvent->elapsedTime,
oldAnimationEvent->pseudoElement);
InternalAnimationEvent* oldAnimationEvent =
static_cast<InternalAnimationEvent*>(mEvent);
InternalAnimationEvent* animationEvent =
new InternalAnimationEvent(false, msg,
oldAnimationEvent->animationName,
oldAnimationEvent->elapsedTime,
oldAnimationEvent->pseudoElement);
animationEvent->AssignAnimationEventData(*oldAnimationEvent, true);
newEvent = animationEvent;
break;

Просмотреть файл

@ -747,7 +747,7 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
static_cast<nsTransitionEvent*>(aEvent));
case NS_ANIMATION_EVENT:
return NS_NewDOMAnimationEvent(aDOMEvent, aOwner, aPresContext,
static_cast<nsAnimationEvent*>(aEvent));
static_cast<InternalAnimationEvent*>(aEvent));
default:
// For all other types of events, create a vanilla event object.
return NS_NewDOMEvent(aDOMEvent, aOwner, aPresContext, aEvent);

Просмотреть файл

@ -370,7 +370,7 @@ nsresult
NS_NewDOMAnimationEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
nsAnimationEvent* aEvent);
mozilla::InternalAnimationEvent* aEvent);
nsresult
NS_NewDOMTouchEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,

Просмотреть файл

@ -23,7 +23,7 @@ class Declaration;
struct AnimationEventInfo {
nsRefPtr<mozilla::dom::Element> mElement;
nsAnimationEvent mEvent;
mozilla::InternalAnimationEvent mEvent;
AnimationEventInfo(mozilla::dom::Element *aElement,
const nsString& aAnimationName,
@ -35,7 +35,7 @@ struct AnimationEventInfo {
{
}
// nsAnimationEvent doesn't support copy-construction, so we need
// InternalAnimationEvent doesn't support copy-construction, so we need
// to ourselves in order to work with nsTArray
AnimationEventInfo(const AnimationEventInfo &aOther)
: mElement(aOther.mElement),

Просмотреть файл

@ -255,6 +255,5 @@ typedef mozilla::InternalFormEvent nsFormEvent;
typedef mozilla::InternalClipboardEvent nsClipboardEvent;
typedef mozilla::InternalFocusEvent nsFocusEvent;
typedef mozilla::InternalTransitionEvent nsTransitionEvent;
typedef mozilla::InternalAnimationEvent nsAnimationEvent;
#endif // mozilla_ContentEvents_h__

Просмотреть файл

@ -135,6 +135,5 @@ typedef mozilla::InternalFormEvent nsFormEvent;
typedef mozilla::InternalClipboardEvent nsClipboardEvent;
typedef mozilla::InternalFocusEvent nsFocusEvent;
typedef mozilla::InternalTransitionEvent nsTransitionEvent;
typedef mozilla::InternalAnimationEvent nsAnimationEvent;
#endif // mozilla_EventForwards_h__