mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 975688 part.25 Rename nsDOMScrollAreaEvent to mozilla::dom::ScrollAreaEvent r=smaug
--HG-- rename : dom/events/nsDOMScrollAreaEvent.cpp => dom/events/ScrollAreaEvent.cpp rename : dom/events/nsDOMScrollAreaEvent.h => dom/events/ScrollAreaEvent.h
This commit is contained in:
parent
beb0ea2022
commit
3e1e0f7de6
@ -926,10 +926,6 @@ DOMInterfaces = {
|
||||
'nativeType': 'nsScreen',
|
||||
},
|
||||
|
||||
'ScrollAreaEvent': {
|
||||
'nativeType': 'nsDOMScrollAreaEvent',
|
||||
},
|
||||
|
||||
'Selection': {
|
||||
'nativeType': 'mozilla::Selection',
|
||||
'resultNotAddRefed': [ 'anchorNode', 'focusNode', 'getRangeAt' ],
|
||||
|
@ -5,36 +5,36 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
#include "mozilla/dom/DOMRect.h"
|
||||
#include "mozilla/dom/ScrollAreaEvent.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
|
||||
#include "nsDOMScrollAreaEvent.h"
|
||||
#include "mozilla/dom/DOMRect.h"
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
nsDOMScrollAreaEvent::nsDOMScrollAreaEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
InternalScrollAreaEvent* aEvent)
|
||||
ScrollAreaEvent::ScrollAreaEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalScrollAreaEvent* aEvent)
|
||||
: nsDOMUIEvent(aOwner, aPresContext, aEvent)
|
||||
, mClientArea(nullptr)
|
||||
{
|
||||
mClientArea.SetLayoutRect(aEvent ? aEvent->mArea : nsRect());
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsDOMScrollAreaEvent, nsDOMUIEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(nsDOMScrollAreaEvent, nsDOMUIEvent)
|
||||
NS_IMPL_ADDREF_INHERITED(ScrollAreaEvent, nsDOMUIEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(ScrollAreaEvent, nsDOMUIEvent)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMScrollAreaEvent)
|
||||
NS_INTERFACE_MAP_BEGIN(ScrollAreaEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMScrollAreaEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMUIEvent)
|
||||
|
||||
|
||||
#define FORWARD_GETTER(_name) \
|
||||
NS_IMETHODIMP \
|
||||
nsDOMScrollAreaEvent::Get ## _name(float* aResult) \
|
||||
{ \
|
||||
*aResult = _name(); \
|
||||
return NS_OK; \
|
||||
#define FORWARD_GETTER(_name) \
|
||||
NS_IMETHODIMP \
|
||||
ScrollAreaEvent::Get ## _name(float* aResult) \
|
||||
{ \
|
||||
*aResult = _name(); \
|
||||
return NS_OK; \
|
||||
}
|
||||
|
||||
FORWARD_GETTER(X)
|
||||
@ -43,13 +43,15 @@ FORWARD_GETTER(Width)
|
||||
FORWARD_GETTER(Height)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMScrollAreaEvent::InitScrollAreaEvent(const nsAString &aEventType,
|
||||
bool aCanBubble,
|
||||
bool aCancelable,
|
||||
nsIDOMWindow *aView,
|
||||
int32_t aDetail,
|
||||
float aX, float aY,
|
||||
float aWidth, float aHeight)
|
||||
ScrollAreaEvent::InitScrollAreaEvent(const nsAString& aEventType,
|
||||
bool aCanBubble,
|
||||
bool aCancelable,
|
||||
nsIDOMWindow* aView,
|
||||
int32_t aDetail,
|
||||
float aX,
|
||||
float aY,
|
||||
float aWidth,
|
||||
float aHeight)
|
||||
{
|
||||
nsresult rv = nsDOMUIEvent::InitUIEvent(aEventType, aCanBubble, aCancelable, aView, aDetail);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -60,8 +62,8 @@ nsDOMScrollAreaEvent::InitScrollAreaEvent(const nsAString &aEventType,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
nsDOMScrollAreaEvent::Serialize(IPC::Message* aMsg,
|
||||
bool aSerializeInterfaceType)
|
||||
ScrollAreaEvent::Serialize(IPC::Message* aMsg,
|
||||
bool aSerializeInterfaceType)
|
||||
{
|
||||
if (aSerializeInterfaceType) {
|
||||
IPC::WriteParam(aMsg, NS_LITERAL_STRING("scrollareaevent"));
|
||||
@ -76,7 +78,7 @@ nsDOMScrollAreaEvent::Serialize(IPC::Message* aMsg,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
nsDOMScrollAreaEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
|
||||
ScrollAreaEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
|
||||
{
|
||||
NS_ENSURE_TRUE(nsDOMEvent::Deserialize(aMsg, aIter), false);
|
||||
|
||||
@ -90,13 +92,18 @@ nsDOMScrollAreaEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsresult
|
||||
NS_NewDOMScrollAreaEvent(nsIDOMEvent **aInstancePtrResult,
|
||||
mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
NS_NewDOMScrollAreaEvent(nsIDOMEvent** aInstancePtrResult,
|
||||
EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalScrollAreaEvent* aEvent)
|
||||
{
|
||||
nsDOMScrollAreaEvent* ev =
|
||||
new nsDOMScrollAreaEvent(aOwner, aPresContext, aEvent);
|
||||
ScrollAreaEvent* ev = new ScrollAreaEvent(aOwner, aPresContext, aEvent);
|
||||
return CallQueryInterface(ev, aInstancePtrResult);
|
||||
}
|
@ -3,8 +3,8 @@
|
||||
* 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 nsDOMScrollAreaEvent_h__
|
||||
#define nsDOMScrollAreaEvent_h__
|
||||
#ifndef mozilla_dom_ScrollAreaEvent_h_
|
||||
#define mozilla_dom_ScrollAreaEvent_h_
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/EventForwards.h"
|
||||
@ -14,15 +14,16 @@
|
||||
#include "mozilla/dom/DOMRect.h"
|
||||
#include "mozilla/dom/ScrollAreaEventBinding.h"
|
||||
|
||||
class nsDOMScrollAreaEvent : public nsDOMUIEvent,
|
||||
public nsIDOMScrollAreaEvent
|
||||
{
|
||||
typedef mozilla::dom::DOMRect DOMRect;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class ScrollAreaEvent : public nsDOMUIEvent,
|
||||
public nsIDOMScrollAreaEvent
|
||||
{
|
||||
public:
|
||||
nsDOMScrollAreaEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext *aPresContext,
|
||||
mozilla::InternalScrollAreaEvent* aEvent);
|
||||
ScrollAreaEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
InternalScrollAreaEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
@ -41,7 +42,7 @@ public:
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
|
||||
{
|
||||
return mozilla::dom::ScrollAreaEventBinding::Wrap(aCx, aScope, this);
|
||||
return ScrollAreaEventBinding::Wrap(aCx, aScope, this);
|
||||
}
|
||||
|
||||
float X() const
|
||||
@ -71,7 +72,7 @@ public:
|
||||
int32_t aDetail,
|
||||
float aX, float aY,
|
||||
float aWidth, float aHeight,
|
||||
mozilla::ErrorResult& aRv)
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
aRv = InitScrollAreaEvent(aType, aCanBubble, aCancelable, aView,
|
||||
aDetail, aX, aY, aWidth, aHeight);
|
||||
@ -81,4 +82,7 @@ protected:
|
||||
DOMRect mClientArea;
|
||||
};
|
||||
|
||||
#endif // nsDOMScrollAreaEvent_h__
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_ScrollAreaEvent_h_
|
@ -54,6 +54,7 @@ EXPORTS.mozilla.dom += [
|
||||
'NotifyAudioAvailableEvent.h',
|
||||
'NotifyPaintEvent.h',
|
||||
'PointerEvent.h',
|
||||
'ScrollAreaEvent.h',
|
||||
'SimpleGestureEvent.h',
|
||||
'Touch.h',
|
||||
'TouchEvent.h',
|
||||
@ -112,9 +113,6 @@ SOURCES += [
|
||||
'nsDOMEvent.cpp',
|
||||
# nsDOMEvent.cpp should be built separately because it includes
|
||||
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
||||
'nsDOMScrollAreaEvent.cpp',
|
||||
# nsDOMEvent.cpp should be built separately because it includes
|
||||
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
||||
'nsDOMUIEvent.cpp',
|
||||
# nsDOMEvent.cpp should be built separately because it includes
|
||||
# mozilla/HalSensor.h, which includes ipc/IPCMessageUtils.h, which
|
||||
@ -122,6 +120,9 @@ SOURCES += [
|
||||
'nsEventListenerManager.cpp',
|
||||
# nsEventStateManager.cpp should be built separately because of Mac OS X headers.
|
||||
'nsEventStateManager.cpp',
|
||||
# nsDOMEvent.cpp should be built separately because it includes
|
||||
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
||||
'ScrollAreaEvent.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WEBSPEECH']:
|
||||
|
Loading…
Reference in New Issue
Block a user