Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1518666 part 2 - Move existing SVGAnimated classes to DOMSVGAnima…
Browse files Browse the repository at this point in the history
…ted so that we can rename various existing classes to SVGAnimated later r=dholbert
  • Loading branch information
longsonr committed Mar 19, 2019
1 parent 27cbdbc commit 0f3b101
Show file tree
Hide file tree
Showing 126 changed files with 637 additions and 580 deletions.
55 changes: 45 additions & 10 deletions dom/bindings/Bindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -766,26 +766,61 @@ DOMInterfaces = {
'headerFile': 'mozilla/StyleSheetInlines.h',
},

'SVGAnimatedAngle': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedAngle',
'headerFile': 'DOMSVGAnimatedAngle.h',
},

'SVGAnimatedBoolean': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedBoolean',
'headerFile': 'DOMSVGAnimatedBoolean.h',
},

'SVGAnimatedEnumeration': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedEnumeration',
'headerFile': 'DOMSVGAnimatedEnumeration.h',
},

'SVGAnimatedInteger': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedInteger',
'headerFile': 'DOMSVGAnimatedInteger.h',
},

'SVGAnimatedPreserveAspectRatio': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio',
'headerFile': 'SVGAnimatedPreserveAspectRatio.h'
},

'SVGAnimatedLength': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedLength',
'headerFile': 'DOMSVGAnimatedLength.h',
},

'SVGAnimatedLengthList': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedLengthList',
'headerFile': 'DOMSVGAnimatedLengthList.h',
},

'SVGAnimatedNumber': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedNumber',
'headerFile': 'DOMSVGAnimatedNumber.h',
},

'SVGAnimatedNumberList': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedNumberList',
'headerFile': 'DOMSVGAnimatedNumberList.h'
},

'SVGAnimatedString': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedString',
'headerFile': 'DOMSVGAnimatedString.h',
},

'SVGAnimatedTransformList': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedTransformList',
'headerFile': 'DOMSVGAnimatedTransformList.h'
},

'SVGAnimatedPreserveAspectRatio': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio',
'headerFile': 'SVGAnimatedPreserveAspectRatio.h'
},

'SVGAngle': {
'nativeType': 'mozilla::dom::DOMSVGAngle',
'headerFile': 'DOMSVGAngle.h'
Expand Down Expand Up @@ -976,6 +1011,11 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::SVGIRect'
},

'SVGStringList': {
'nativeType': 'mozilla::DOMSVGStringList',
'headerFile': 'DOMSVGStringList.h',
},

'SVGTextContentElement': {
'concrete': False
},
Expand All @@ -997,11 +1037,6 @@ DOMInterfaces = {
'headerFile': 'DOMSVGTransformList.h'
},

'SVGStringList': {
'nativeType': 'mozilla::DOMSVGStringList',
'headerFile': 'DOMSVGStringList.h',
},

'SVGUnitTypes' : {
'concrete': False,
},
Expand Down
17 changes: 9 additions & 8 deletions dom/svg/SVGAnimatedAngle.cpp → dom/svg/DOMSVGAnimatedAngle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@
* 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 "SVGAnimatedAngle.h"
#include "DOMSVGAnimatedAngle.h"

#include "SVGOrient.h"
#include "mozilla/dom/SVGAnimatedAngleBinding.h"

using namespace mozilla;
using namespace mozilla::dom;

NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedAngle, mSVGElement)
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedAngle, mSVGElement)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedAngle, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedAngle, Release)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMSVGAnimatedAngle, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAnimatedAngle, Release)

JSObject* SVGAnimatedAngle::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
JSObject* DOMSVGAnimatedAngle::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedAngle_Binding::Wrap(aCx, this, aGivenProto);
}

already_AddRefed<DOMSVGAngle> SVGAnimatedAngle::BaseVal() {
already_AddRefed<DOMSVGAngle> DOMSVGAnimatedAngle::BaseVal() {
return mVal->ToDOMBaseVal(mSVGElement);
}

already_AddRefed<DOMSVGAngle> SVGAnimatedAngle::AnimVal() {
already_AddRefed<DOMSVGAngle> DOMSVGAnimatedAngle::AnimVal() {
return mVal->ToDOMAnimVal(mSVGElement);
}
16 changes: 8 additions & 8 deletions dom/svg/SVGAnimatedAngle.h → dom/svg/DOMSVGAnimatedAngle.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,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 mozilla_dom_SVGAnimatedAngle_h
#define mozilla_dom_SVGAnimatedAngle_h
#ifndef mozilla_dom_DOMSVGAnimatedAngle_h
#define mozilla_dom_DOMSVGAnimatedAngle_h

#include "nsWrapperCache.h"
#include "SVGElement.h"
Expand All @@ -19,12 +19,12 @@ namespace dom {

class DOMSVGAngle;

class SVGAnimatedAngle final : public nsWrapperCache {
class DOMSVGAnimatedAngle final : public nsWrapperCache {
public:
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedAngle)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedAngle)
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedAngle)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedAngle)

SVGAnimatedAngle(SVGOrient* aVal, SVGElement* aSVGElement)
DOMSVGAnimatedAngle(SVGOrient* aVal, SVGElement* aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {}

// WebIDL
Expand All @@ -35,7 +35,7 @@ class SVGAnimatedAngle final : public nsWrapperCache {
already_AddRefed<DOMSVGAngle> AnimVal();

protected:
~SVGAnimatedAngle();
~DOMSVGAnimatedAngle();

SVGOrient* mVal; // kept alive because it belongs to content
RefPtr<SVGElement> mSVGElement;
Expand All @@ -44,4 +44,4 @@ class SVGAnimatedAngle final : public nsWrapperCache {
} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_SVGAnimatedAngle_h
#endif // mozilla_dom_DOMSVGAnimatedAngle_h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
* 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 "SVGAnimatedBoolean.h"
#include "DOMSVGAnimatedBoolean.h"

#include "mozilla/dom/SVGAnimatedBooleanBinding.h"

using namespace mozilla;
using namespace mozilla::dom;

NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedBoolean, mSVGElement)
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedBoolean,
mSVGElement)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedBoolean, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedBoolean, Release)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMSVGAnimatedBoolean, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAnimatedBoolean, Release)

JSObject* SVGAnimatedBoolean::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
JSObject* DOMSVGAnimatedBoolean::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedBoolean_Binding::Wrap(aCx, this, aGivenProto);
}
16 changes: 8 additions & 8 deletions dom/svg/SVGAnimatedBoolean.h → dom/svg/DOMSVGAnimatedBoolean.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,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 mozilla_dom_SVGAnimatedBoolean_h
#define mozilla_dom_SVGAnimatedBoolean_h
#ifndef mozilla_dom_DOMSVGAnimatedBoolean_h
#define mozilla_dom_DOMSVGAnimatedBoolean_h

#include "SVGBoolean.h"
#include "nsWrapperCache.h"
Expand All @@ -15,11 +15,11 @@
namespace mozilla {
namespace dom {

class SVGAnimatedBoolean final : public nsWrapperCache {
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedBoolean)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedBoolean)
class DOMSVGAnimatedBoolean final : public nsWrapperCache {
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedBoolean)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedBoolean)

SVGAnimatedBoolean(SVGBoolean* aVal, SVGElement* aSVGElement)
DOMSVGAnimatedBoolean(SVGBoolean* aVal, SVGElement* aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {}

// WebIDL
Expand All @@ -34,7 +34,7 @@ class SVGAnimatedBoolean final : public nsWrapperCache {
}

protected:
~SVGAnimatedBoolean();
~DOMSVGAnimatedBoolean();

SVGBoolean* mVal; // kept alive because it belongs to content
RefPtr<SVGElement> mSVGElement;
Expand All @@ -43,4 +43,4 @@ class SVGAnimatedBoolean final : public nsWrapperCache {
} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_SVGAnimatedBoolean_h
#endif // mozilla_dom_DOMSVGAnimatedBoolean_h
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
* 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 "mozilla/dom/SVGAnimatedEnumeration.h"
#include "DOMSVGAnimatedEnumeration.h"

#include "mozilla/dom/SVGAnimatedEnumerationBinding.h"

namespace mozilla {
namespace dom {

NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedEnumeration,
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedEnumeration,
mSVGElement)

NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedEnumeration)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedEnumeration)
NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGAnimatedEnumeration)
NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGAnimatedEnumeration)

NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedEnumeration)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGAnimatedEnumeration)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END

JSObject* SVGAnimatedEnumeration::WrapObject(
JSObject* DOMSVGAnimatedEnumeration::WrapObject(
JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedEnumeration_Binding::Wrap(aCx, this, aGivenProto);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,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 mozilla_dom_SVGAnimatedEnumeration_h
#define mozilla_dom_SVGAnimatedEnumeration_h
#ifndef mozilla_dom_DOMSVGAnimatedEnumeration_h
#define mozilla_dom_DOMSVGAnimatedEnumeration_h

#include "nsWrapperCache.h"

Expand All @@ -14,10 +14,10 @@
namespace mozilla {
namespace dom {

class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
class DOMSVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedEnumeration)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedEnumeration)

SVGElement* GetParentObject() const { return mSVGElement; }

Expand All @@ -28,14 +28,14 @@ class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
virtual uint16_t AnimVal() = 0;

protected:
explicit SVGAnimatedEnumeration(SVGElement* aSVGElement)
explicit DOMSVGAnimatedEnumeration(SVGElement* aSVGElement)
: mSVGElement(aSVGElement) {}
virtual ~SVGAnimatedEnumeration(){};
virtual ~DOMSVGAnimatedEnumeration(){};

RefPtr<SVGElement> mSVGElement;
};

} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_SVGAnimatedEnumeration_h
#endif // mozilla_dom_DOMSVGAnimatedEnumeration_h
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@
* 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 "mozilla/dom/SVGAnimatedInteger.h"
#include "DOMSVGAnimatedInteger.h"

#include "mozilla/dom/SVGAnimatedIntegerBinding.h"

namespace mozilla {
namespace dom {

NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedInteger, mSVGElement)
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedInteger,
mSVGElement)

NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGAnimatedInteger)

NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedInteger)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGAnimatedInteger)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END

JSObject* SVGAnimatedInteger::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
JSObject* DOMSVGAnimatedInteger::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedInteger_Binding::Wrap(aCx, this, aGivenProto);
}

Expand Down
14 changes: 7 additions & 7 deletions dom/svg/SVGAnimatedInteger.h → dom/svg/DOMSVGAnimatedInteger.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,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 mozilla_dom_SVGAnimatedInteger_h
#define mozilla_dom_SVGAnimatedInteger_h
#ifndef mozilla_dom_DOMSVGAnimatedInteger_h
#define mozilla_dom_DOMSVGAnimatedInteger_h

#include "nsWrapperCache.h"

Expand All @@ -14,10 +14,10 @@
namespace mozilla {
namespace dom {

class SVGAnimatedInteger : public nsISupports, public nsWrapperCache {
class DOMSVGAnimatedInteger : public nsISupports, public nsWrapperCache {
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedInteger)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedInteger)

SVGElement* GetParentObject() const { return mSVGElement; }

Expand All @@ -28,14 +28,14 @@ class SVGAnimatedInteger : public nsISupports, public nsWrapperCache {
virtual int32_t AnimVal() = 0;

protected:
explicit SVGAnimatedInteger(SVGElement* aSVGElement)
explicit DOMSVGAnimatedInteger(SVGElement* aSVGElement)
: mSVGElement(aSVGElement) {}
virtual ~SVGAnimatedInteger(){};
virtual ~DOMSVGAnimatedInteger(){};

RefPtr<SVGElement> mSVGElement;
};

} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_SVGAnimatedInteger_h
#endif // mozilla_dom_DOMSVGAnimatedInteger_h
Loading

0 comments on commit 0f3b101

Please sign in to comment.