mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 975688 part.22 Rename nsDOMTrasitionEvent to mozilla::dom::TrasitionEvent r=smaug
--HG-- rename : dom/events/nsDOMTransitionEvent.cpp => dom/events/TransitionEvent.cpp rename : dom/events/nsDOMTransitionEvent.h => dom/events/TransitionEvent.h
This commit is contained in:
parent
6ab278cb6c
commit
f24c8d7c56
@ -1231,10 +1231,6 @@ DOMInterfaces = {
|
||||
'headerFile': 'mozilla/dom/TouchEvent.h',
|
||||
},
|
||||
|
||||
'TransitionEvent': {
|
||||
'nativeType': 'nsDOMTransitionEvent',
|
||||
},
|
||||
|
||||
'TreeColumns': {
|
||||
'nativeType': 'nsTreeColumns',
|
||||
},
|
||||
|
@ -3,15 +3,16 @@
|
||||
* 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 "nsDOMTransitionEvent.h"
|
||||
#include "prtime.h"
|
||||
#include "mozilla/dom/TransitionEvent.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "prtime.h"
|
||||
|
||||
using namespace mozilla;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
nsDOMTransitionEvent::nsDOMTransitionEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
InternalTransitionEvent* aEvent)
|
||||
TransitionEvent::TransitionEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalTransitionEvent* aEvent)
|
||||
: nsDOMEvent(aOwner, aPresContext,
|
||||
aEvent ? aEvent : new InternalTransitionEvent(false, 0))
|
||||
{
|
||||
@ -24,22 +25,22 @@ nsDOMTransitionEvent::nsDOMTransitionEvent(mozilla::dom::EventTarget* aOwner,
|
||||
}
|
||||
}
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMTransitionEvent)
|
||||
NS_INTERFACE_MAP_BEGIN(TransitionEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMTransitionEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsDOMTransitionEvent, nsDOMEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(nsDOMTransitionEvent, nsDOMEvent)
|
||||
NS_IMPL_ADDREF_INHERITED(TransitionEvent, nsDOMEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(TransitionEvent, nsDOMEvent)
|
||||
|
||||
//static
|
||||
already_AddRefed<nsDOMTransitionEvent>
|
||||
nsDOMTransitionEvent::Constructor(const mozilla::dom::GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const mozilla::dom::TransitionEventInit& aParam,
|
||||
mozilla::ErrorResult& aRv)
|
||||
// static
|
||||
already_AddRefed<TransitionEvent>
|
||||
TransitionEvent::Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const TransitionEventInit& aParam,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<mozilla::dom::EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
nsRefPtr<nsDOMTransitionEvent> e = new nsDOMTransitionEvent(t, nullptr, nullptr);
|
||||
nsCOMPtr<EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
nsRefPtr<TransitionEvent> e = new TransitionEvent(t, nullptr, nullptr);
|
||||
bool trusted = e->Init(t);
|
||||
|
||||
aRv = e->InitEvent(aType, aParam.mBubbles, aParam.mCancelable);
|
||||
@ -54,39 +55,44 @@ nsDOMTransitionEvent::Constructor(const mozilla::dom::GlobalObject& aGlobal,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTransitionEvent::GetPropertyName(nsAString & aPropertyName)
|
||||
TransitionEvent::GetPropertyName(nsAString& aPropertyName)
|
||||
{
|
||||
aPropertyName = mEvent->AsTransitionEvent()->propertyName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTransitionEvent::GetElapsedTime(float *aElapsedTime)
|
||||
TransitionEvent::GetElapsedTime(float* aElapsedTime)
|
||||
{
|
||||
*aElapsedTime = ElapsedTime();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
float
|
||||
nsDOMTransitionEvent::ElapsedTime()
|
||||
TransitionEvent::ElapsedTime()
|
||||
{
|
||||
return mEvent->AsTransitionEvent()->elapsedTime;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMTransitionEvent::GetPseudoElement(nsAString& aPseudoElement)
|
||||
TransitionEvent::GetPseudoElement(nsAString& aPseudoElement)
|
||||
{
|
||||
aPseudoElement = mEvent->AsTransitionEvent()->pseudoElement;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsresult
|
||||
NS_NewDOMTransitionEvent(nsIDOMEvent **aInstancePtrResult,
|
||||
mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
NS_NewDOMTransitionEvent(nsIDOMEvent** aInstancePtrResult,
|
||||
EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalTransitionEvent* aEvent)
|
||||
{
|
||||
nsDOMTransitionEvent *it =
|
||||
new nsDOMTransitionEvent(aOwner, aPresContext, aEvent);
|
||||
TransitionEvent *it = new TransitionEvent(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 nsDOMTransitionEvent_h_
|
||||
#define nsDOMTransitionEvent_h_
|
||||
#ifndef mozilla_dom_TransitionEvent_h_
|
||||
#define mozilla_dom_TransitionEvent_h_
|
||||
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsIDOMTransitionEvent.h"
|
||||
@ -12,28 +12,31 @@
|
||||
|
||||
class nsAString;
|
||||
|
||||
class nsDOMTransitionEvent : public nsDOMEvent,
|
||||
public nsIDOMTransitionEvent
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class TransitionEvent : public nsDOMEvent,
|
||||
public nsIDOMTransitionEvent
|
||||
{
|
||||
public:
|
||||
nsDOMTransitionEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
mozilla::InternalTransitionEvent* aEvent);
|
||||
TransitionEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalTransitionEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_FORWARD_TO_NSDOMEVENT
|
||||
NS_DECL_NSIDOMTRANSITIONEVENT
|
||||
|
||||
static already_AddRefed<nsDOMTransitionEvent>
|
||||
Constructor(const mozilla::dom::GlobalObject& aGlobal,
|
||||
static already_AddRefed<TransitionEvent>
|
||||
Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const mozilla::dom::TransitionEventInit& aParam,
|
||||
mozilla::ErrorResult& aRv);
|
||||
const TransitionEventInit& aParam,
|
||||
ErrorResult& aRv);
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
|
||||
{
|
||||
return mozilla::dom::TransitionEventBinding::Wrap(aCx, aScope, this);
|
||||
return TransitionEventBinding::Wrap(aCx, aScope, this);
|
||||
}
|
||||
|
||||
// xpidl implementation
|
||||
@ -43,4 +46,7 @@ public:
|
||||
float ElapsedTime();
|
||||
};
|
||||
|
||||
#endif /* !defined(nsDOMTransitionEvent_h_) */
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_TransitionEvent_h_
|
@ -56,6 +56,7 @@ EXPORTS.mozilla.dom += [
|
||||
'SimpleGestureEvent.h',
|
||||
'Touch.h',
|
||||
'TouchEvent.h',
|
||||
'TransitionEvent.h',
|
||||
'WheelEvent.h',
|
||||
]
|
||||
|
||||
@ -84,7 +85,6 @@ UNIFIED_SOURCES += [
|
||||
'nsContentEventHandler.cpp',
|
||||
'nsDOMEventTargetHelper.cpp',
|
||||
'nsDOMTextEvent.cpp',
|
||||
'nsDOMTransitionEvent.cpp',
|
||||
'nsDOMXULCommandEvent.cpp',
|
||||
'nsEventDispatcher.cpp',
|
||||
'nsEventListenerService.cpp',
|
||||
@ -97,6 +97,7 @@ UNIFIED_SOURCES += [
|
||||
'TextComposition.cpp',
|
||||
'Touch.cpp',
|
||||
'TouchEvent.cpp',
|
||||
'TransitionEvent.cpp',
|
||||
'WheelEvent.cpp',
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user