mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 975688 part.2 Rename nsDOMAnimationEvent to mozilla::dom::AnimationEvent r=smaug
--HG-- rename : dom/events/nsDOMAnimationEvent.cpp => dom/events/AnimationEvent.cpp rename : dom/events/nsDOMAnimationEvent.h => dom/events/AnimationEvent.h
This commit is contained in:
parent
a4dd828377
commit
64ccb1e296
@ -98,7 +98,7 @@ DOMInterfaces = {
|
||||
},
|
||||
|
||||
'AnimationEvent': {
|
||||
'nativeType': 'nsDOMAnimationEvent',
|
||||
'nativeType': 'mozilla::dom::AnimationEvent',
|
||||
},
|
||||
|
||||
'ArchiveReader': {
|
||||
|
@ -3,14 +3,15 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMAnimationEvent.h"
|
||||
#include "prtime.h"
|
||||
#include "mozilla/dom/AnimationEvent.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "prtime.h"
|
||||
|
||||
using namespace mozilla;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
nsDOMAnimationEvent::nsDOMAnimationEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
AnimationEvent::AnimationEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalAnimationEvent* aEvent)
|
||||
: nsDOMEvent(aOwner, aPresContext,
|
||||
aEvent ? aEvent : new InternalAnimationEvent(false, 0))
|
||||
@ -24,22 +25,22 @@ nsDOMAnimationEvent::nsDOMAnimationEvent(mozilla::dom::EventTarget* aOwner,
|
||||
}
|
||||
}
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMAnimationEvent)
|
||||
NS_INTERFACE_MAP_BEGIN(AnimationEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMAnimationEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsDOMAnimationEvent, nsDOMEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(nsDOMAnimationEvent, nsDOMEvent)
|
||||
NS_IMPL_ADDREF_INHERITED(AnimationEvent, nsDOMEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(AnimationEvent, nsDOMEvent)
|
||||
|
||||
//static
|
||||
already_AddRefed<nsDOMAnimationEvent>
|
||||
nsDOMAnimationEvent::Constructor(const mozilla::dom::GlobalObject& aGlobal,
|
||||
already_AddRefed<AnimationEvent>
|
||||
AnimationEvent::Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const mozilla::dom::AnimationEventInit& aParam,
|
||||
mozilla::ErrorResult& aRv)
|
||||
const AnimationEventInit& aParam,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<mozilla::dom::EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
nsRefPtr<nsDOMAnimationEvent> e = new nsDOMAnimationEvent(t, nullptr, nullptr);
|
||||
nsCOMPtr<EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
nsRefPtr<AnimationEvent> e = new AnimationEvent(t, nullptr, nullptr);
|
||||
bool trusted = e->Init(t);
|
||||
|
||||
aRv = e->InitEvent(aType, aParam.mBubbles, aParam.mCancelable);
|
||||
@ -54,39 +55,44 @@ nsDOMAnimationEvent::Constructor(const mozilla::dom::GlobalObject& aGlobal,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMAnimationEvent::GetAnimationName(nsAString & aAnimationName)
|
||||
AnimationEvent::GetAnimationName(nsAString& aAnimationName)
|
||||
{
|
||||
aAnimationName = mEvent->AsAnimationEvent()->animationName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMAnimationEvent::GetElapsedTime(float *aElapsedTime)
|
||||
AnimationEvent::GetElapsedTime(float* aElapsedTime)
|
||||
{
|
||||
*aElapsedTime = ElapsedTime();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
float
|
||||
nsDOMAnimationEvent::ElapsedTime()
|
||||
AnimationEvent::ElapsedTime()
|
||||
{
|
||||
return mEvent->AsAnimationEvent()->elapsedTime;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMAnimationEvent::GetPseudoElement(nsAString& aPseudoElement)
|
||||
AnimationEvent::GetPseudoElement(nsAString& aPseudoElement)
|
||||
{
|
||||
aPseudoElement = mEvent->AsAnimationEvent()->pseudoElement;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsresult
|
||||
NS_NewDOMAnimationEvent(nsIDOMEvent **aInstancePtrResult,
|
||||
mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
InternalAnimationEvent *aEvent)
|
||||
NS_NewDOMAnimationEvent(nsIDOMEvent** aInstancePtrResult,
|
||||
EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalAnimationEvent* aEvent)
|
||||
{
|
||||
nsDOMAnimationEvent* it =
|
||||
new nsDOMAnimationEvent(aOwner, aPresContext, aEvent);
|
||||
AnimationEvent* it = new AnimationEvent(aOwner, aPresContext, aEvent);
|
||||
return CallQueryInterface(it, aInstancePtrResult);
|
||||
}
|
@ -2,8 +2,8 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#ifndef nsDOMAnimationEvent_h_
|
||||
#define nsDOMAnimationEvent_h_
|
||||
#ifndef mozilla_dom_AnimationEvent_h_
|
||||
#define mozilla_dom_AnimationEvent_h_
|
||||
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsIDOMAnimationEvent.h"
|
||||
@ -12,28 +12,31 @@
|
||||
|
||||
class nsAString;
|
||||
|
||||
class nsDOMAnimationEvent : public nsDOMEvent,
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class AnimationEvent : public nsDOMEvent,
|
||||
public nsIDOMAnimationEvent
|
||||
{
|
||||
public:
|
||||
nsDOMAnimationEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
mozilla::InternalAnimationEvent* aEvent);
|
||||
AnimationEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalAnimationEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_FORWARD_TO_NSDOMEVENT
|
||||
NS_DECL_NSIDOMANIMATIONEVENT
|
||||
|
||||
static already_AddRefed<nsDOMAnimationEvent>
|
||||
Constructor(const mozilla::dom::GlobalObject& aGlobal,
|
||||
static already_AddRefed<AnimationEvent>
|
||||
Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const mozilla::dom::AnimationEventInit& aParam,
|
||||
mozilla::ErrorResult& aRv);
|
||||
const AnimationEventInit& aParam,
|
||||
ErrorResult& aRv);
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
|
||||
{
|
||||
return mozilla::dom::AnimationEventBinding::Wrap(aCx, aScope, this);
|
||||
return AnimationEventBinding::Wrap(aCx, aScope, this);
|
||||
}
|
||||
|
||||
// xpidl implementation
|
||||
@ -43,4 +46,7 @@ public:
|
||||
float ElapsedTime();
|
||||
};
|
||||
|
||||
#endif /* !defined(nsDOMAnimationEvent_h_) */
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_AnimationEvent_h_
|
@ -36,6 +36,7 @@ EXPORTS.mozilla += [
|
||||
]
|
||||
|
||||
EXPORTS.mozilla.dom += [
|
||||
'AnimationEvent.h',
|
||||
'EventTarget.h',
|
||||
'PointerEvent.h',
|
||||
'Touch.h',
|
||||
@ -46,10 +47,10 @@ if CONFIG['MOZ_WEBSPEECH']:
|
||||
EXPORTS.mozilla.dom += ['SpeechRecognitionError.h']
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'AnimationEvent.cpp',
|
||||
'EventTarget.cpp',
|
||||
'nsAsyncDOMEvent.cpp',
|
||||
'nsContentEventHandler.cpp',
|
||||
'nsDOMAnimationEvent.cpp',
|
||||
'nsDOMBeforeUnloadEvent.cpp',
|
||||
'nsDOMClipboardEvent.cpp',
|
||||
'nsDOMCommandEvent.cpp',
|
||||
|
Loading…
Reference in New Issue
Block a user