Bug 1518666 part 2 - Move existing SVGAnimated classes to DOMSVGAnimated so that we can rename various existing classes to SVGAnimated later r=dholbert

--HG--
rename : dom/svg/SVGAnimatedAngle.cpp => dom/svg/DOMSVGAnimatedAngle.cpp
rename : dom/svg/SVGAnimatedAngle.h => dom/svg/DOMSVGAnimatedAngle.h
rename : dom/svg/SVGAnimatedBoolean.cpp => dom/svg/DOMSVGAnimatedBoolean.cpp
rename : dom/svg/SVGAnimatedBoolean.h => dom/svg/DOMSVGAnimatedBoolean.h
rename : dom/svg/SVGAnimatedEnumeration.cpp => dom/svg/DOMSVGAnimatedEnumeration.cpp
rename : dom/svg/SVGAnimatedEnumeration.h => dom/svg/DOMSVGAnimatedEnumeration.h
rename : dom/svg/SVGAnimatedInteger.cpp => dom/svg/DOMSVGAnimatedInteger.cpp
rename : dom/svg/SVGAnimatedInteger.h => dom/svg/DOMSVGAnimatedInteger.h
rename : dom/svg/SVGAnimatedLength.cpp => dom/svg/DOMSVGAnimatedLength.cpp
rename : dom/svg/SVGAnimatedLength.h => dom/svg/DOMSVGAnimatedLength.h
rename : dom/svg/SVGAnimatedNumber.cpp => dom/svg/DOMSVGAnimatedNumber.cpp
rename : dom/svg/SVGAnimatedNumber.h => dom/svg/DOMSVGAnimatedNumber.h
rename : dom/svg/SVGAnimatedString.cpp => dom/svg/DOMSVGAnimatedString.cpp
rename : dom/svg/SVGAnimatedString.h => dom/svg/DOMSVGAnimatedString.h
This commit is contained in:
longsonr 2019-03-19 00:01:03 +00:00
parent 9eefc4e997
commit 21dcb548e6
126 changed files with 637 additions and 580 deletions

View File

@ -766,26 +766,61 @@ DOMInterfaces = {
'headerFile': 'mozilla/StyleSheetInlines.h', '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': { 'SVGAnimatedLengthList': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedLengthList', 'nativeType': 'mozilla::dom::DOMSVGAnimatedLengthList',
'headerFile': 'DOMSVGAnimatedLengthList.h', 'headerFile': 'DOMSVGAnimatedLengthList.h',
}, },
'SVGAnimatedNumber': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedNumber',
'headerFile': 'DOMSVGAnimatedNumber.h',
},
'SVGAnimatedNumberList': { 'SVGAnimatedNumberList': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedNumberList', 'nativeType': 'mozilla::dom::DOMSVGAnimatedNumberList',
'headerFile': 'DOMSVGAnimatedNumberList.h' 'headerFile': 'DOMSVGAnimatedNumberList.h'
}, },
'SVGAnimatedString': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedString',
'headerFile': 'DOMSVGAnimatedString.h',
},
'SVGAnimatedTransformList': { 'SVGAnimatedTransformList': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedTransformList', 'nativeType': 'mozilla::dom::DOMSVGAnimatedTransformList',
'headerFile': 'DOMSVGAnimatedTransformList.h' 'headerFile': 'DOMSVGAnimatedTransformList.h'
}, },
'SVGAnimatedPreserveAspectRatio': {
'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio',
'headerFile': 'SVGAnimatedPreserveAspectRatio.h'
},
'SVGAngle': { 'SVGAngle': {
'nativeType': 'mozilla::dom::DOMSVGAngle', 'nativeType': 'mozilla::dom::DOMSVGAngle',
'headerFile': 'DOMSVGAngle.h' 'headerFile': 'DOMSVGAngle.h'
@ -976,6 +1011,11 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::SVGIRect' 'nativeType': 'mozilla::dom::SVGIRect'
}, },
'SVGStringList': {
'nativeType': 'mozilla::DOMSVGStringList',
'headerFile': 'DOMSVGStringList.h',
},
'SVGTextContentElement': { 'SVGTextContentElement': {
'concrete': False 'concrete': False
}, },
@ -997,11 +1037,6 @@ DOMInterfaces = {
'headerFile': 'DOMSVGTransformList.h' 'headerFile': 'DOMSVGTransformList.h'
}, },
'SVGStringList': {
'nativeType': 'mozilla::DOMSVGStringList',
'headerFile': 'DOMSVGStringList.h',
},
'SVGUnitTypes' : { 'SVGUnitTypes' : {
'concrete': False, 'concrete': False,
}, },

View File

@ -4,27 +4,28 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SVGAnimatedAngle.h" #include "DOMSVGAnimatedAngle.h"
#include "SVGOrient.h" #include "SVGOrient.h"
#include "mozilla/dom/SVGAnimatedAngleBinding.h" #include "mozilla/dom/SVGAnimatedAngleBinding.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::dom; 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_ROOT_NATIVE(DOMSVGAnimatedAngle, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedAngle, Release) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAnimatedAngle, Release)
JSObject* SVGAnimatedAngle::WrapObject(JSContext* aCx, JSObject* DOMSVGAnimatedAngle::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) { JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedAngle_Binding::Wrap(aCx, this, aGivenProto); return SVGAnimatedAngle_Binding::Wrap(aCx, this, aGivenProto);
} }
already_AddRefed<DOMSVGAngle> SVGAnimatedAngle::BaseVal() { already_AddRefed<DOMSVGAngle> DOMSVGAnimatedAngle::BaseVal() {
return mVal->ToDOMBaseVal(mSVGElement); return mVal->ToDOMBaseVal(mSVGElement);
} }
already_AddRefed<DOMSVGAngle> SVGAnimatedAngle::AnimVal() { already_AddRefed<DOMSVGAngle> DOMSVGAnimatedAngle::AnimVal() {
return mVal->ToDOMAnimVal(mSVGElement); return mVal->ToDOMAnimVal(mSVGElement);
} }

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedAngle_h #ifndef mozilla_dom_DOMSVGAnimatedAngle_h
#define mozilla_dom_SVGAnimatedAngle_h #define mozilla_dom_DOMSVGAnimatedAngle_h
#include "nsWrapperCache.h" #include "nsWrapperCache.h"
#include "SVGElement.h" #include "SVGElement.h"
@ -19,12 +19,12 @@ namespace dom {
class DOMSVGAngle; class DOMSVGAngle;
class SVGAnimatedAngle final : public nsWrapperCache { class DOMSVGAnimatedAngle final : public nsWrapperCache {
public: public:
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedAngle) NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedAngle)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedAngle) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedAngle)
SVGAnimatedAngle(SVGOrient* aVal, SVGElement* aSVGElement) DOMSVGAnimatedAngle(SVGOrient* aVal, SVGElement* aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {} : mVal(aVal), mSVGElement(aSVGElement) {}
// WebIDL // WebIDL
@ -35,7 +35,7 @@ class SVGAnimatedAngle final : public nsWrapperCache {
already_AddRefed<DOMSVGAngle> AnimVal(); already_AddRefed<DOMSVGAngle> AnimVal();
protected: protected:
~SVGAnimatedAngle(); ~DOMSVGAnimatedAngle();
SVGOrient* mVal; // kept alive because it belongs to content SVGOrient* mVal; // kept alive because it belongs to content
RefPtr<SVGElement> mSVGElement; RefPtr<SVGElement> mSVGElement;
@ -44,4 +44,4 @@ class SVGAnimatedAngle final : public nsWrapperCache {
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla
#endif // mozilla_dom_SVGAnimatedAngle_h #endif // mozilla_dom_DOMSVGAnimatedAngle_h

View File

@ -4,18 +4,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SVGAnimatedBoolean.h" #include "DOMSVGAnimatedBoolean.h"
#include "mozilla/dom/SVGAnimatedBooleanBinding.h" #include "mozilla/dom/SVGAnimatedBooleanBinding.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::dom; 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_ROOT_NATIVE(DOMSVGAnimatedBoolean, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedBoolean, Release) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAnimatedBoolean, Release)
JSObject* SVGAnimatedBoolean::WrapObject(JSContext* aCx, JSObject* DOMSVGAnimatedBoolean::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) { JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedBoolean_Binding::Wrap(aCx, this, aGivenProto); return SVGAnimatedBoolean_Binding::Wrap(aCx, this, aGivenProto);
} }

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedBoolean_h #ifndef mozilla_dom_DOMSVGAnimatedBoolean_h
#define mozilla_dom_SVGAnimatedBoolean_h #define mozilla_dom_DOMSVGAnimatedBoolean_h
#include "SVGBoolean.h" #include "SVGBoolean.h"
#include "nsWrapperCache.h" #include "nsWrapperCache.h"
@ -15,11 +15,11 @@
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
class SVGAnimatedBoolean final : public nsWrapperCache { class DOMSVGAnimatedBoolean final : public nsWrapperCache {
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedBoolean) NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedBoolean)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedBoolean) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedBoolean)
SVGAnimatedBoolean(SVGBoolean* aVal, SVGElement* aSVGElement) DOMSVGAnimatedBoolean(SVGBoolean* aVal, SVGElement* aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {} : mVal(aVal), mSVGElement(aSVGElement) {}
// WebIDL // WebIDL
@ -34,7 +34,7 @@ class SVGAnimatedBoolean final : public nsWrapperCache {
} }
protected: protected:
~SVGAnimatedBoolean(); ~DOMSVGAnimatedBoolean();
SVGBoolean* mVal; // kept alive because it belongs to content SVGBoolean* mVal; // kept alive because it belongs to content
RefPtr<SVGElement> mSVGElement; RefPtr<SVGElement> mSVGElement;
@ -43,4 +43,4 @@ class SVGAnimatedBoolean final : public nsWrapperCache {
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla
#endif // mozilla_dom_SVGAnimatedBoolean_h #endif // mozilla_dom_DOMSVGAnimatedBoolean_h

View File

@ -4,25 +4,25 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * 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" #include "mozilla/dom/SVGAnimatedEnumerationBinding.h"
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedEnumeration, NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedEnumeration,
mSVGElement) mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedEnumeration) NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGAnimatedEnumeration)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedEnumeration) 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_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END NS_INTERFACE_MAP_END
JSObject* SVGAnimatedEnumeration::WrapObject( JSObject* DOMSVGAnimatedEnumeration::WrapObject(
JSContext* aCx, JS::Handle<JSObject*> aGivenProto) { JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedEnumeration_Binding::Wrap(aCx, this, aGivenProto); return SVGAnimatedEnumeration_Binding::Wrap(aCx, this, aGivenProto);
} }

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedEnumeration_h #ifndef mozilla_dom_DOMSVGAnimatedEnumeration_h
#define mozilla_dom_SVGAnimatedEnumeration_h #define mozilla_dom_DOMSVGAnimatedEnumeration_h
#include "nsWrapperCache.h" #include "nsWrapperCache.h"
@ -14,10 +14,10 @@
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache { class DOMSVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
public: public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS 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; } SVGElement* GetParentObject() const { return mSVGElement; }
@ -28,9 +28,9 @@ class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
virtual uint16_t AnimVal() = 0; virtual uint16_t AnimVal() = 0;
protected: protected:
explicit SVGAnimatedEnumeration(SVGElement* aSVGElement) explicit DOMSVGAnimatedEnumeration(SVGElement* aSVGElement)
: mSVGElement(aSVGElement) {} : mSVGElement(aSVGElement) {}
virtual ~SVGAnimatedEnumeration(){}; virtual ~DOMSVGAnimatedEnumeration(){};
RefPtr<SVGElement> mSVGElement; RefPtr<SVGElement> mSVGElement;
}; };
@ -38,4 +38,4 @@ class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla
#endif // mozilla_dom_SVGAnimatedEnumeration_h #endif // mozilla_dom_DOMSVGAnimatedEnumeration_h

View File

@ -4,25 +4,26 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * 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" #include "mozilla/dom/SVGAnimatedIntegerBinding.h"
namespace mozilla { namespace mozilla {
namespace dom { 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_ADDREF(DOMSVGAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedInteger) 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_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END NS_INTERFACE_MAP_END
JSObject* SVGAnimatedInteger::WrapObject(JSContext* aCx, JSObject* DOMSVGAnimatedInteger::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) { JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedInteger_Binding::Wrap(aCx, this, aGivenProto); return SVGAnimatedInteger_Binding::Wrap(aCx, this, aGivenProto);
} }

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedInteger_h #ifndef mozilla_dom_DOMSVGAnimatedInteger_h
#define mozilla_dom_SVGAnimatedInteger_h #define mozilla_dom_DOMSVGAnimatedInteger_h
#include "nsWrapperCache.h" #include "nsWrapperCache.h"
@ -14,10 +14,10 @@
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
class SVGAnimatedInteger : public nsISupports, public nsWrapperCache { class DOMSVGAnimatedInteger : public nsISupports, public nsWrapperCache {
public: public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS 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; } SVGElement* GetParentObject() const { return mSVGElement; }
@ -28,9 +28,9 @@ class SVGAnimatedInteger : public nsISupports, public nsWrapperCache {
virtual int32_t AnimVal() = 0; virtual int32_t AnimVal() = 0;
protected: protected:
explicit SVGAnimatedInteger(SVGElement* aSVGElement) explicit DOMSVGAnimatedInteger(SVGElement* aSVGElement)
: mSVGElement(aSVGElement) {} : mSVGElement(aSVGElement) {}
virtual ~SVGAnimatedInteger(){}; virtual ~DOMSVGAnimatedInteger(){};
RefPtr<SVGElement> mSVGElement; RefPtr<SVGElement> mSVGElement;
}; };
@ -38,4 +38,4 @@ class SVGAnimatedInteger : public nsISupports, public nsWrapperCache {
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla
#endif // mozilla_dom_SVGAnimatedInteger_h #endif // mozilla_dom_DOMSVGAnimatedInteger_h

View File

@ -4,7 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/SVGAnimatedLength.h" #include "DOMSVGAnimatedLength.h"
#include "mozilla/dom/SVGAnimatedLengthBinding.h" #include "mozilla/dom/SVGAnimatedLengthBinding.h"
#include "nsSVGLength2.h" #include "nsSVGLength2.h"
#include "DOMSVGLength.h" #include "DOMSVGLength.h"
@ -12,21 +13,22 @@
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedLength, mSVGElement) NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedLength,
mSVGElement)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedLength, AddRef) NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMSVGAnimatedLength, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedLength, Release) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAnimatedLength, Release)
JSObject* SVGAnimatedLength::WrapObject(JSContext* aCx, JSObject* DOMSVGAnimatedLength::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) { JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedLength_Binding::Wrap(aCx, this, aGivenProto); return SVGAnimatedLength_Binding::Wrap(aCx, this, aGivenProto);
} }
already_AddRefed<DOMSVGLength> SVGAnimatedLength::BaseVal() { already_AddRefed<DOMSVGLength> DOMSVGAnimatedLength::BaseVal() {
return mVal->ToDOMBaseVal(mSVGElement); return mVal->ToDOMBaseVal(mSVGElement);
} }
already_AddRefed<DOMSVGLength> SVGAnimatedLength::AnimVal() { already_AddRefed<DOMSVGLength> DOMSVGAnimatedLength::AnimVal() {
return mVal->ToDOMAnimVal(mSVGElement); return mVal->ToDOMAnimVal(mSVGElement);
} }

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedLength_h #ifndef mozilla_dom_DOMSVGAnimatedLength_h
#define mozilla_dom_SVGAnimatedLength_h #define mozilla_dom_DOMSVGAnimatedLength_h
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "SVGElement.h" #include "SVGElement.h"
@ -18,12 +18,12 @@ namespace dom {
class DOMSVGLength; class DOMSVGLength;
class SVGAnimatedLength final : public nsWrapperCache { class DOMSVGAnimatedLength final : public nsWrapperCache {
public: public:
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedLength) NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedLength)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedLength) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedLength)
SVGAnimatedLength(nsSVGLength2* aVal, SVGElement* aSVGElement) DOMSVGAnimatedLength(nsSVGLength2* aVal, SVGElement* aSVGElement)
: mVal(aVal), mSVGElement(aSVGElement) {} : mVal(aVal), mSVGElement(aSVGElement) {}
// WebIDL // WebIDL
@ -34,7 +34,7 @@ class SVGAnimatedLength final : public nsWrapperCache {
already_AddRefed<DOMSVGLength> AnimVal(); already_AddRefed<DOMSVGLength> AnimVal();
protected: protected:
~SVGAnimatedLength(); ~DOMSVGAnimatedLength();
nsSVGLength2* mVal; // kept alive because it belongs to content nsSVGLength2* mVal; // kept alive because it belongs to content
RefPtr<SVGElement> mSVGElement; RefPtr<SVGElement> mSVGElement;
@ -43,4 +43,4 @@ class SVGAnimatedLength final : public nsWrapperCache {
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla
#endif // mozilla_dom_SVGAnimatedLength_h #endif // mozilla_dom_DOMSVGAnimatedLength_h

View File

@ -4,25 +4,26 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/SVGAnimatedNumber.h" #include "DOMSVGAnimatedNumber.h"
#include "mozilla/dom/SVGAnimatedNumberBinding.h" #include "mozilla/dom/SVGAnimatedNumberBinding.h"
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedNumber, mSVGElement) NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedNumber,
mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedNumber) NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGAnimatedNumber)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedNumber) NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGAnimatedNumber)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedNumber) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGAnimatedNumber)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END NS_INTERFACE_MAP_END
JSObject* SVGAnimatedNumber::WrapObject(JSContext* aCx, JSObject* DOMSVGAnimatedNumber::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) { JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedNumber_Binding::Wrap(aCx, this, aGivenProto); return SVGAnimatedNumber_Binding::Wrap(aCx, this, aGivenProto);
} }

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedNumber_h #ifndef mozilla_dom_DOMSVGAnimatedNumber_h
#define mozilla_dom_SVGAnimatedNumber_h #define mozilla_dom_DOMSVGAnimatedNumber_h
#include "nsISupports.h" #include "nsISupports.h"
#include "nsWrapperCache.h" #include "nsWrapperCache.h"
@ -15,10 +15,10 @@
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
class SVGAnimatedNumber : public nsISupports, public nsWrapperCache { class DOMSVGAnimatedNumber : public nsISupports, public nsWrapperCache {
public: public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedNumber) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedNumber)
SVGElement* GetParentObject() const { return mSVGElement; } SVGElement* GetParentObject() const { return mSVGElement; }
@ -29,9 +29,9 @@ class SVGAnimatedNumber : public nsISupports, public nsWrapperCache {
virtual float AnimVal() = 0; virtual float AnimVal() = 0;
protected: protected:
explicit SVGAnimatedNumber(SVGElement* aSVGElement) explicit DOMSVGAnimatedNumber(SVGElement* aSVGElement)
: mSVGElement(aSVGElement) {} : mSVGElement(aSVGElement) {}
virtual ~SVGAnimatedNumber(){}; virtual ~DOMSVGAnimatedNumber(){};
RefPtr<SVGElement> mSVGElement; RefPtr<SVGElement> mSVGElement;
}; };
@ -39,4 +39,4 @@ class SVGAnimatedNumber : public nsISupports, public nsWrapperCache {
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla
#endif // mozilla_dom_SVGAnimatedNumber_h #endif // mozilla_dom_DOMSVGAnimatedNumber_h

View File

@ -4,14 +4,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/SVGAnimatedString.h" #include "DOMSVGAnimatedString.h"
#include "mozilla/dom/SVGAnimatedStringBinding.h" #include "mozilla/dom/SVGAnimatedStringBinding.h"
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
JSObject* SVGAnimatedString::WrapObject(JSContext* aCx, JSObject* DOMSVGAnimatedString::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) { JS::Handle<JSObject*> aGivenProto) {
return SVGAnimatedString_Binding::Wrap(aCx, this, aGivenProto); return SVGAnimatedString_Binding::Wrap(aCx, this, aGivenProto);
} }

View File

@ -4,17 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedString_h #ifndef mozilla_dom_DOMSVGAnimatedString_h
#define mozilla_dom_SVGAnimatedString_h #define mozilla_dom_DOMSVGAnimatedString_h
#include "SVGElement.h" #include "SVGElement.h"
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
class SVGAnimatedString : public nsISupports, public nsWrapperCache { class DOMSVGAnimatedString : public nsISupports, public nsWrapperCache {
public: public:
explicit SVGAnimatedString(SVGElement* aSVGElement) explicit DOMSVGAnimatedString(SVGElement* aSVGElement)
: mSVGElement(aSVGElement) {} : mSVGElement(aSVGElement) {}
virtual JSObject* WrapObject(JSContext* aCx, virtual JSObject* WrapObject(JSContext* aCx,
@ -33,4 +33,4 @@ class SVGAnimatedString : public nsISupports, public nsWrapperCache {
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla
#endif // mozilla_dom_SVGAnimatedString_h #endif // mozilla_dom_DOMSVGAnimatedString_h

View File

@ -6,10 +6,10 @@
#include "DOMSVGTransformList.h" #include "DOMSVGTransformList.h"
#include "mozilla/dom/DOMSVGTransform.h"
#include "mozilla/dom/SVGElement.h" #include "mozilla/dom/SVGElement.h"
#include "mozilla/dom/SVGMatrix.h" #include "mozilla/dom/SVGMatrix.h"
#include "mozilla/dom/SVGTransformListBinding.h" #include "mozilla/dom/SVGTransformListBinding.h"
#include "DOMSVGTransform.h"
#include "SVGAnimatedTransformList.h" #include "SVGAnimatedTransformList.h"
#include "nsError.h" #include "nsError.h"
#include <algorithm> #include <algorithm>

View File

@ -55,7 +55,7 @@ SVGAElement::SVGAElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
SVGAElement::~SVGAElement() {} SVGAElement::~SVGAElement() {}
already_AddRefed<SVGAnimatedString> SVGAElement::Href() { already_AddRefed<DOMSVGAnimatedString> SVGAElement::Href() {
return mStringAttributes[HREF].IsExplicitlySet() return mStringAttributes[HREF].IsExplicitlySet()
? mStringAttributes[HREF].ToDOMAnimatedString(this) ? mStringAttributes[HREF].ToDOMAnimatedString(this)
: mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this); : mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this);
@ -86,7 +86,7 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGAElement::Target() { already_AddRefed<DOMSVGAnimatedString> SVGAElement::Target() {
return mStringAttributes[TARGET].ToDOMAnimatedString(this); return mStringAttributes[TARGET].ToDOMAnimatedString(this);
} }

View File

@ -67,8 +67,8 @@ class SVGAElement final : public SVGAElementBase, public Link {
virtual bool ElementHasHref() const override; virtual bool ElementHasHref() const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> Href(); already_AddRefed<DOMSVGAnimatedString> Href();
already_AddRefed<SVGAnimatedString> Target(); already_AddRefed<DOMSVGAnimatedString> Target();
void GetDownload(nsAString& aDownload); void GetDownload(nsAString& aDownload);
void SetDownload(const nsAString& aDownload, ErrorResult& rv); void SetDownload(const nsAString& aDownload, ErrorResult& rv);
void GetPing(nsAString& aPing); void GetPing(nsAString& aPing);

View File

@ -6,11 +6,11 @@
#include "SVGBoolean.h" #include "SVGBoolean.h"
#include "DOMSVGAnimatedBoolean.h"
#include "nsError.h" #include "nsError.h"
#include "SMILBoolType.h" #include "SMILBoolType.h"
#include "SVGAttrTearoffTable.h" #include "SVGAttrTearoffTable.h"
#include "mozilla/SMILValue.h" #include "mozilla/SMILValue.h"
#include "mozilla/dom/SVGAnimatedBoolean.h"
using namespace mozilla::dom; using namespace mozilla::dom;
@ -18,9 +18,9 @@ namespace mozilla {
/* Implementation */ /* Implementation */
static inline SVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean>& static inline SVGAttrTearoffTable<SVGBoolean, DOMSVGAnimatedBoolean>&
SVGAnimatedBooleanTearoffTable() { SVGAnimatedBooleanTearoffTable() {
static SVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean> static SVGAttrTearoffTable<SVGBoolean, DOMSVGAnimatedBoolean>
sSVGAnimatedBooleanTearoffTable; sSVGAnimatedBooleanTearoffTable;
return sSVGAnimatedBooleanTearoffTable; return sSVGAnimatedBooleanTearoffTable;
} }
@ -98,19 +98,19 @@ void SVGBoolean::SetAnimValue(bool aValue, SVGElement* aSVGElement) {
aSVGElement->DidAnimateBoolean(mAttrEnum); aSVGElement->DidAnimateBoolean(mAttrEnum);
} }
already_AddRefed<SVGAnimatedBoolean> SVGBoolean::ToDOMAnimatedBoolean( already_AddRefed<DOMSVGAnimatedBoolean> SVGBoolean::ToDOMAnimatedBoolean(
SVGElement* aSVGElement) { SVGElement* aSVGElement) {
RefPtr<SVGAnimatedBoolean> domAnimatedBoolean = RefPtr<DOMSVGAnimatedBoolean> domAnimatedBoolean =
SVGAnimatedBooleanTearoffTable().GetTearoff(this); SVGAnimatedBooleanTearoffTable().GetTearoff(this);
if (!domAnimatedBoolean) { if (!domAnimatedBoolean) {
domAnimatedBoolean = new SVGAnimatedBoolean(this, aSVGElement); domAnimatedBoolean = new DOMSVGAnimatedBoolean(this, aSVGElement);
SVGAnimatedBooleanTearoffTable().AddTearoff(this, domAnimatedBoolean); SVGAnimatedBooleanTearoffTable().AddTearoff(this, domAnimatedBoolean);
} }
return domAnimatedBoolean.forget(); return domAnimatedBoolean.forget();
} }
SVGAnimatedBoolean::~SVGAnimatedBoolean() { DOMSVGAnimatedBoolean::~DOMSVGAnimatedBoolean() {
SVGAnimatedBooleanTearoffTable().RemoveTearoff(mVal); SVGAnimatedBooleanTearoffTable().RemoveTearoff(mVal);
} }

View File

@ -20,8 +20,8 @@ namespace mozilla {
class SMILValue; class SMILValue;
namespace dom { namespace dom {
class DOMSVGAnimatedBoolean;
class SVGAnimationElement; class SVGAnimationElement;
class SVGAnimatedBoolean;
class SVGElement; class SVGElement;
} // namespace dom } // namespace dom
@ -44,7 +44,7 @@ class SVGBoolean {
void SetAnimValue(bool aValue, SVGElement* aSVGElement); void SetAnimValue(bool aValue, SVGElement* aSVGElement);
bool GetAnimValue() const { return mAnimVal; } bool GetAnimValue() const { return mAnimVal; }
already_AddRefed<mozilla::dom::SVGAnimatedBoolean> ToDOMAnimatedBoolean( already_AddRefed<mozilla::dom::DOMSVGAnimatedBoolean> ToDOMAnimatedBoolean(
SVGElement* aSVGElement); SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement); mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);

View File

@ -44,15 +44,15 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGCircleElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGCircleElement::Cx() { already_AddRefed<DOMSVGAnimatedLength> SVGCircleElement::Cx() {
return mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGCircleElement::Cy() { already_AddRefed<DOMSVGAnimatedLength> SVGCircleElement::Cy() {
return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGCircleElement::R() { already_AddRefed<DOMSVGAnimatedLength> SVGCircleElement::R() {
return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this);
} }

View File

@ -42,9 +42,9 @@ class SVGCircleElement final : public SVGCircleElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> Cx(); already_AddRefed<DOMSVGAnimatedLength> Cx();
already_AddRefed<SVGAnimatedLength> Cy(); already_AddRefed<DOMSVGAnimatedLength> Cy();
already_AddRefed<SVGAnimatedLength> R(); already_AddRefed<DOMSVGAnimatedLength> R();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;

View File

@ -6,21 +6,23 @@
#include "SVGClass.h" #include "SVGClass.h"
#include "mozilla/dom/SVGAnimatedString.h"
#include "mozilla/dom/SVGElement.h" #include "mozilla/dom/SVGElement.h"
#include "mozilla/Move.h" #include "mozilla/Move.h"
#include "mozilla/SMILValue.h" #include "mozilla/SMILValue.h"
#include "DOMSVGAnimatedString.h"
#include "SMILStringType.h" #include "SMILStringType.h"
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
struct DOMAnimatedString final : public SVGAnimatedString { // DOM wrapper class for the (DOM)SVGAnimatedString interface where the
// wrapped class is SVGClass.
struct DOMAnimatedString final : public DOMSVGAnimatedString {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimatedString) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimatedString)
DOMAnimatedString(SVGClass* aVal, SVGElement* aSVGElement) DOMAnimatedString(SVGClass* aVal, SVGElement* aSVGElement)
: SVGAnimatedString(aSVGElement), mVal(aVal) {} : DOMSVGAnimatedString(aSVGElement), mVal(aVal) {}
SVGClass* mVal; // kept alive because it belongs to content SVGClass* mVal; // kept alive because it belongs to content
@ -48,7 +50,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMAnimatedString)
NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END NS_INTERFACE_MAP_END
already_AddRefed<SVGAnimatedString> SVGClass::ToDOMAnimatedString( already_AddRefed<DOMSVGAnimatedString> SVGClass::ToDOMAnimatedString(
SVGElement* aSVGElement) { SVGElement* aSVGElement) {
RefPtr<DOMAnimatedString> result = new DOMAnimatedString(this, aSVGElement); RefPtr<DOMAnimatedString> result = new DOMAnimatedString(this, aSVGElement);
return result.forget(); return result.forget();

View File

@ -20,7 +20,7 @@ namespace mozilla {
class SMILValue; class SMILValue;
namespace dom { namespace dom {
class SVGAnimatedString; class DOMSVGAnimatedString;
class SVGElement; class SVGElement;
class SVGClass { class SVGClass {
@ -37,7 +37,7 @@ class SVGClass {
void GetAnimValue(nsAString& aValue, const SVGElement* aSVGElement) const; void GetAnimValue(nsAString& aValue, const SVGElement* aSVGElement) const;
bool IsAnimated() const { return !!mAnimVal; } bool IsAnimated() const { return !!mAnimVal; }
already_AddRefed<mozilla::dom::SVGAnimatedString> ToDOMAnimatedString( already_AddRefed<mozilla::dom::DOMSVGAnimatedString> ToDOMAnimatedString(
SVGElement* aSVGElement); SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement); mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);

View File

@ -33,7 +33,8 @@ SVGClipPathElement::SVGClipPathElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: SVGClipPathElementBase(std::move(aNodeInfo)) {} : SVGClipPathElementBase(std::move(aNodeInfo)) {}
already_AddRefed<SVGAnimatedEnumeration> SVGClipPathElement::ClipPathUnits() { already_AddRefed<DOMSVGAnimatedEnumeration>
SVGClipPathElement::ClipPathUnits() {
return mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(this);
} }

View File

@ -36,7 +36,7 @@ class SVGClipPathElement final : public SVGClipPathElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedEnumeration> ClipPathUnits(); already_AddRefed<DOMSVGAnimatedEnumeration> ClipPathUnits();
// This is an internal method that does not flush style, and thus // This is an internal method that does not flush style, and thus
// the answer may be out of date if there's a pending style flush. // the answer may be out of date if there's a pending style flush.

View File

@ -56,13 +56,13 @@ class SVGComponentTransferFunctionElement
// WebIDL // WebIDL
virtual JSObject* WrapNode(JSContext* aCx, virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override = 0; JS::Handle<JSObject*> aGivenProto) override = 0;
already_AddRefed<SVGAnimatedEnumeration> Type(); already_AddRefed<DOMSVGAnimatedEnumeration> Type();
already_AddRefed<DOMSVGAnimatedNumberList> TableValues(); already_AddRefed<DOMSVGAnimatedNumberList> TableValues();
already_AddRefed<SVGAnimatedNumber> Slope(); already_AddRefed<DOMSVGAnimatedNumber> Slope();
already_AddRefed<SVGAnimatedNumber> Intercept(); already_AddRefed<DOMSVGAnimatedNumber> Intercept();
already_AddRefed<SVGAnimatedNumber> Amplitude(); already_AddRefed<DOMSVGAnimatedNumber> Amplitude();
already_AddRefed<SVGAnimatedNumber> Exponent(); already_AddRefed<DOMSVGAnimatedNumber> Exponent();
already_AddRefed<SVGAnimatedNumber> Offset(); already_AddRefed<DOMSVGAnimatedNumber> Offset();
protected: protected:
virtual NumberAttributesInfo GetNumberInfo() override; virtual NumberAttributesInfo GetNumberInfo() override;

View File

@ -7,7 +7,6 @@
#include "mozilla/dom/SVGElement.h" #include "mozilla/dom/SVGElement.h"
#include "mozilla/dom/MutationEventBinding.h" #include "mozilla/dom/MutationEventBinding.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
#include "mozilla/dom/SVGElementBinding.h" #include "mozilla/dom/SVGElementBinding.h"
#include "mozilla/dom/SVGGeometryElement.h" #include "mozilla/dom/SVGGeometryElement.h"
#include "mozilla/dom/SVGLengthBinding.h" #include "mozilla/dom/SVGLengthBinding.h"
@ -25,6 +24,7 @@
#include "mozilla/SVGContentUtils.h" #include "mozilla/SVGContentUtils.h"
#include "mozilla/Unused.h" #include "mozilla/Unused.h"
#include "DOMSVGAnimatedEnumeration.h"
#include "mozAutoDocUpdate.h" #include "mozAutoDocUpdate.h"
#include "nsAttrValueOrString.h" #include "nsAttrValueOrString.h"
#include "nsCSSProps.h" #include "nsCSSProps.h"
@ -1016,7 +1016,7 @@ SVGElement* SVGElement::GetViewportElement() {
return SVGContentUtils::GetNearestViewportElement(this); return SVGContentUtils::GetNearestViewportElement(this);
} }
already_AddRefed<SVGAnimatedString> SVGElement::ClassName() { already_AddRefed<DOMSVGAnimatedString> SVGElement::ClassName() {
return mClassAttribute.ToDOMAnimatedString(this); return mClassAttribute.ToDOMAnimatedString(this);
} }
@ -2226,7 +2226,6 @@ UniquePtr<SMILAttr> SVGElement::GetAnimatedAttr(int32_t aNamespaceID,
return orient ? orient->ToSMILAttr(this) : nullptr; return orient ? orient->ToSMILAttr(this) : nullptr;
} }
// preserveAspectRatio:
// viewBox: // viewBox:
if (aName == nsGkAtoms::viewBox) { if (aName == nsGkAtoms::viewBox) {
SVGViewBox* viewBox = GetViewBox(); SVGViewBox* viewBox = GetViewBox();

View File

@ -303,7 +303,7 @@ class SVGElement : public SVGElementBase // nsIContent
// WebIDL // WebIDL
mozilla::dom::SVGSVGElement* GetOwnerSVGElement(); mozilla::dom::SVGSVGElement* GetOwnerSVGElement();
SVGElement* GetViewportElement(); SVGElement* GetViewportElement();
already_AddRefed<mozilla::dom::SVGAnimatedString> ClassName(); already_AddRefed<mozilla::dom::DOMSVGAnimatedString> ClassName();
void UpdateContentDeclarationBlock(); void UpdateContentDeclarationBlock();
const mozilla::DeclarationBlock* GetContentDeclarationBlock() const; const mozilla::DeclarationBlock* GetContentDeclarationBlock() const;

View File

@ -49,19 +49,19 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGEllipseElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIDOMSVGEllipseElement methods // nsIDOMSVGEllipseElement methods
already_AddRefed<SVGAnimatedLength> SVGEllipseElement::Cx() { already_AddRefed<DOMSVGAnimatedLength> SVGEllipseElement::Cx() {
return mLengthAttributes[CX].ToDOMAnimatedLength(this); return mLengthAttributes[CX].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGEllipseElement::Cy() { already_AddRefed<DOMSVGAnimatedLength> SVGEllipseElement::Cy() {
return mLengthAttributes[CY].ToDOMAnimatedLength(this); return mLengthAttributes[CY].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGEllipseElement::Rx() { already_AddRefed<DOMSVGAnimatedLength> SVGEllipseElement::Rx() {
return mLengthAttributes[RX].ToDOMAnimatedLength(this); return mLengthAttributes[RX].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGEllipseElement::Ry() { already_AddRefed<DOMSVGAnimatedLength> SVGEllipseElement::Ry() {
return mLengthAttributes[RY].ToDOMAnimatedLength(this); return mLengthAttributes[RY].ToDOMAnimatedLength(this);
} }

View File

@ -42,10 +42,10 @@ class SVGEllipseElement final : public SVGEllipseElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> Cx(); already_AddRefed<DOMSVGAnimatedLength> Cx();
already_AddRefed<SVGAnimatedLength> Cy(); already_AddRefed<DOMSVGAnimatedLength> Cy();
already_AddRefed<SVGAnimatedLength> Rx(); already_AddRefed<DOMSVGAnimatedLength> Rx();
already_AddRefed<SVGAnimatedLength> Ry(); already_AddRefed<DOMSVGAnimatedLength> Ry();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;

View File

@ -99,7 +99,7 @@ void SVGEnum::SetAnimValue(uint16_t aValue, SVGElement* aSVGElement) {
aSVGElement->DidAnimateEnum(mAttrEnum); aSVGElement->DidAnimateEnum(mAttrEnum);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGEnum::ToDOMAnimatedEnum( already_AddRefed<DOMSVGAnimatedEnumeration> SVGEnum::ToDOMAnimatedEnum(
SVGElement* aSVGElement) { SVGElement* aSVGElement) {
RefPtr<DOMAnimatedEnum> domAnimatedEnum = RefPtr<DOMAnimatedEnum> domAnimatedEnum =
sSVGAnimatedEnumTearoffTable.GetTearoff(this); sSVGAnimatedEnumTearoffTable.GetTearoff(this);

View File

@ -7,12 +7,12 @@
#ifndef __NS_SVGENUM_H__ #ifndef __NS_SVGENUM_H__
#define __NS_SVGENUM_H__ #define __NS_SVGENUM_H__
#include "DOMSVGAnimatedEnumeration.h"
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
#include "nsError.h" #include "nsError.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/SMILAttr.h" #include "mozilla/SMILAttr.h"
#include "mozilla/UniquePtr.h" #include "mozilla/UniquePtr.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
#include "mozilla/dom/SVGElement.h" #include "mozilla/dom/SVGElement.h"
class nsAtom; class nsAtom;
@ -52,7 +52,7 @@ class SVGEnum {
uint16_t GetAnimValue() const { return mAnimVal; } uint16_t GetAnimValue() const { return mAnimVal; }
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; } bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::SVGAnimatedEnumeration> ToDOMAnimatedEnum( already_AddRefed<mozilla::dom::DOMSVGAnimatedEnumeration> ToDOMAnimatedEnum(
SVGElement* aSVGElement); SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement); mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
@ -67,14 +67,17 @@ class SVGEnum {
const SVGEnumMapping* GetMapping(SVGElement* aSVGElement); const SVGEnumMapping* GetMapping(SVGElement* aSVGElement);
public: public:
struct DOMAnimatedEnum final : public mozilla::dom::SVGAnimatedEnumeration { // DOM wrapper class for the (DOM)SVGAnimatedEnumeration interface where the
// wrapped class is SVGEnum.
struct DOMAnimatedEnum final
: public mozilla::dom::DOMSVGAnimatedEnumeration {
DOMAnimatedEnum(SVGEnum* aVal, SVGElement* aSVGElement) DOMAnimatedEnum(SVGEnum* aVal, SVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedEnumeration(aSVGElement), mVal(aVal) {} : mozilla::dom::DOMSVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
virtual ~DOMAnimatedEnum(); virtual ~DOMAnimatedEnum();
SVGEnum* mVal; // kept alive because it belongs to content SVGEnum* mVal; // kept alive because it belongs to content
using mozilla::dom::SVGAnimatedEnumeration::SetBaseVal; using mozilla::dom::DOMSVGAnimatedEnumeration::SetBaseVal;
virtual uint16_t BaseVal() override { return mVal->GetBaseValue(); } virtual uint16_t BaseVal() override { return mVal->GetBaseValue(); }
virtual void SetBaseVal(uint16_t aBaseVal, virtual void SetBaseVal(uint16_t aBaseVal,
mozilla::ErrorResult& aRv) override { mozilla::ErrorResult& aRv) override {

View File

@ -55,15 +55,15 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEBlendElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIDOMSVGFEBlendElement methods // nsIDOMSVGFEBlendElement methods
already_AddRefed<SVGAnimatedString> SVGFEBlendElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEBlendElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedString> SVGFEBlendElement::In2() { already_AddRefed<DOMSVGAnimatedString> SVGFEBlendElement::In2() {
return mStringAttributes[IN2].ToDOMAnimatedString(this); return mStringAttributes[IN2].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFEBlendElement::Mode() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGFEBlendElement::Mode() {
return mEnumAttributes[MODE].ToDOMAnimatedEnum(this); return mEnumAttributes[MODE].ToDOMAnimatedEnum(this);
} }

View File

@ -44,9 +44,9 @@ class SVGFEBlendElement : public SVGFEBlendElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedString> In2(); already_AddRefed<DOMSVGAnimatedString> In2();
already_AddRefed<SVGAnimatedEnumeration> Mode(); already_AddRefed<DOMSVGAnimatedEnumeration> Mode();
protected: protected:
virtual EnumAttributesInfo GetEnumInfo() override; virtual EnumAttributesInfo GetEnumInfo() override;

View File

@ -48,11 +48,11 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEColorMatrixElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGFEColorMatrixElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEColorMatrixElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFEColorMatrixElement::Type() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGFEColorMatrixElement::Type() {
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this); return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);
} }

View File

@ -48,8 +48,8 @@ class SVGFEColorMatrixElement : public SVGFEColorMatrixElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedEnumeration> Type(); already_AddRefed<DOMSVGAnimatedEnumeration> Type();
already_AddRefed<DOMSVGAnimatedNumberList> Values(); already_AddRefed<DOMSVGAnimatedNumberList> Values();
protected: protected:

View File

@ -33,7 +33,7 @@ SVGElement::StringInfo SVGFEComponentTransferElement::sStringInfo[2] = {
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEComponentTransferElement) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEComponentTransferElement)
already_AddRefed<SVGAnimatedString> SVGFEComponentTransferElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEComponentTransferElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }

View File

@ -45,7 +45,7 @@ class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
protected: protected:
virtual StringAttributesInfo GetStringInfo() override; virtual StringAttributesInfo GetStringInfo() override;

View File

@ -47,31 +47,31 @@ SVGElement::StringInfo SVGFECompositeElement::sStringInfo[3] = {
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFECompositeElement) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFECompositeElement)
already_AddRefed<SVGAnimatedString> SVGFECompositeElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFECompositeElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedString> SVGFECompositeElement::In2() { already_AddRefed<DOMSVGAnimatedString> SVGFECompositeElement::In2() {
return mStringAttributes[IN2].ToDOMAnimatedString(this); return mStringAttributes[IN2].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFECompositeElement::Operator() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGFECompositeElement::Operator() {
return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this); return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFECompositeElement::K1() { already_AddRefed<DOMSVGAnimatedNumber> SVGFECompositeElement::K1() {
return mNumberAttributes[ATTR_K1].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_K1].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFECompositeElement::K2() { already_AddRefed<DOMSVGAnimatedNumber> SVGFECompositeElement::K2() {
return mNumberAttributes[ATTR_K2].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_K2].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFECompositeElement::K3() { already_AddRefed<DOMSVGAnimatedNumber> SVGFECompositeElement::K3() {
return mNumberAttributes[ATTR_K3].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_K3].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFECompositeElement::K4() { already_AddRefed<DOMSVGAnimatedNumber> SVGFECompositeElement::K4() {
return mNumberAttributes[ATTR_K4].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_K4].ToDOMAnimatedNumber(this);
} }

View File

@ -46,13 +46,13 @@ class SVGFECompositeElement : public SVGFECompositeElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedString> In2(); already_AddRefed<DOMSVGAnimatedString> In2();
already_AddRefed<SVGAnimatedEnumeration> Operator(); already_AddRefed<DOMSVGAnimatedEnumeration> Operator();
already_AddRefed<SVGAnimatedNumber> K1(); already_AddRefed<DOMSVGAnimatedNumber> K1();
already_AddRefed<SVGAnimatedNumber> K2(); already_AddRefed<DOMSVGAnimatedNumber> K2();
already_AddRefed<SVGAnimatedNumber> K3(); already_AddRefed<DOMSVGAnimatedNumber> K3();
already_AddRefed<SVGAnimatedNumber> K4(); already_AddRefed<DOMSVGAnimatedNumber> K4();
void SetK(float k1, float k2, float k3, float k4); void SetK(float k1, float k2, float k3, float k4);
protected: protected:

View File

@ -62,16 +62,16 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEConvolveMatrixElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGFEConvolveMatrixElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEConvolveMatrixElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderX() { already_AddRefed<DOMSVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderX() {
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger( return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(
SVGIntegerPair::eFirst, this); SVGIntegerPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderY() { already_AddRefed<DOMSVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderY() {
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger( return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(
SVGIntegerPair::eSecond, this); SVGIntegerPair::eSecond, this);
} }
@ -82,39 +82,39 @@ SVGFEConvolveMatrixElement::KernelMatrix() {
&mNumberListAttributes[KERNELMATRIX], this, KERNELMATRIX); &mNumberListAttributes[KERNELMATRIX], this, KERNELMATRIX);
} }
already_AddRefed<SVGAnimatedInteger> SVGFEConvolveMatrixElement::TargetX() { already_AddRefed<DOMSVGAnimatedInteger> SVGFEConvolveMatrixElement::TargetX() {
return mIntegerAttributes[TARGET_X].ToDOMAnimatedInteger(this); return mIntegerAttributes[TARGET_X].ToDOMAnimatedInteger(this);
} }
already_AddRefed<SVGAnimatedInteger> SVGFEConvolveMatrixElement::TargetY() { already_AddRefed<DOMSVGAnimatedInteger> SVGFEConvolveMatrixElement::TargetY() {
return mIntegerAttributes[TARGET_Y].ToDOMAnimatedInteger(this); return mIntegerAttributes[TARGET_Y].ToDOMAnimatedInteger(this);
} }
already_AddRefed<SVGAnimatedEnumeration> already_AddRefed<DOMSVGAnimatedEnumeration>
SVGFEConvolveMatrixElement::EdgeMode() { SVGFEConvolveMatrixElement::EdgeMode() {
return mEnumAttributes[EDGEMODE].ToDOMAnimatedEnum(this); return mEnumAttributes[EDGEMODE].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedBoolean> already_AddRefed<DOMSVGAnimatedBoolean>
SVGFEConvolveMatrixElement::PreserveAlpha() { SVGFEConvolveMatrixElement::PreserveAlpha() {
return mBooleanAttributes[PRESERVEALPHA].ToDOMAnimatedBoolean(this); return mBooleanAttributes[PRESERVEALPHA].ToDOMAnimatedBoolean(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEConvolveMatrixElement::Divisor() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEConvolveMatrixElement::Divisor() {
return mNumberAttributes[DIVISOR].ToDOMAnimatedNumber(this); return mNumberAttributes[DIVISOR].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEConvolveMatrixElement::Bias() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEConvolveMatrixElement::Bias() {
return mNumberAttributes[BIAS].ToDOMAnimatedNumber(this); return mNumberAttributes[BIAS].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFEConvolveMatrixElement::KernelUnitLengthX() { SVGFEConvolveMatrixElement::KernelUnitLengthX() {
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber( return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
SVGNumberPair::eFirst, this); SVGNumberPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFEConvolveMatrixElement::KernelUnitLengthY() { SVGFEConvolveMatrixElement::KernelUnitLengthY() {
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber( return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
SVGNumberPair::eSecond, this); SVGNumberPair::eSecond, this);

View File

@ -7,7 +7,7 @@
#ifndef mozilla_dom_SVGFEConvolveMatrixElement_h #ifndef mozilla_dom_SVGFEConvolveMatrixElement_h
#define mozilla_dom_SVGFEConvolveMatrixElement_h #define mozilla_dom_SVGFEConvolveMatrixElement_h
#include "SVGAnimatedNumberList.h" #include "DOMSVGAnimatedNumberList.h"
#include "SVGBoolean.h" #include "SVGBoolean.h"
#include "SVGEnum.h" #include "SVGEnum.h"
#include "SVGFilters.h" #include "SVGFilters.h"
@ -23,7 +23,7 @@ namespace mozilla {
namespace dom { namespace dom {
class DOMSVGAnimatedNumberList; class DOMSVGAnimatedNumberList;
class SVGAnimatedBoolean; class DOMSVGAnimatedBoolean;
typedef SVGFE SVGFEConvolveMatrixElementBase; typedef SVGFE SVGFEConvolveMatrixElementBase;
@ -54,18 +54,18 @@ class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedInteger> OrderX(); already_AddRefed<DOMSVGAnimatedInteger> OrderX();
already_AddRefed<SVGAnimatedInteger> OrderY(); already_AddRefed<DOMSVGAnimatedInteger> OrderY();
already_AddRefed<DOMSVGAnimatedNumberList> KernelMatrix(); already_AddRefed<DOMSVGAnimatedNumberList> KernelMatrix();
already_AddRefed<SVGAnimatedInteger> TargetX(); already_AddRefed<DOMSVGAnimatedInteger> TargetX();
already_AddRefed<SVGAnimatedInteger> TargetY(); already_AddRefed<DOMSVGAnimatedInteger> TargetY();
already_AddRefed<SVGAnimatedEnumeration> EdgeMode(); already_AddRefed<DOMSVGAnimatedEnumeration> EdgeMode();
already_AddRefed<SVGAnimatedBoolean> PreserveAlpha(); already_AddRefed<DOMSVGAnimatedBoolean> PreserveAlpha();
already_AddRefed<SVGAnimatedNumber> Divisor(); already_AddRefed<DOMSVGAnimatedNumber> Divisor();
already_AddRefed<SVGAnimatedNumber> Bias(); already_AddRefed<DOMSVGAnimatedNumber> Bias();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX(); already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY(); already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthY();
protected: protected:
virtual NumberAttributesInfo GetNumberInfo() override; virtual NumberAttributesInfo GetNumberInfo() override;

View File

@ -28,27 +28,27 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDiffuseLightingElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGFEDiffuseLightingElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEDiffuseLightingElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFEDiffuseLightingElement::SurfaceScale() { SVGFEDiffuseLightingElement::SurfaceScale() {
return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this); return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFEDiffuseLightingElement::DiffuseConstant() { SVGFEDiffuseLightingElement::DiffuseConstant() {
return mNumberAttributes[DIFFUSE_CONSTANT].ToDOMAnimatedNumber(this); return mNumberAttributes[DIFFUSE_CONSTANT].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFEDiffuseLightingElement::KernelUnitLengthX() { SVGFEDiffuseLightingElement::KernelUnitLengthX() {
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber( return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
SVGNumberPair::eFirst, this); SVGNumberPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFEDiffuseLightingElement::KernelUnitLengthY() { SVGFEDiffuseLightingElement::KernelUnitLengthY() {
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber( return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
SVGNumberPair::eSecond, this); SVGNumberPair::eSecond, this);

View File

@ -40,11 +40,11 @@ class SVGFEDiffuseLightingElement : public SVGFEDiffuseLightingElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedNumber> SurfaceScale(); already_AddRefed<DOMSVGAnimatedNumber> SurfaceScale();
already_AddRefed<SVGAnimatedNumber> DiffuseConstant(); already_AddRefed<DOMSVGAnimatedNumber> DiffuseConstant();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX(); already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY(); already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthY();
}; };
} // namespace dom } // namespace dom

View File

@ -48,24 +48,24 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDisplacementMapElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGFEDisplacementMapElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEDisplacementMapElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedString> SVGFEDisplacementMapElement::In2() { already_AddRefed<DOMSVGAnimatedString> SVGFEDisplacementMapElement::In2() {
return mStringAttributes[IN2].ToDOMAnimatedString(this); return mStringAttributes[IN2].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEDisplacementMapElement::Scale() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEDisplacementMapElement::Scale() {
return mNumberAttributes[SCALE].ToDOMAnimatedNumber(this); return mNumberAttributes[SCALE].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedEnumeration> already_AddRefed<DOMSVGAnimatedEnumeration>
SVGFEDisplacementMapElement::XChannelSelector() { SVGFEDisplacementMapElement::XChannelSelector() {
return mEnumAttributes[CHANNEL_X].ToDOMAnimatedEnum(this); return mEnumAttributes[CHANNEL_X].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedEnumeration> already_AddRefed<DOMSVGAnimatedEnumeration>
SVGFEDisplacementMapElement::YChannelSelector() { SVGFEDisplacementMapElement::YChannelSelector() {
return mEnumAttributes[CHANNEL_Y].ToDOMAnimatedEnum(this); return mEnumAttributes[CHANNEL_Y].ToDOMAnimatedEnum(this);
} }

View File

@ -44,11 +44,11 @@ class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedString> In2(); already_AddRefed<DOMSVGAnimatedString> In2();
already_AddRefed<SVGAnimatedNumber> Scale(); already_AddRefed<DOMSVGAnimatedNumber> Scale();
already_AddRefed<SVGAnimatedEnumeration> XChannelSelector(); already_AddRefed<DOMSVGAnimatedEnumeration> XChannelSelector();
already_AddRefed<SVGAnimatedEnumeration> YChannelSelector(); already_AddRefed<DOMSVGAnimatedEnumeration> YChannelSelector();
protected: protected:
virtual bool OperatesOnSRGB(int32_t aInputIndex, virtual bool OperatesOnSRGB(int32_t aInputIndex,

View File

@ -49,11 +49,11 @@ LightType SVGFEDistantLightElement::ComputeLightAttributes(
return LightType::Distant; return LightType::Distant;
} }
already_AddRefed<SVGAnimatedNumber> SVGFEDistantLightElement::Azimuth() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEDistantLightElement::Azimuth() {
return mNumberAttributes[AZIMUTH].ToDOMAnimatedNumber(this); return mNumberAttributes[AZIMUTH].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEDistantLightElement::Elevation() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEDistantLightElement::Elevation() {
return mNumberAttributes[ELEVATION].ToDOMAnimatedNumber(this); return mNumberAttributes[ELEVATION].ToDOMAnimatedNumber(this);
} }

View File

@ -40,8 +40,8 @@ class SVGFEDistantLightElement : public SVGFEDistantLightElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedNumber> Azimuth(); already_AddRefed<DOMSVGAnimatedNumber> Azimuth();
already_AddRefed<SVGAnimatedNumber> Elevation(); already_AddRefed<DOMSVGAnimatedNumber> Elevation();
protected: protected:
virtual NumberAttributesInfo GetNumberInfo() override; virtual NumberAttributesInfo GetNumberInfo() override;

View File

@ -38,24 +38,24 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDropShadowElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGFEDropShadowElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEDropShadowElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEDropShadowElement::Dx() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEDropShadowElement::Dx() {
return mNumberAttributes[DX].ToDOMAnimatedNumber(this); return mNumberAttributes[DX].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEDropShadowElement::Dy() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEDropShadowElement::Dy() {
return mNumberAttributes[DY].ToDOMAnimatedNumber(this); return mNumberAttributes[DY].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationX() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationX() {
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber( return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
SVGNumberPair::eFirst, this); SVGNumberPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationY() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationY() {
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber( return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
SVGNumberPair::eSecond, this); SVGNumberPair::eSecond, this);
} }

View File

@ -50,11 +50,11 @@ class SVGFEDropShadowElement : public SVGFEDropShadowElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedNumber> Dx(); already_AddRefed<DOMSVGAnimatedNumber> Dx();
already_AddRefed<SVGAnimatedNumber> Dy(); already_AddRefed<DOMSVGAnimatedNumber> Dy();
already_AddRefed<SVGAnimatedNumber> StdDeviationX(); already_AddRefed<DOMSVGAnimatedNumber> StdDeviationX();
already_AddRefed<SVGAnimatedNumber> StdDeviationY(); already_AddRefed<DOMSVGAnimatedNumber> StdDeviationY();
void SetStdDeviation(float stdDeviationX, float stdDeviationY); void SetStdDeviation(float stdDeviationX, float stdDeviationY);
protected: protected:

View File

@ -35,16 +35,18 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEGaussianBlurElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGFEGaussianBlurElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEGaussianBlurElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEGaussianBlurElement::StdDeviationX() { already_AddRefed<DOMSVGAnimatedNumber>
SVGFEGaussianBlurElement::StdDeviationX() {
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber( return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
SVGNumberPair::eFirst, this); SVGNumberPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEGaussianBlurElement::StdDeviationY() { already_AddRefed<DOMSVGAnimatedNumber>
SVGFEGaussianBlurElement::StdDeviationY() {
return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber( return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
SVGNumberPair::eSecond, this); SVGNumberPair::eSecond, this);
} }

View File

@ -46,9 +46,9 @@ class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedNumber> StdDeviationX(); already_AddRefed<DOMSVGAnimatedNumber> StdDeviationX();
already_AddRefed<SVGAnimatedNumber> StdDeviationY(); already_AddRefed<DOMSVGAnimatedNumber> StdDeviationY();
void SetStdDeviation(float stdDeviationX, float stdDeviationY); void SetStdDeviation(float stdDeviationX, float stdDeviationY);
protected: protected:

View File

@ -165,7 +165,7 @@ EventStates SVGFEImageElement::IntrinsicState() const {
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEImageElement) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEImageElement)
already_AddRefed<SVGAnimatedString> SVGFEImageElement::Href() { already_AddRefed<DOMSVGAnimatedString> SVGFEImageElement::Href() {
return mStringAttributes[HREF].IsExplicitlySet() return mStringAttributes[HREF].IsExplicitlySet()
? mStringAttributes[HREF].ToDOMAnimatedString(this) ? mStringAttributes[HREF].ToDOMAnimatedString(this)
: mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this); : mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this);

View File

@ -79,7 +79,7 @@ class SVGFEImageElement final : public SVGFEImageElementBase,
void MaybeLoadSVGImage(); void MaybeLoadSVGImage();
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> Href(); already_AddRefed<DOMSVGAnimatedString> Href();
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio(); already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
private: private:

View File

@ -33,7 +33,7 @@ bool SVGFEMergeNodeElement::AttributeAffectsRendering(
return aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::in; return aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::in;
} }
already_AddRefed<SVGAnimatedString> SVGFEMergeNodeElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEMergeNodeElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }

View File

@ -38,7 +38,7 @@ class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase {
const SVGString* GetIn1() { return &mStringAttributes[IN1]; } const SVGString* GetIn1() { return &mStringAttributes[IN1]; }
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
protected: protected:
virtual StringAttributesInfo GetStringInfo() override; virtual StringAttributesInfo GetStringInfo() override;

View File

@ -43,20 +43,20 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEMorphologyElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// SVGFEMorphologyElement methods // SVGFEMorphologyElement methods
already_AddRefed<SVGAnimatedString> SVGFEMorphologyElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEMorphologyElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFEMorphologyElement::Operator() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGFEMorphologyElement::Operator() {
return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this); return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEMorphologyElement::RadiusX() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEMorphologyElement::RadiusX() {
return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber( return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(
SVGNumberPair::eFirst, this); SVGNumberPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEMorphologyElement::RadiusY() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEMorphologyElement::RadiusY() {
return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber( return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(
SVGNumberPair::eSecond, this); SVGNumberPair::eSecond, this);
} }

View File

@ -47,10 +47,10 @@ class SVGFEMorphologyElement : public SVGFEMorphologyElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedEnumeration> Operator(); already_AddRefed<DOMSVGAnimatedEnumeration> Operator();
already_AddRefed<SVGAnimatedNumber> RadiusX(); already_AddRefed<DOMSVGAnimatedNumber> RadiusX();
already_AddRefed<SVGAnimatedNumber> RadiusY(); already_AddRefed<DOMSVGAnimatedNumber> RadiusY();
void SetRadius(float rx, float ry); void SetRadius(float rx, float ry);
protected: protected:

View File

@ -34,15 +34,15 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEOffsetElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedString> SVGFEOffsetElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFEOffsetElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEOffsetElement::Dx() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEOffsetElement::Dx() {
return mNumberAttributes[DX].ToDOMAnimatedNumber(this); return mNumberAttributes[DX].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEOffsetElement::Dy() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEOffsetElement::Dy() {
return mNumberAttributes[DY].ToDOMAnimatedNumber(this); return mNumberAttributes[DY].ToDOMAnimatedNumber(this);
} }

View File

@ -46,9 +46,9 @@ class SVGFEOffsetElement : public SVGFEOffsetElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedNumber> Dx(); already_AddRefed<DOMSVGAnimatedNumber> Dx();
already_AddRefed<SVGAnimatedNumber> Dy(); already_AddRefed<DOMSVGAnimatedNumber> Dy();
protected: protected:
virtual NumberAttributesInfo GetNumberInfo() override; virtual NumberAttributesInfo GetNumberInfo() override;

View File

@ -54,15 +54,15 @@ LightType SVGFEPointLightElement::ComputeLightAttributes(
return LightType::Point; return LightType::Point;
} }
already_AddRefed<SVGAnimatedNumber> SVGFEPointLightElement::X() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEPointLightElement::X() {
return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEPointLightElement::Y() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEPointLightElement::Y() {
return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFEPointLightElement::Z() { already_AddRefed<DOMSVGAnimatedNumber> SVGFEPointLightElement::Z() {
return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);
} }

View File

@ -40,9 +40,9 @@ class SVGFEPointLightElement : public SVGFEPointLightElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedNumber> X(); already_AddRefed<DOMSVGAnimatedNumber> X();
already_AddRefed<SVGAnimatedNumber> Y(); already_AddRefed<DOMSVGAnimatedNumber> Y();
already_AddRefed<SVGAnimatedNumber> Z(); already_AddRefed<DOMSVGAnimatedNumber> Z();
protected: protected:
virtual NumberAttributesInfo GetNumberInfo() override; virtual NumberAttributesInfo GetNumberInfo() override;

View File

@ -26,32 +26,32 @@ JSObject* SVGFESpecularLightingElement::WrapNode(
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFESpecularLightingElement) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFESpecularLightingElement)
already_AddRefed<SVGAnimatedString> SVGFESpecularLightingElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFESpecularLightingElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFESpecularLightingElement::SurfaceScale() { SVGFESpecularLightingElement::SurfaceScale() {
return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this); return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFESpecularLightingElement::SpecularConstant() { SVGFESpecularLightingElement::SpecularConstant() {
return mNumberAttributes[SPECULAR_CONSTANT].ToDOMAnimatedNumber(this); return mNumberAttributes[SPECULAR_CONSTANT].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFESpecularLightingElement::SpecularExponent() { SVGFESpecularLightingElement::SpecularExponent() {
return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this); return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFESpecularLightingElement::KernelUnitLengthX() { SVGFESpecularLightingElement::KernelUnitLengthX() {
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber( return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
SVGNumberPair::eFirst, this); SVGNumberPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGFESpecularLightingElement::KernelUnitLengthY() { SVGFESpecularLightingElement::KernelUnitLengthY() {
return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber( return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
SVGNumberPair::eSecond, this); SVGNumberPair::eSecond, this);

View File

@ -42,12 +42,12 @@ class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase {
nsAtom* aAttribute) const override; nsAtom* aAttribute) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
already_AddRefed<SVGAnimatedNumber> SurfaceScale(); already_AddRefed<DOMSVGAnimatedNumber> SurfaceScale();
already_AddRefed<SVGAnimatedNumber> SpecularConstant(); already_AddRefed<DOMSVGAnimatedNumber> SpecularConstant();
already_AddRefed<SVGAnimatedNumber> SpecularExponent(); already_AddRefed<DOMSVGAnimatedNumber> SpecularExponent();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX(); already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthX();
already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY(); already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthY();
}; };
} // namespace dom } // namespace dom

View File

@ -71,35 +71,37 @@ LightType SVGFESpotLightElement::ComputeLightAttributes(
return LightType::Spot; return LightType::Spot;
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::X() { already_AddRefed<DOMSVGAnimatedNumber> SVGFESpotLightElement::X() {
return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::Y() { already_AddRefed<DOMSVGAnimatedNumber> SVGFESpotLightElement::Y() {
return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::Z() { already_AddRefed<DOMSVGAnimatedNumber> SVGFESpotLightElement::Z() {
return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this); return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::PointsAtX() { already_AddRefed<DOMSVGAnimatedNumber> SVGFESpotLightElement::PointsAtX() {
return mNumberAttributes[POINTS_AT_X].ToDOMAnimatedNumber(this); return mNumberAttributes[POINTS_AT_X].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::PointsAtY() { already_AddRefed<DOMSVGAnimatedNumber> SVGFESpotLightElement::PointsAtY() {
return mNumberAttributes[POINTS_AT_Y].ToDOMAnimatedNumber(this); return mNumberAttributes[POINTS_AT_Y].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::PointsAtZ() { already_AddRefed<DOMSVGAnimatedNumber> SVGFESpotLightElement::PointsAtZ() {
return mNumberAttributes[POINTS_AT_Z].ToDOMAnimatedNumber(this); return mNumberAttributes[POINTS_AT_Z].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::SpecularExponent() { already_AddRefed<DOMSVGAnimatedNumber>
SVGFESpotLightElement::SpecularExponent() {
return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this); return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::LimitingConeAngle() { already_AddRefed<DOMSVGAnimatedNumber>
SVGFESpotLightElement::LimitingConeAngle() {
return mNumberAttributes[LIMITING_CONE_ANGLE].ToDOMAnimatedNumber(this); return mNumberAttributes[LIMITING_CONE_ANGLE].ToDOMAnimatedNumber(this);
} }

View File

@ -41,14 +41,14 @@ class SVGFESpotLightElement : public SVGFESpotLightElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedNumber> X(); already_AddRefed<DOMSVGAnimatedNumber> X();
already_AddRefed<SVGAnimatedNumber> Y(); already_AddRefed<DOMSVGAnimatedNumber> Y();
already_AddRefed<SVGAnimatedNumber> Z(); already_AddRefed<DOMSVGAnimatedNumber> Z();
already_AddRefed<SVGAnimatedNumber> PointsAtX(); already_AddRefed<DOMSVGAnimatedNumber> PointsAtX();
already_AddRefed<SVGAnimatedNumber> PointsAtY(); already_AddRefed<DOMSVGAnimatedNumber> PointsAtY();
already_AddRefed<SVGAnimatedNumber> PointsAtZ(); already_AddRefed<DOMSVGAnimatedNumber> PointsAtZ();
already_AddRefed<SVGAnimatedNumber> SpecularExponent(); already_AddRefed<DOMSVGAnimatedNumber> SpecularExponent();
already_AddRefed<SVGAnimatedNumber> LimitingConeAngle(); already_AddRefed<DOMSVGAnimatedNumber> LimitingConeAngle();
protected: protected:
virtual NumberAttributesInfo GetNumberInfo() override; virtual NumberAttributesInfo GetNumberInfo() override;

View File

@ -29,7 +29,7 @@ SVGElement::StringInfo SVGFETileElement::sStringInfo[2] = {
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETileElement) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETileElement)
already_AddRefed<SVGAnimatedString> SVGFETileElement::In1() { already_AddRefed<DOMSVGAnimatedString> SVGFETileElement::In1() {
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }

View File

@ -46,7 +46,7 @@ class SVGFETileElement : public SVGFETileElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<DOMSVGAnimatedString> In1();
protected: protected:
virtual StringAttributesInfo GetStringInfo() override; virtual StringAttributesInfo GetStringInfo() override;

View File

@ -60,29 +60,32 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETurbulenceElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedNumber> SVGFETurbulenceElement::BaseFrequencyX() { already_AddRefed<DOMSVGAnimatedNumber>
SVGFETurbulenceElement::BaseFrequencyX() {
return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber( return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(
SVGNumberPair::eFirst, this); SVGNumberPair::eFirst, this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFETurbulenceElement::BaseFrequencyY() { already_AddRefed<DOMSVGAnimatedNumber>
SVGFETurbulenceElement::BaseFrequencyY() {
return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber( return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(
SVGNumberPair::eSecond, this); SVGNumberPair::eSecond, this);
} }
already_AddRefed<SVGAnimatedInteger> SVGFETurbulenceElement::NumOctaves() { already_AddRefed<DOMSVGAnimatedInteger> SVGFETurbulenceElement::NumOctaves() {
return mIntegerAttributes[OCTAVES].ToDOMAnimatedInteger(this); return mIntegerAttributes[OCTAVES].ToDOMAnimatedInteger(this);
} }
already_AddRefed<SVGAnimatedNumber> SVGFETurbulenceElement::Seed() { already_AddRefed<DOMSVGAnimatedNumber> SVGFETurbulenceElement::Seed() {
return mNumberAttributes[SEED].ToDOMAnimatedNumber(this); return mNumberAttributes[SEED].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFETurbulenceElement::StitchTiles() { already_AddRefed<DOMSVGAnimatedEnumeration>
SVGFETurbulenceElement::StitchTiles() {
return mEnumAttributes[STITCHTILES].ToDOMAnimatedEnum(this); return mEnumAttributes[STITCHTILES].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFETurbulenceElement::Type() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGFETurbulenceElement::Type() {
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this); return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);
} }

View File

@ -49,12 +49,12 @@ class SVGFETurbulenceElement : public SVGFETurbulenceElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedNumber> BaseFrequencyX(); already_AddRefed<DOMSVGAnimatedNumber> BaseFrequencyX();
already_AddRefed<SVGAnimatedNumber> BaseFrequencyY(); already_AddRefed<DOMSVGAnimatedNumber> BaseFrequencyY();
already_AddRefed<SVGAnimatedInteger> NumOctaves(); already_AddRefed<DOMSVGAnimatedInteger> NumOctaves();
already_AddRefed<SVGAnimatedNumber> Seed(); already_AddRefed<DOMSVGAnimatedNumber> Seed();
already_AddRefed<SVGAnimatedEnumeration> StitchTiles(); already_AddRefed<DOMSVGAnimatedEnumeration> StitchTiles();
already_AddRefed<SVGAnimatedEnumeration> Type(); already_AddRefed<DOMSVGAnimatedEnumeration> Type();
protected: protected:
virtual NumberAttributesInfo GetNumberInfo() override; virtual NumberAttributesInfo GetNumberInfo() override;

View File

@ -62,31 +62,31 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFilterElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGFilterElement::X() { already_AddRefed<DOMSVGAnimatedLength> SVGFilterElement::X() {
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGFilterElement::Y() { already_AddRefed<DOMSVGAnimatedLength> SVGFilterElement::Y() {
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGFilterElement::Width() { already_AddRefed<DOMSVGAnimatedLength> SVGFilterElement::Width() {
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGFilterElement::Height() { already_AddRefed<DOMSVGAnimatedLength> SVGFilterElement::Height() {
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFilterElement::FilterUnits() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGFilterElement::FilterUnits() {
return mEnumAttributes[FILTERUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[FILTERUNITS].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGFilterElement::PrimitiveUnits() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGFilterElement::PrimitiveUnits() {
return mEnumAttributes[PRIMITIVEUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[PRIMITIVEUNITS].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedString> SVGFilterElement::Href() { already_AddRefed<DOMSVGAnimatedString> SVGFilterElement::Href() {
return mStringAttributes[HREF].IsExplicitlySet() return mStringAttributes[HREF].IsExplicitlySet()
? mStringAttributes[HREF].ToDOMAnimatedString(this) ? mStringAttributes[HREF].ToDOMAnimatedString(this)
: mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this); : mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this);

View File

@ -20,7 +20,7 @@ nsresult NS_NewSVGFilterElement(
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
class SVGAnimatedLength; class DOMSVGAnimatedLength;
typedef SVGElement SVGFilterElementBase; typedef SVGElement SVGFilterElementBase;
@ -46,13 +46,13 @@ class SVGFilterElement : public SVGFilterElementBase {
virtual bool HasValidDimensions() const override; virtual bool HasValidDimensions() const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> X(); already_AddRefed<DOMSVGAnimatedLength> X();
already_AddRefed<SVGAnimatedLength> Y(); already_AddRefed<DOMSVGAnimatedLength> Y();
already_AddRefed<SVGAnimatedLength> Width(); already_AddRefed<DOMSVGAnimatedLength> Width();
already_AddRefed<SVGAnimatedLength> Height(); already_AddRefed<DOMSVGAnimatedLength> Height();
already_AddRefed<SVGAnimatedEnumeration> FilterUnits(); already_AddRefed<DOMSVGAnimatedEnumeration> FilterUnits();
already_AddRefed<SVGAnimatedEnumeration> PrimitiveUnits(); already_AddRefed<DOMSVGAnimatedEnumeration> PrimitiveUnits();
already_AddRefed<SVGAnimatedString> Href(); already_AddRefed<DOMSVGAnimatedString> Href();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;

View File

@ -8,12 +8,12 @@
#include <algorithm> #include <algorithm>
#include "DOMSVGAnimatedNumberList.h" #include "DOMSVGAnimatedNumberList.h"
#include "DOMSVGAnimatedLength.h"
#include "imgIContainer.h" #include "imgIContainer.h"
#include "nsGkAtoms.h" #include "nsGkAtoms.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsLayoutUtils.h" #include "nsLayoutUtils.h"
#include "SVGAnimatedNumberList.h"
#include "SVGEnum.h" #include "SVGEnum.h"
#include "nsSVGFilterInstance.h" #include "nsSVGFilterInstance.h"
#include "SVGNumberList.h" #include "SVGNumberList.h"
@ -23,7 +23,6 @@
#include "mozilla/ComputedStyle.h" #include "mozilla/ComputedStyle.h"
#include "mozilla/SVGContentUtils.h" #include "mozilla/SVGContentUtils.h"
#include "nsSVGUtils.h" #include "nsSVGUtils.h"
#include "mozilla/dom/SVGAnimatedLength.h"
#include "mozilla/dom/SVGComponentTransferFunctionElement.h" #include "mozilla/dom/SVGComponentTransferFunctionElement.h"
#include "mozilla/dom/SVGElement.h" #include "mozilla/dom/SVGElement.h"
#include "mozilla/dom/SVGFEDistantLightElement.h" #include "mozilla/dom/SVGFEDistantLightElement.h"
@ -93,23 +92,23 @@ bool SVGFE::AttributeAffectsRendering(int32_t aNameSpaceID,
aAttribute == nsGkAtoms::result); aAttribute == nsGkAtoms::result);
} }
already_AddRefed<SVGAnimatedLength> SVGFE::X() { already_AddRefed<DOMSVGAnimatedLength> SVGFE::X() {
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGFE::Y() { already_AddRefed<DOMSVGAnimatedLength> SVGFE::Y() {
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGFE::Width() { already_AddRefed<DOMSVGAnimatedLength> SVGFE::Width() {
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGFE::Height() { already_AddRefed<DOMSVGAnimatedLength> SVGFE::Height() {
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedString> SVGFE::Result() { already_AddRefed<DOMSVGAnimatedString> SVGFE::Result() {
return GetResultImageName().ToDOMAnimatedString(this); return GetResultImageName().ToDOMAnimatedString(this);
} }
@ -212,7 +211,7 @@ bool SVGComponentTransferFunctionElement::AttributeAffectsRendering(
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedEnumeration> already_AddRefed<DOMSVGAnimatedEnumeration>
SVGComponentTransferFunctionElement::Type() { SVGComponentTransferFunctionElement::Type() {
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this); return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);
} }
@ -223,27 +222,27 @@ SVGComponentTransferFunctionElement::TableValues() {
&mNumberListAttributes[TABLEVALUES], this, TABLEVALUES); &mNumberListAttributes[TABLEVALUES], this, TABLEVALUES);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGComponentTransferFunctionElement::Slope() { SVGComponentTransferFunctionElement::Slope() {
return mNumberAttributes[SLOPE].ToDOMAnimatedNumber(this); return mNumberAttributes[SLOPE].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGComponentTransferFunctionElement::Intercept() { SVGComponentTransferFunctionElement::Intercept() {
return mNumberAttributes[INTERCEPT].ToDOMAnimatedNumber(this); return mNumberAttributes[INTERCEPT].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGComponentTransferFunctionElement::Amplitude() { SVGComponentTransferFunctionElement::Amplitude() {
return mNumberAttributes[AMPLITUDE].ToDOMAnimatedNumber(this); return mNumberAttributes[AMPLITUDE].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGComponentTransferFunctionElement::Exponent() { SVGComponentTransferFunctionElement::Exponent() {
return mNumberAttributes[EXPONENT].ToDOMAnimatedNumber(this); return mNumberAttributes[EXPONENT].ToDOMAnimatedNumber(this);
} }
already_AddRefed<SVGAnimatedNumber> already_AddRefed<DOMSVGAnimatedNumber>
SVGComponentTransferFunctionElement::Offset() { SVGComponentTransferFunctionElement::Offset() {
return mNumberAttributes[OFFSET].ToDOMAnimatedNumber(this); return mNumberAttributes[OFFSET].ToDOMAnimatedNumber(this);
} }

View File

@ -126,11 +126,11 @@ class SVGFE : public SVGFEBase {
operator nsISupports*() { return static_cast<nsIContent*>(this); } operator nsISupports*() { return static_cast<nsIContent*>(this); }
// WebIDL // WebIDL
already_AddRefed<mozilla::dom::SVGAnimatedLength> X(); already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> X();
already_AddRefed<mozilla::dom::SVGAnimatedLength> Y(); already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> Y();
already_AddRefed<mozilla::dom::SVGAnimatedLength> Width(); already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> Width();
already_AddRefed<mozilla::dom::SVGAnimatedLength> Height(); already_AddRefed<mozilla::dom::DOMSVGAnimatedLength> Height();
already_AddRefed<mozilla::dom::SVGAnimatedString> Result(); already_AddRefed<mozilla::dom::DOMSVGAnimatedString> Result();
protected: protected:
virtual bool OperatesOnSRGB(int32_t aInputIndex, bool aInputIsAlreadySRGB) { virtual bool OperatesOnSRGB(int32_t aInputIndex, bool aInputIsAlreadySRGB) {

View File

@ -47,19 +47,19 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGForeignObjectElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGForeignObjectElement::X() { already_AddRefed<DOMSVGAnimatedLength> SVGForeignObjectElement::X() {
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGForeignObjectElement::Y() { already_AddRefed<DOMSVGAnimatedLength> SVGForeignObjectElement::Y() {
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGForeignObjectElement::Width() { already_AddRefed<DOMSVGAnimatedLength> SVGForeignObjectElement::Width() {
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGForeignObjectElement::Height() { already_AddRefed<DOMSVGAnimatedLength> SVGForeignObjectElement::Height() {
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
} }

View File

@ -43,10 +43,10 @@ class SVGForeignObjectElement final : public SVGGraphicsElement {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> X(); already_AddRefed<DOMSVGAnimatedLength> X();
already_AddRefed<SVGAnimatedLength> Y(); already_AddRefed<DOMSVGAnimatedLength> Y();
already_AddRefed<SVGAnimatedLength> Width(); already_AddRefed<DOMSVGAnimatedLength> Width();
already_AddRefed<SVGAnimatedLength> Height(); already_AddRefed<DOMSVGAnimatedLength> Height();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;

View File

@ -179,6 +179,6 @@ float SVGGeometryElement::GetPathLengthScale(PathLengthScaleForType aFor) {
return 1.0; return 1.0;
} }
already_AddRefed<SVGAnimatedNumber> SVGGeometryElement::PathLength() { already_AddRefed<DOMSVGAnimatedNumber> SVGGeometryElement::PathLength() {
return mPathLength.ToDOMAnimatedNumber(this); return mPathLength.ToDOMAnimatedNumber(this);
} }

View File

@ -31,7 +31,7 @@ struct SVGMark {
namespace dom { namespace dom {
class SVGAnimatedNumber; class DOMSVGAnimatedNumber;
typedef mozilla::dom::SVGGraphicsElement SVGGeometryElementBase; typedef mozilla::dom::SVGGraphicsElement SVGGeometryElementBase;
@ -208,7 +208,7 @@ class SVGGeometryElement : public SVGGeometryElementBase {
float GetPathLengthScale(PathLengthScaleForType aFor); float GetPathLengthScale(PathLengthScaleForType aFor);
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedNumber> PathLength(); already_AddRefed<DOMSVGAnimatedNumber> PathLength();
float GetTotalLength(); float GetTotalLength();
already_AddRefed<nsISVGPoint> GetPointAtLength(float distance, already_AddRefed<nsISVGPoint> GetPointAtLength(float distance,
ErrorResult& rv); ErrorResult& rv);

View File

@ -62,7 +62,8 @@ SVGElement::StringAttributesInfo SVGGradientElement::GetStringInfo() {
ArrayLength(sStringInfo)); ArrayLength(sStringInfo));
} }
already_AddRefed<SVGAnimatedEnumeration> SVGGradientElement::GradientUnits() { already_AddRefed<DOMSVGAnimatedEnumeration>
SVGGradientElement::GradientUnits() {
return mEnumAttributes[GRADIENTUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[GRADIENTUNITS].ToDOMAnimatedEnum(this);
} }
@ -74,11 +75,11 @@ SVGGradientElement::GradientTransform() {
GetAnimatedTransformList(DO_ALLOCATE), this); GetAnimatedTransformList(DO_ALLOCATE), this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGGradientElement::SpreadMethod() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGGradientElement::SpreadMethod() {
return mEnumAttributes[SPREADMETHOD].ToDOMAnimatedEnum(this); return mEnumAttributes[SPREADMETHOD].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedString> SVGGradientElement::Href() { already_AddRefed<DOMSVGAnimatedString> SVGGradientElement::Href() {
return mStringAttributes[HREF].IsExplicitlySet() return mStringAttributes[HREF].IsExplicitlySet()
? mStringAttributes[HREF].ToDOMAnimatedString(this) ? mStringAttributes[HREF].ToDOMAnimatedString(this)
: mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this); : mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this);
@ -128,19 +129,19 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGLinearGradientElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGLinearGradientElement::X1() { already_AddRefed<DOMSVGAnimatedLength> SVGLinearGradientElement::X1() {
return mLengthAttributes[ATTR_X1].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X1].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGLinearGradientElement::Y1() { already_AddRefed<DOMSVGAnimatedLength> SVGLinearGradientElement::Y1() {
return mLengthAttributes[ATTR_Y1].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y1].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGLinearGradientElement::X2() { already_AddRefed<DOMSVGAnimatedLength> SVGLinearGradientElement::X2() {
return mLengthAttributes[ATTR_X2].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X2].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGLinearGradientElement::Y2() { already_AddRefed<DOMSVGAnimatedLength> SVGLinearGradientElement::Y2() {
return mLengthAttributes[ATTR_Y2].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y2].ToDOMAnimatedLength(this);
} }
@ -196,27 +197,27 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGRadialGradientElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::Cx() { already_AddRefed<DOMSVGAnimatedLength> SVGRadialGradientElement::Cx() {
return mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::Cy() { already_AddRefed<DOMSVGAnimatedLength> SVGRadialGradientElement::Cy() {
return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::R() { already_AddRefed<DOMSVGAnimatedLength> SVGRadialGradientElement::R() {
return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::Fx() { already_AddRefed<DOMSVGAnimatedLength> SVGRadialGradientElement::Fx() {
return mLengthAttributes[ATTR_FX].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_FX].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::Fy() { already_AddRefed<DOMSVGAnimatedLength> SVGRadialGradientElement::Fy() {
return mLengthAttributes[ATTR_FY].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_FY].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::Fr() { already_AddRefed<DOMSVGAnimatedLength> SVGRadialGradientElement::Fr() {
return mLengthAttributes[ATTR_FR].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_FR].ToDOMAnimatedLength(this);
} }

View File

@ -54,10 +54,10 @@ class SVGGradientElement : public SVGGradientElementBase {
} }
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedEnumeration> GradientUnits(); already_AddRefed<DOMSVGAnimatedEnumeration> GradientUnits();
already_AddRefed<DOMSVGAnimatedTransformList> GradientTransform(); already_AddRefed<DOMSVGAnimatedTransformList> GradientTransform();
already_AddRefed<SVGAnimatedEnumeration> SpreadMethod(); already_AddRefed<DOMSVGAnimatedEnumeration> SpreadMethod();
already_AddRefed<SVGAnimatedString> Href(); already_AddRefed<DOMSVGAnimatedString> Href();
protected: protected:
virtual EnumAttributesInfo GetEnumInfo() override; virtual EnumAttributesInfo GetEnumInfo() override;
@ -96,10 +96,10 @@ class SVGLinearGradientElement : public SVGLinearGradientElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> X1(); already_AddRefed<DOMSVGAnimatedLength> X1();
already_AddRefed<SVGAnimatedLength> Y1(); already_AddRefed<DOMSVGAnimatedLength> Y1();
already_AddRefed<SVGAnimatedLength> X2(); already_AddRefed<DOMSVGAnimatedLength> X2();
already_AddRefed<SVGAnimatedLength> Y2(); already_AddRefed<DOMSVGAnimatedLength> Y2();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;
@ -129,12 +129,12 @@ class SVGRadialGradientElement : public SVGRadialGradientElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> Cx(); already_AddRefed<DOMSVGAnimatedLength> Cx();
already_AddRefed<SVGAnimatedLength> Cy(); already_AddRefed<DOMSVGAnimatedLength> Cy();
already_AddRefed<SVGAnimatedLength> R(); already_AddRefed<DOMSVGAnimatedLength> R();
already_AddRefed<SVGAnimatedLength> Fx(); already_AddRefed<DOMSVGAnimatedLength> Fx();
already_AddRefed<SVGAnimatedLength> Fy(); already_AddRefed<DOMSVGAnimatedLength> Fy();
already_AddRefed<SVGAnimatedLength> Fr(); already_AddRefed<DOMSVGAnimatedLength> Fr();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;

View File

@ -70,19 +70,19 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGImageElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGImageElement::X() { already_AddRefed<DOMSVGAnimatedLength> SVGImageElement::X() {
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGImageElement::Y() { already_AddRefed<DOMSVGAnimatedLength> SVGImageElement::Y() {
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGImageElement::Width() { already_AddRefed<DOMSVGAnimatedLength> SVGImageElement::Width() {
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGImageElement::Height() { already_AddRefed<DOMSVGAnimatedLength> SVGImageElement::Height() {
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
} }
@ -91,7 +91,7 @@ SVGImageElement::PreserveAspectRatio() {
return mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(this); return mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(this);
} }
already_AddRefed<SVGAnimatedString> SVGImageElement::Href() { already_AddRefed<DOMSVGAnimatedString> SVGImageElement::Href() {
return mStringAttributes[HREF].IsExplicitlySet() return mStringAttributes[HREF].IsExplicitlySet()
? mStringAttributes[HREF].ToDOMAnimatedString(this) ? mStringAttributes[HREF].ToDOMAnimatedString(this)
: mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this); : mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this);

View File

@ -81,12 +81,12 @@ class SVGImageElement : public SVGImageElementBase,
void MaybeLoadSVGImage(); void MaybeLoadSVGImage();
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> X(); already_AddRefed<DOMSVGAnimatedLength> X();
already_AddRefed<SVGAnimatedLength> Y(); already_AddRefed<DOMSVGAnimatedLength> Y();
already_AddRefed<SVGAnimatedLength> Width(); already_AddRefed<DOMSVGAnimatedLength> Width();
already_AddRefed<SVGAnimatedLength> Height(); already_AddRefed<DOMSVGAnimatedLength> Height();
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio(); already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
already_AddRefed<SVGAnimatedString> Href(); already_AddRefed<DOMSVGAnimatedString> Href();
void SetDecoding(const nsAString& aDecoding, ErrorResult& aError) { void SetDecoding(const nsAString& aDecoding, ErrorResult& aError) {
SetAttr(nsGkAtoms::decoding, aDecoding, aError); SetAttr(nsGkAtoms::decoding, aDecoding, aError);

View File

@ -72,7 +72,7 @@ void SVGInteger::SetAnimValue(int aValue, SVGElement *aSVGElement) {
aSVGElement->DidAnimateInteger(mAttrEnum); aSVGElement->DidAnimateInteger(mAttrEnum);
} }
already_AddRefed<SVGAnimatedInteger> SVGInteger::ToDOMAnimatedInteger( already_AddRefed<DOMSVGAnimatedInteger> SVGInteger::ToDOMAnimatedInteger(
SVGElement *aSVGElement) { SVGElement *aSVGElement) {
RefPtr<DOMAnimatedInteger> domAnimatedInteger = RefPtr<DOMAnimatedInteger> domAnimatedInteger =
sSVGAnimatedIntegerTearoffTable.GetTearoff(this); sSVGAnimatedIntegerTearoffTable.GetTearoff(this);

View File

@ -9,7 +9,7 @@
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
#include "nsError.h" #include "nsError.h"
#include "SVGAnimatedInteger.h" #include "DOMSVGAnimatedInteger.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/SMILAttr.h" #include "mozilla/SMILAttr.h"
#include "mozilla/UniquePtr.h" #include "mozilla/UniquePtr.h"
@ -50,7 +50,7 @@ class SVGInteger {
// usable, and represents the default base value of the attribute. // usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; } bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::SVGAnimatedInteger> ToDOMAnimatedInteger( already_AddRefed<mozilla::dom::DOMSVGAnimatedInteger> ToDOMAnimatedInteger(
SVGElement* aSVGElement); SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement); mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
@ -62,9 +62,9 @@ class SVGInteger {
bool mIsBaseSet; bool mIsBaseSet;
public: public:
struct DOMAnimatedInteger final : public mozilla::dom::SVGAnimatedInteger { struct DOMAnimatedInteger final : public mozilla::dom::DOMSVGAnimatedInteger {
DOMAnimatedInteger(SVGInteger* aVal, SVGElement* aSVGElement) DOMAnimatedInteger(SVGInteger* aVal, SVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedInteger(aSVGElement), mVal(aVal) {} : mozilla::dom::DOMSVGAnimatedInteger(aSVGElement), mVal(aVal) {}
virtual ~DOMAnimatedInteger(); virtual ~DOMAnimatedInteger();
SVGInteger* mVal; // kept alive because it belongs to content SVGInteger* mVal; // kept alive because it belongs to content

View File

@ -136,7 +136,7 @@ void SVGIntegerPair::SetAnimValue(const int32_t aValue[2],
aSVGElement->DidAnimateIntegerPair(mAttrEnum); aSVGElement->DidAnimateIntegerPair(mAttrEnum);
} }
already_AddRefed<SVGAnimatedInteger> SVGIntegerPair::ToDOMAnimatedInteger( already_AddRefed<DOMSVGAnimatedInteger> SVGIntegerPair::ToDOMAnimatedInteger(
PairIndex aIndex, SVGElement* aSVGElement) { PairIndex aIndex, SVGElement* aSVGElement) {
RefPtr<DOMAnimatedInteger> domAnimatedInteger = RefPtr<DOMAnimatedInteger> domAnimatedInteger =
aIndex == eFirst ? sSVGFirstAnimatedIntegerTearoffTable.GetTearoff(this) aIndex == eFirst ? sSVGFirstAnimatedIntegerTearoffTable.GetTearoff(this)

View File

@ -7,12 +7,12 @@
#ifndef __NS_SVGINTEGERPAIR_H__ #ifndef __NS_SVGINTEGERPAIR_H__
#define __NS_SVGINTEGERPAIR_H__ #define __NS_SVGINTEGERPAIR_H__
#include "DOMSVGAnimatedInteger.h"
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
#include "nsError.h" #include "nsError.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/SMILAttr.h" #include "mozilla/SMILAttr.h"
#include "mozilla/UniquePtr.h" #include "mozilla/UniquePtr.h"
#include "mozilla/dom/SVGAnimatedInteger.h"
namespace mozilla { namespace mozilla {
@ -58,7 +58,7 @@ class SVGIntegerPair {
// usable, and represents the default base value of the attribute. // usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; } bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::SVGAnimatedInteger> ToDOMAnimatedInteger( already_AddRefed<mozilla::dom::DOMSVGAnimatedInteger> ToDOMAnimatedInteger(
PairIndex aIndex, SVGElement* aSVGElement); PairIndex aIndex, SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement); mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
@ -70,10 +70,10 @@ class SVGIntegerPair {
bool mIsBaseSet; bool mIsBaseSet;
public: public:
struct DOMAnimatedInteger final : public mozilla::dom::SVGAnimatedInteger { struct DOMAnimatedInteger final : public mozilla::dom::DOMSVGAnimatedInteger {
DOMAnimatedInteger(SVGIntegerPair* aVal, PairIndex aIndex, DOMAnimatedInteger(SVGIntegerPair* aVal, PairIndex aIndex,
SVGElement* aSVGElement) SVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedInteger(aSVGElement), : mozilla::dom::DOMSVGAnimatedInteger(aSVGElement),
mVal(aVal), mVal(aVal),
mIndex(aIndex) {} mIndex(aIndex) {}
virtual ~DOMAnimatedInteger(); virtual ~DOMAnimatedInteger();

View File

@ -61,19 +61,19 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGLineElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGLineElement::X1() { already_AddRefed<DOMSVGAnimatedLength> SVGLineElement::X1() {
return mLengthAttributes[ATTR_X1].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X1].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGLineElement::Y1() { already_AddRefed<DOMSVGAnimatedLength> SVGLineElement::Y1() {
return mLengthAttributes[ATTR_Y1].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y1].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGLineElement::X2() { already_AddRefed<DOMSVGAnimatedLength> SVGLineElement::X2() {
return mLengthAttributes[ATTR_X2].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X2].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGLineElement::Y2() { already_AddRefed<DOMSVGAnimatedLength> SVGLineElement::Y2() {
return mLengthAttributes[ATTR_Y2].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y2].ToDOMAnimatedLength(this);
} }

View File

@ -48,10 +48,10 @@ class SVGLineElement final : public SVGLineElementBase {
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedLength> X1(); already_AddRefed<DOMSVGAnimatedLength> X1();
already_AddRefed<SVGAnimatedLength> Y1(); already_AddRefed<DOMSVGAnimatedLength> Y1();
already_AddRefed<SVGAnimatedLength> X2(); already_AddRefed<DOMSVGAnimatedLength> X2();
already_AddRefed<SVGAnimatedLength> Y2(); already_AddRefed<DOMSVGAnimatedLength> Y2();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;

View File

@ -60,7 +60,7 @@ SVGMPathElement::~SVGMPathElement() { UnlinkHrefTarget(false); }
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMPathElement) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMPathElement)
already_AddRefed<SVGAnimatedString> SVGMPathElement::Href() { already_AddRefed<DOMSVGAnimatedString> SVGMPathElement::Href() {
return mStringAttributes[HREF].IsExplicitlySet() return mStringAttributes[HREF].IsExplicitlySet()
? mStringAttributes[HREF].ToDOMAnimatedString(this) ? mStringAttributes[HREF].ToDOMAnimatedString(this)
: mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this); : mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this);

View File

@ -65,7 +65,7 @@ class SVGMPathElement final : public SVGMPathElementBase,
SVGPathElement* GetReferencedPath(); SVGPathElement* GetReferencedPath();
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> Href(); already_AddRefed<DOMSVGAnimatedString> Href();
protected: protected:
/** /**

View File

@ -7,10 +7,10 @@
#include "mozilla/dom/SVGMarkerElement.h" #include "mozilla/dom/SVGMarkerElement.h"
#include "nsGkAtoms.h" #include "nsGkAtoms.h"
#include "DOMSVGAngle.h"
#include "SVGAnimatedPreserveAspectRatio.h" #include "SVGAnimatedPreserveAspectRatio.h"
#include "nsError.h" #include "nsError.h"
#include "mozilla/ArrayUtils.h" #include "mozilla/ArrayUtils.h"
#include "mozilla/dom/DOMSVGAngle.h"
#include "mozilla/dom/SVGGeometryElement.h" #include "mozilla/dom/SVGGeometryElement.h"
#include "mozilla/dom/SVGLengthBinding.h" #include "mozilla/dom/SVGLengthBinding.h"
#include "mozilla/dom/SVGMarkerElementBinding.h" #include "mozilla/dom/SVGMarkerElementBinding.h"
@ -78,31 +78,31 @@ SVGMarkerElement::PreserveAspectRatio() {
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedLength> SVGMarkerElement::RefX() { already_AddRefed<DOMSVGAnimatedLength> SVGMarkerElement::RefX() {
return mLengthAttributes[REFX].ToDOMAnimatedLength(this); return mLengthAttributes[REFX].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGMarkerElement::RefY() { already_AddRefed<DOMSVGAnimatedLength> SVGMarkerElement::RefY() {
return mLengthAttributes[REFY].ToDOMAnimatedLength(this); return mLengthAttributes[REFY].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGMarkerElement::MarkerUnits() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGMarkerElement::MarkerUnits() {
return mEnumAttributes[MARKERUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[MARKERUNITS].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedLength> SVGMarkerElement::MarkerWidth() { already_AddRefed<DOMSVGAnimatedLength> SVGMarkerElement::MarkerWidth() {
return mLengthAttributes[MARKERWIDTH].ToDOMAnimatedLength(this); return mLengthAttributes[MARKERWIDTH].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGMarkerElement::MarkerHeight() { already_AddRefed<DOMSVGAnimatedLength> SVGMarkerElement::MarkerHeight() {
return mLengthAttributes[MARKERHEIGHT].ToDOMAnimatedLength(this); return mLengthAttributes[MARKERHEIGHT].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGMarkerElement::OrientType() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGMarkerElement::OrientType() {
return mOrient.ToDOMAnimatedEnum(this); return mOrient.ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedAngle> SVGMarkerElement::OrientAngle() { already_AddRefed<DOMSVGAnimatedAngle> SVGMarkerElement::OrientAngle() {
return mOrient.ToDOMAnimatedAngle(this); return mOrient.ToDOMAnimatedAngle(this);
} }

View File

@ -7,6 +7,8 @@
#ifndef mozilla_dom_SVGMarkerElement_h #ifndef mozilla_dom_SVGMarkerElement_h
#define mozilla_dom_SVGMarkerElement_h #define mozilla_dom_SVGMarkerElement_h
#include "DOMSVGAnimatedAngle.h"
#include "DOMSVGAnimatedEnumeration.h"
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#include "SVGAnimatedPreserveAspectRatio.h" #include "SVGAnimatedPreserveAspectRatio.h"
#include "SVGEnum.h" #include "SVGEnum.h"
@ -14,8 +16,6 @@
#include "SVGOrient.h" #include "SVGOrient.h"
#include "SVGViewBox.h" #include "SVGViewBox.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimatedAngle.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
#include "mozilla/dom/SVGElement.h" #include "mozilla/dom/SVGElement.h"
#include "mozilla/dom/SVGMarkerElementBinding.h" #include "mozilla/dom/SVGMarkerElementBinding.h"
@ -64,13 +64,13 @@ class SVGMarkerElement : public SVGMarkerElementBase {
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedRect> ViewBox(); already_AddRefed<SVGAnimatedRect> ViewBox();
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio(); already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
already_AddRefed<SVGAnimatedLength> RefX(); already_AddRefed<DOMSVGAnimatedLength> RefX();
already_AddRefed<SVGAnimatedLength> RefY(); already_AddRefed<DOMSVGAnimatedLength> RefY();
already_AddRefed<SVGAnimatedEnumeration> MarkerUnits(); already_AddRefed<DOMSVGAnimatedEnumeration> MarkerUnits();
already_AddRefed<SVGAnimatedLength> MarkerWidth(); already_AddRefed<DOMSVGAnimatedLength> MarkerWidth();
already_AddRefed<SVGAnimatedLength> MarkerHeight(); already_AddRefed<DOMSVGAnimatedLength> MarkerHeight();
already_AddRefed<SVGAnimatedEnumeration> OrientType(); already_AddRefed<DOMSVGAnimatedEnumeration> OrientType();
already_AddRefed<SVGAnimatedAngle> OrientAngle(); already_AddRefed<DOMSVGAnimatedAngle> OrientAngle();
void SetOrientToAuto(); void SetOrientToAuto();
void SetOrientToAngle(DOMSVGAngle& angle, ErrorResult& rv); void SetOrientToAngle(DOMSVGAngle& angle, ErrorResult& rv);

View File

@ -57,27 +57,27 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMaskElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
already_AddRefed<SVGAnimatedEnumeration> SVGMaskElement::MaskUnits() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGMaskElement::MaskUnits() {
return mEnumAttributes[MASKUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[MASKUNITS].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedEnumeration> SVGMaskElement::MaskContentUnits() { already_AddRefed<DOMSVGAnimatedEnumeration> SVGMaskElement::MaskContentUnits() {
return mEnumAttributes[MASKCONTENTUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[MASKCONTENTUNITS].ToDOMAnimatedEnum(this);
} }
already_AddRefed<SVGAnimatedLength> SVGMaskElement::X() { already_AddRefed<DOMSVGAnimatedLength> SVGMaskElement::X() {
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGMaskElement::Y() { already_AddRefed<DOMSVGAnimatedLength> SVGMaskElement::Y() {
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGMaskElement::Width() { already_AddRefed<DOMSVGAnimatedLength> SVGMaskElement::Width() {
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
} }
already_AddRefed<SVGAnimatedLength> SVGMaskElement::Height() { already_AddRefed<DOMSVGAnimatedLength> SVGMaskElement::Height() {
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this); return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
} }

View File

@ -43,12 +43,12 @@ class SVGMaskElement final : public SVGMaskElementBase {
virtual bool HasValidDimensions() const override; virtual bool HasValidDimensions() const override;
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedEnumeration> MaskUnits(); already_AddRefed<DOMSVGAnimatedEnumeration> MaskUnits();
already_AddRefed<SVGAnimatedEnumeration> MaskContentUnits(); already_AddRefed<DOMSVGAnimatedEnumeration> MaskContentUnits();
already_AddRefed<SVGAnimatedLength> X(); already_AddRefed<DOMSVGAnimatedLength> X();
already_AddRefed<SVGAnimatedLength> Y(); already_AddRefed<DOMSVGAnimatedLength> Y();
already_AddRefed<SVGAnimatedLength> Width(); already_AddRefed<DOMSVGAnimatedLength> Width();
already_AddRefed<SVGAnimatedLength> Height(); already_AddRefed<DOMSVGAnimatedLength> Height();
protected: protected:
virtual LengthAttributesInfo GetLengthInfo() override; virtual LengthAttributesInfo GetLengthInfo() override;

View File

@ -37,7 +37,7 @@
#ifndef mozilla_dom_SVGMatrix_h #ifndef mozilla_dom_SVGMatrix_h
#define mozilla_dom_SVGMatrix_h #define mozilla_dom_SVGMatrix_h
#include "mozilla/dom/DOMSVGTransform.h" #include "DOMSVGTransform.h"
#include "gfxMatrix.h" #include "gfxMatrix.h"
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h" #include "nsWrapperCache.h"

View File

@ -129,7 +129,7 @@ void SVGNumberPair::SetAnimValue(const float aValue[2],
aSVGElement->DidAnimateNumberPair(mAttrEnum); aSVGElement->DidAnimateNumberPair(mAttrEnum);
} }
already_AddRefed<SVGAnimatedNumber> SVGNumberPair::ToDOMAnimatedNumber( already_AddRefed<DOMSVGAnimatedNumber> SVGNumberPair::ToDOMAnimatedNumber(
PairIndex aIndex, SVGElement* aSVGElement) { PairIndex aIndex, SVGElement* aSVGElement) {
RefPtr<DOMAnimatedNumber> domAnimatedNumber = RefPtr<DOMAnimatedNumber> domAnimatedNumber =
aIndex == eFirst ? sSVGFirstAnimatedNumberTearoffTable.GetTearoff(this) aIndex == eFirst ? sSVGFirstAnimatedNumberTearoffTable.GetTearoff(this)

View File

@ -7,10 +7,10 @@
#ifndef __NS_SVGNUMBERPAIR_H__ #ifndef __NS_SVGNUMBERPAIR_H__
#define __NS_SVGNUMBERPAIR_H__ #define __NS_SVGNUMBERPAIR_H__
#include "DOMSVGAnimatedNumber.h"
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
#include "nsError.h" #include "nsError.h"
#include "nsMathUtils.h" #include "nsMathUtils.h"
#include "mozilla/dom/SVGAnimatedNumber.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/FloatingPoint.h" #include "mozilla/FloatingPoint.h"
#include "mozilla/SMILAttr.h" #include "mozilla/SMILAttr.h"
@ -59,7 +59,7 @@ class SVGNumberPair {
// usable, and represents the default base value of the attribute. // usable, and represents the default base value of the attribute.
bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; } bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
already_AddRefed<mozilla::dom::SVGAnimatedNumber> ToDOMAnimatedNumber( already_AddRefed<mozilla::dom::DOMSVGAnimatedNumber> ToDOMAnimatedNumber(
PairIndex aIndex, SVGElement* aSVGElement); PairIndex aIndex, SVGElement* aSVGElement);
mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement); mozilla::UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
@ -71,10 +71,12 @@ class SVGNumberPair {
bool mIsBaseSet; bool mIsBaseSet;
public: public:
struct DOMAnimatedNumber final : public mozilla::dom::SVGAnimatedNumber { // DOM wrapper class for the (DOM)SVGAnimatedNumber interface where the
// wrapped class is SVGNumberPair.
struct DOMAnimatedNumber final : public mozilla::dom::DOMSVGAnimatedNumber {
DOMAnimatedNumber(SVGNumberPair* aVal, PairIndex aIndex, DOMAnimatedNumber(SVGNumberPair* aVal, PairIndex aIndex,
SVGElement* aSVGElement) SVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedNumber(aSVGElement), : mozilla::dom::DOMSVGAnimatedNumber(aSVGElement),
mVal(aVal), mVal(aVal),
mIndex(aIndex) {} mIndex(aIndex) {}
virtual ~DOMAnimatedNumber(); virtual ~DOMAnimatedNumber();

View File

@ -9,13 +9,13 @@
#include "mozilla/ArrayUtils.h" #include "mozilla/ArrayUtils.h"
#include "mozilla/Move.h" #include "mozilla/Move.h"
#include "mozilla/SMILValue.h" #include "mozilla/SMILValue.h"
#include "mozilla/dom/DOMSVGAngle.h"
#include "mozilla/dom/SVGAnimatedAngle.h"
#include "mozilla/dom/SVGMarkerElement.h" #include "mozilla/dom/SVGMarkerElement.h"
#include "DOMSVGAnimatedAngle.h"
#include "DOMSVGAngle.h"
#include "nsContentUtils.h" #include "nsContentUtils.h"
#include "nsTextFormatter.h"
#include "SVGAttrTearoffTable.h" #include "SVGAttrTearoffTable.h"
#include "SVGOrientSMILType.h" #include "SVGOrientSMILType.h"
#include "nsTextFormatter.h"
using namespace mozilla::dom; using namespace mozilla::dom;
using namespace mozilla::dom::SVGAngle_Binding; using namespace mozilla::dom::SVGAngle_Binding;
@ -28,9 +28,9 @@ static const nsStaticAtom* const angleUnitMap[] = {
nullptr, /* SVG_ANGLETYPE_UNSPECIFIED */ nullptr, /* SVG_ANGLETYPE_UNSPECIFIED */
nsGkAtoms::deg, nsGkAtoms::rad, nsGkAtoms::grad}; nsGkAtoms::deg, nsGkAtoms::rad, nsGkAtoms::grad};
static SVGAttrTearoffTable<SVGOrient, SVGAnimatedEnumeration> static SVGAttrTearoffTable<SVGOrient, DOMSVGAnimatedEnumeration>
sSVGAnimatedEnumTearoffTable; sSVGAnimatedEnumTearoffTable;
static SVGAttrTearoffTable<SVGOrient, SVGAnimatedAngle> static SVGAttrTearoffTable<SVGOrient, DOMSVGAnimatedAngle>
sSVGAnimatedAngleTearoffTable; sSVGAnimatedAngleTearoffTable;
static SVGAttrTearoffTable<SVGOrient, DOMSVGAngle> sBaseSVGAngleTearoffTable; static SVGAttrTearoffTable<SVGOrient, DOMSVGAngle> sBaseSVGAngleTearoffTable;
static SVGAttrTearoffTable<SVGOrient, DOMSVGAngle> sAnimSVGAngleTearoffTable; static SVGAttrTearoffTable<SVGOrient, DOMSVGAngle> sAnimSVGAngleTearoffTable;
@ -369,21 +369,21 @@ void SVGOrient::SetAnimType(SVGEnumValue aValue, SVGElement* aSVGElement) {
aSVGElement->DidAnimateOrient(); aSVGElement->DidAnimateOrient();
} }
already_AddRefed<SVGAnimatedAngle> SVGOrient::ToDOMAnimatedAngle( already_AddRefed<DOMSVGAnimatedAngle> SVGOrient::ToDOMAnimatedAngle(
SVGElement* aSVGElement) { SVGElement* aSVGElement) {
RefPtr<SVGAnimatedAngle> domAnimatedAngle = RefPtr<DOMSVGAnimatedAngle> domAnimatedAngle =
sSVGAnimatedAngleTearoffTable.GetTearoff(this); sSVGAnimatedAngleTearoffTable.GetTearoff(this);
if (!domAnimatedAngle) { if (!domAnimatedAngle) {
domAnimatedAngle = new SVGAnimatedAngle(this, aSVGElement); domAnimatedAngle = new DOMSVGAnimatedAngle(this, aSVGElement);
sSVGAnimatedAngleTearoffTable.AddTearoff(this, domAnimatedAngle); sSVGAnimatedAngleTearoffTable.AddTearoff(this, domAnimatedAngle);
} }
return domAnimatedAngle.forget(); return domAnimatedAngle.forget();
} }
already_AddRefed<SVGAnimatedEnumeration> SVGOrient::ToDOMAnimatedEnum( already_AddRefed<DOMSVGAnimatedEnumeration> SVGOrient::ToDOMAnimatedEnum(
SVGElement* aSVGElement) { SVGElement* aSVGElement) {
RefPtr<SVGAnimatedEnumeration> domAnimatedEnum = RefPtr<DOMSVGAnimatedEnumeration> domAnimatedEnum =
sSVGAnimatedEnumTearoffTable.GetTearoff(this); sSVGAnimatedEnumTearoffTable.GetTearoff(this);
if (!domAnimatedEnum) { if (!domAnimatedEnum) {
domAnimatedEnum = new DOMAnimatedEnum(this, aSVGElement); domAnimatedEnum = new DOMAnimatedEnum(this, aSVGElement);
@ -393,7 +393,7 @@ already_AddRefed<SVGAnimatedEnumeration> SVGOrient::ToDOMAnimatedEnum(
return domAnimatedEnum.forget(); return domAnimatedEnum.forget();
} }
SVGAnimatedAngle::~SVGAnimatedAngle() { DOMSVGAnimatedAngle::~DOMSVGAnimatedAngle() {
sSVGAnimatedAngleTearoffTable.RemoveTearoff(mVal); sSVGAnimatedAngleTearoffTable.RemoveTearoff(mVal);
} }

View File

@ -7,13 +7,13 @@
#ifndef __NS_SVGORIENT_H__ #ifndef __NS_SVGORIENT_H__
#define __NS_SVGORIENT_H__ #define __NS_SVGORIENT_H__
#include "DOMSVGAnimatedEnumeration.h"
#include "nsError.h" #include "nsError.h"
#include "SVGEnum.h" #include "SVGEnum.h"
#include "mozilla/AlreadyAddRefed.h" #include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/SMILAttr.h" #include "mozilla/SMILAttr.h"
#include "mozilla/dom/SVGAngleBinding.h" #include "mozilla/dom/SVGAngleBinding.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
#include "mozilla/dom/SVGMarkerElementBinding.h" #include "mozilla/dom/SVGMarkerElementBinding.h"
#include "mozilla/UniquePtr.h" #include "mozilla/UniquePtr.h"
@ -25,7 +25,7 @@ class SMILValue;
namespace dom { namespace dom {
class DOMSVGAngle; class DOMSVGAngle;
class SVGAnimatedAngle; class DOMSVGAnimatedAngle;
class SVGAnimationElement; class SVGAnimationElement;
class SVGElement; class SVGElement;
} // namespace dom } // namespace dom
@ -33,7 +33,7 @@ class SVGElement;
class SVGOrient { class SVGOrient {
friend class AutoChangeOrientNotifier; friend class AutoChangeOrientNotifier;
friend class mozilla::dom::DOMSVGAngle; friend class mozilla::dom::DOMSVGAngle;
friend class mozilla::dom::SVGAnimatedAngle; friend class mozilla::dom::DOMSVGAnimatedAngle;
typedef mozilla::dom::SVGElement SVGElement; typedef mozilla::dom::SVGElement SVGElement;
public: public:
@ -72,9 +72,9 @@ class SVGOrient {
float GetAnimValInSpecifiedUnits() const { return mAnimVal; } float GetAnimValInSpecifiedUnits() const { return mAnimVal; }
static nsresult ToDOMSVGAngle(nsISupports** aResult); static nsresult ToDOMSVGAngle(nsISupports** aResult);
already_AddRefed<dom::SVGAnimatedAngle> ToDOMAnimatedAngle( already_AddRefed<dom::DOMSVGAnimatedAngle> ToDOMAnimatedAngle(
SVGElement* aSVGElement); SVGElement* aSVGElement);
already_AddRefed<dom::SVGAnimatedEnumeration> ToDOMAnimatedEnum( already_AddRefed<dom::DOMSVGAnimatedEnumeration> ToDOMAnimatedEnum(
SVGElement* aSVGElement); SVGElement* aSVGElement);
UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement); UniquePtr<SMILAttr> ToSMILAttr(SVGElement* aSVGElement);
@ -99,14 +99,16 @@ class SVGOrient {
already_AddRefed<dom::DOMSVGAngle> ToDOMAnimVal(SVGElement* aSVGElement); already_AddRefed<dom::DOMSVGAngle> ToDOMAnimVal(SVGElement* aSVGElement);
public: public:
struct DOMAnimatedEnum final : public dom::SVGAnimatedEnumeration { // DOM wrapper class for the (DOM)SVGAnimatedEnumeration interface where the
// wrapped class is SVGOrient.
struct DOMAnimatedEnum final : public dom::DOMSVGAnimatedEnumeration {
DOMAnimatedEnum(SVGOrient* aVal, SVGElement* aSVGElement) DOMAnimatedEnum(SVGOrient* aVal, SVGElement* aSVGElement)
: SVGAnimatedEnumeration(aSVGElement), mVal(aVal) {} : DOMSVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
~DOMAnimatedEnum(); ~DOMAnimatedEnum();
SVGOrient* mVal; // kept alive because it belongs to content SVGOrient* mVal; // kept alive because it belongs to content
using mozilla::dom::SVGAnimatedEnumeration::SetBaseVal; using mozilla::dom::DOMSVGAnimatedEnumeration::SetBaseVal;
uint16_t BaseVal() override { return Sanitize(mVal->mBaseType); } uint16_t BaseVal() override { return Sanitize(mVal->mBaseType); }
void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) override { void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) override {
aRv = mVal->SetBaseType(aBaseVal, mSVGElement); aRv = mVal->SetBaseType(aBaseVal, mSVGElement);

Some files were not shown because too many files have changed in this diff Show More