Bug 866679 - Rename DOMSVGZoomEvent to SVGZoomEvent. r=Ms2ger

--HG--
rename : content/svg/content/src/nsDOMSVGZoomEvent.cpp => content/svg/content/src/SVGZoomEvent.cpp
rename : content/svg/content/src/nsDOMSVGZoomEvent.h => content/svg/content/src/SVGZoomEvent.h
This commit is contained in:
Andrea Marchesini 2013-04-30 13:43:07 -04:00
parent fb7e9aeb76
commit 1c438c86dd
4 changed files with 34 additions and 27 deletions

View File

@ -27,7 +27,6 @@ CPPSRCS = \
DOMSVGPointList.cpp \
DOMSVGStringList.cpp \
DOMSVGTransformList.cpp \
nsDOMSVGZoomEvent.cpp \
nsISVGPoint.cpp \
nsSVGAngle.cpp \
nsSVGAnimatedTransformList.cpp \
@ -153,6 +152,7 @@ CPPSRCS = \
SVGUseElement.cpp \
SVGViewBoxSMILType.cpp \
SVGViewElement.cpp \
SVGZoomEvent.cpp \
$(NULL)
include $(topsrcdir)/config/config.mk

View File

@ -3,22 +3,24 @@
* 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 "nsDOMSVGZoomEvent.h"
#include "mozilla/dom/SVGZoomEvent.h"
#include "DOMSVGPoint.h"
#include "mozilla/dom/SVGSVGElement.h"
#include "nsIPresShell.h"
#include "nsIDocument.h"
#include "mozilla/dom/Element.h"
using namespace mozilla;
using namespace mozilla::dom;
DOMCI_DATA(SVGZoomEvent, mozilla::dom::SVGZoomEvent)
namespace mozilla {
namespace dom {
//----------------------------------------------------------------------
// Implementation
nsDOMSVGZoomEvent::nsDOMSVGZoomEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
nsGUIEvent* aEvent)
SVGZoomEvent::SVGZoomEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
nsGUIEvent* aEvent)
: nsDOMUIEvent(aOwner, aPresContext,
aEvent ? aEvent : new nsGUIEvent(false, NS_SVG_ZOOM, 0))
, mPreviousScale(0)
@ -75,12 +77,10 @@ nsDOMSVGZoomEvent::nsDOMSVGZoomEvent(mozilla::dom::EventTarget* aOwner,
//----------------------------------------------------------------------
// nsISupports methods:
NS_IMPL_ADDREF_INHERITED(nsDOMSVGZoomEvent, nsDOMUIEvent)
NS_IMPL_RELEASE_INHERITED(nsDOMSVGZoomEvent, nsDOMUIEvent)
NS_IMPL_ADDREF_INHERITED(SVGZoomEvent, nsDOMUIEvent)
NS_IMPL_RELEASE_INHERITED(SVGZoomEvent, nsDOMUIEvent)
DOMCI_DATA(SVGZoomEvent, nsDOMSVGZoomEvent)
NS_INTERFACE_MAP_BEGIN(nsDOMSVGZoomEvent)
NS_INTERFACE_MAP_BEGIN(SVGZoomEvent)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGZoomEvent)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGZoomEvent)
NS_INTERFACE_MAP_END_INHERITING(nsDOMUIEvent)
@ -91,7 +91,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMUIEvent)
/* readonly attribute float previousScale; */
NS_IMETHODIMP
nsDOMSVGZoomEvent::GetPreviousScale(float *aPreviousScale)
SVGZoomEvent::GetPreviousScale(float *aPreviousScale)
{
*aPreviousScale = mPreviousScale;
return NS_OK;
@ -99,7 +99,7 @@ nsDOMSVGZoomEvent::GetPreviousScale(float *aPreviousScale)
/* readonly attribute SVGPoint previousTranslate; */
NS_IMETHODIMP
nsDOMSVGZoomEvent::GetPreviousTranslate(nsISupports **aPreviousTranslate)
SVGZoomEvent::GetPreviousTranslate(nsISupports **aPreviousTranslate)
{
*aPreviousTranslate = mPreviousTranslate;
NS_IF_ADDREF(*aPreviousTranslate);
@ -107,7 +107,7 @@ nsDOMSVGZoomEvent::GetPreviousTranslate(nsISupports **aPreviousTranslate)
}
/* readonly attribute float newScale; */
NS_IMETHODIMP nsDOMSVGZoomEvent::GetNewScale(float *aNewScale)
NS_IMETHODIMP SVGZoomEvent::GetNewScale(float *aNewScale)
{
*aNewScale = mNewScale;
return NS_OK;
@ -115,13 +115,16 @@ NS_IMETHODIMP nsDOMSVGZoomEvent::GetNewScale(float *aNewScale)
/* readonly attribute SVGPoint newTranslate; */
NS_IMETHODIMP
nsDOMSVGZoomEvent::GetNewTranslate(nsISupports **aNewTranslate)
SVGZoomEvent::GetNewTranslate(nsISupports **aNewTranslate)
{
*aNewTranslate = mNewTranslate;
NS_IF_ADDREF(*aNewTranslate);
return NS_OK;
}
} // namespace dom
} // namespace mozilla
////////////////////////////////////////////////////////////////////////
// Exported creation functions:
@ -132,6 +135,7 @@ NS_NewDOMSVGZoomEvent(nsIDOMEvent** aInstancePtrResult,
nsPresContext* aPresContext,
nsGUIEvent *aEvent)
{
nsDOMSVGZoomEvent* it = new nsDOMSVGZoomEvent(aOwner, aPresContext, aEvent);
mozilla::dom::SVGZoomEvent* it =
new mozilla::dom::SVGZoomEvent(aOwner, aPresContext, aEvent);
return CallQueryInterface(it, aInstancePtrResult);
}

View File

@ -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 __NS_SVGZOOMEVENT_H__
#define __NS_SVGZOOMEVENT_H__
#ifndef mozilla_dom_SVGZoomEvent_h
#define mozilla_dom_SVGZoomEvent_h
#include "nsAutoPtr.h"
#include "nsDOMUIEvent.h"
@ -15,16 +15,15 @@ class nsPresContext;
namespace mozilla {
class DOMSVGPoint;
}
class nsDOMSVGZoomEvent : public nsDOMUIEvent,
public nsIDOMSVGZoomEvent
namespace dom {
class SVGZoomEvent : public nsDOMUIEvent,
public nsIDOMSVGZoomEvent
{
public:
typedef mozilla::DOMSVGPoint DOMSVGPoint;
nsDOMSVGZoomEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext, nsGUIEvent* aEvent);
SVGZoomEvent(EventTarget* aOwner, nsPresContext* aPresContext,
nsGUIEvent* aEvent);
// nsISupports interface:
NS_DECL_ISUPPORTS_INHERITED
@ -42,4 +41,7 @@ private:
nsRefPtr<DOMSVGPoint> mNewTranslate;
};
#endif // __NS_SVGZOOMEVENT_H__
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_SVGZoomEvent_h

View File

@ -90,5 +90,6 @@ EXPORTS.mozilla.dom += [
'SVGTSpanElement.h',
'SVGUseElement.h',
'SVGViewElement.h',
'SVGZoomEvent.h',
]