Bug 886270 - Move SVGAnimatedInteger to WebIDL; r=dzbarsky

This commit is contained in:
Ms2ger 2013-07-01 09:02:56 +02:00
parent fa9bb545c0
commit 5ba35c354d
22 changed files with 156 additions and 137 deletions

View File

@ -0,0 +1,32 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/SVGAnimatedInteger.h"
#include "mozilla/dom/SVGAnimatedIntegerBinding.h"
namespace mozilla {
namespace dom {
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedInteger,
mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedInteger)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedInteger)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
JSObject*
SVGAnimatedInteger::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
{
return SVGAnimatedIntegerBinding::Wrap(aCx, aScope, this);
}
} // namespace dom
} // namespace mozilla

View File

@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGAnimatedInteger_h
#define mozilla_dom_SVGAnimatedInteger_h
#include "nsIDOMSVGAnimatedEnum.h"
#include "nsWrapperCache.h"
#include "nsSVGElement.h"
namespace mozilla {
namespace dom {
class SVGAnimatedInteger : public nsISupports
, public nsWrapperCache
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedInteger)
nsSVGElement* GetParentObject() const
{
return mSVGElement;
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
MOZ_OVERRIDE MOZ_FINAL;
virtual int32_t BaseVal() = 0;
virtual void SetBaseVal(int32_t aBaseVal) = 0;
virtual int32_t AnimVal() = 0;
protected:
explicit SVGAnimatedInteger(nsSVGElement* aSVGElement)
: mSVGElement(aSVGElement)
{
SetIsDOMBinding();
}
virtual ~SVGAnimatedInteger() {};
nsRefPtr<nsSVGElement> mSVGElement;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_SVGAnimatedInteger_h

View File

@ -91,13 +91,13 @@ SVGFEConvolveMatrixElement::In1()
return mStringAttributes[IN1].ToDOMAnimatedString(this); return mStringAttributes[IN1].ToDOMAnimatedString(this);
} }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::OrderX() SVGFEConvolveMatrixElement::OrderX()
{ {
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(nsSVGIntegerPair::eFirst, this); return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(nsSVGIntegerPair::eFirst, this);
} }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::OrderY() SVGFEConvolveMatrixElement::OrderY()
{ {
return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(nsSVGIntegerPair::eSecond, this); return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(nsSVGIntegerPair::eSecond, this);
@ -110,13 +110,13 @@ SVGFEConvolveMatrixElement::KernelMatrix()
this, KERNELMATRIX); this, KERNELMATRIX);
} }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::TargetX() SVGFEConvolveMatrixElement::TargetX()
{ {
return mIntegerAttributes[TARGET_X].ToDOMAnimatedInteger(this); return mIntegerAttributes[TARGET_X].ToDOMAnimatedInteger(this);
} }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<SVGAnimatedInteger>
SVGFEConvolveMatrixElement::TargetY() SVGFEConvolveMatrixElement::TargetY()
{ {
return mIntegerAttributes[TARGET_Y].ToDOMAnimatedInteger(this); return mIntegerAttributes[TARGET_Y].ToDOMAnimatedInteger(this);

View File

@ -59,11 +59,11 @@ public:
// WebIDL // WebIDL
already_AddRefed<SVGAnimatedString> In1(); already_AddRefed<SVGAnimatedString> In1();
already_AddRefed<nsIDOMSVGAnimatedInteger> OrderX(); already_AddRefed<SVGAnimatedInteger> OrderX();
already_AddRefed<nsIDOMSVGAnimatedInteger> OrderY(); already_AddRefed<SVGAnimatedInteger> OrderY();
already_AddRefed<DOMSVGAnimatedNumberList> KernelMatrix(); already_AddRefed<DOMSVGAnimatedNumberList> KernelMatrix();
already_AddRefed<nsIDOMSVGAnimatedInteger> TargetX(); already_AddRefed<SVGAnimatedInteger> TargetX();
already_AddRefed<nsIDOMSVGAnimatedInteger> TargetY(); already_AddRefed<SVGAnimatedInteger> TargetY();
already_AddRefed<SVGAnimatedEnumeration> EdgeMode(); already_AddRefed<SVGAnimatedEnumeration> EdgeMode();
already_AddRefed<SVGAnimatedBoolean> PreserveAlpha(); already_AddRefed<SVGAnimatedBoolean> PreserveAlpha();
already_AddRefed<nsIDOMSVGAnimatedNumber> Divisor(); already_AddRefed<nsIDOMSVGAnimatedNumber> Divisor();

View File

@ -98,7 +98,7 @@ SVGFETurbulenceElement::BaseFrequencyY()
return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this); return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this);
} }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<SVGAnimatedInteger>
SVGFETurbulenceElement::NumOctaves() SVGFETurbulenceElement::NumOctaves()
{ {
return mIntegerAttributes[OCTAVES].ToDOMAnimatedInteger(this); return mIntegerAttributes[OCTAVES].ToDOMAnimatedInteger(this);

View File

@ -50,7 +50,7 @@ public:
// WebIDL // WebIDL
already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyX(); already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyX();
already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyY(); already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyY();
already_AddRefed<nsIDOMSVGAnimatedInteger> NumOctaves(); already_AddRefed<SVGAnimatedInteger> NumOctaves();
already_AddRefed<nsIDOMSVGAnimatedNumber> Seed(); already_AddRefed<nsIDOMSVGAnimatedNumber> Seed();
already_AddRefed<SVGAnimatedEnumeration> StitchTiles(); already_AddRefed<SVGAnimatedEnumeration> StitchTiles();
already_AddRefed<SVGAnimatedEnumeration> Type(); already_AddRefed<SVGAnimatedEnumeration> Type();

View File

@ -105,14 +105,14 @@ SVGFilterElement::PrimitiveUnits()
return mEnumAttributes[PRIMITIVEUNITS].ToDOMAnimatedEnum(this); return mEnumAttributes[PRIMITIVEUNITS].ToDOMAnimatedEnum(this);
} }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<SVGAnimatedInteger>
SVGFilterElement::FilterResX() SVGFilterElement::FilterResX()
{ {
return mIntegerPairAttributes[FILTERRES].ToDOMAnimatedInteger(nsSVGIntegerPair::eFirst, return mIntegerPairAttributes[FILTERRES].ToDOMAnimatedInteger(nsSVGIntegerPair::eFirst,
this); this);
} }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<SVGAnimatedInteger>
SVGFilterElement::FilterResY() SVGFilterElement::FilterResY()
{ {
return mIntegerPairAttributes[FILTERRES].ToDOMAnimatedInteger(nsSVGIntegerPair::eSecond, return mIntegerPairAttributes[FILTERRES].ToDOMAnimatedInteger(nsSVGIntegerPair::eSecond,

View File

@ -54,8 +54,8 @@ public:
already_AddRefed<SVGAnimatedLength> Height(); already_AddRefed<SVGAnimatedLength> Height();
already_AddRefed<SVGAnimatedEnumeration> FilterUnits(); already_AddRefed<SVGAnimatedEnumeration> FilterUnits();
already_AddRefed<SVGAnimatedEnumeration> PrimitiveUnits(); already_AddRefed<SVGAnimatedEnumeration> PrimitiveUnits();
already_AddRefed<nsIDOMSVGAnimatedInteger> FilterResX(); already_AddRefed<SVGAnimatedInteger> FilterResX();
already_AddRefed<nsIDOMSVGAnimatedInteger> FilterResY(); already_AddRefed<SVGAnimatedInteger> FilterResY();
void SetFilterRes(uint32_t filterResX, uint32_t filterResY); void SetFilterRes(uint32_t filterResX, uint32_t filterResY);
already_AddRefed<SVGAnimatedString> Href(); already_AddRefed<SVGAnimatedString> Href();

View File

@ -24,6 +24,7 @@ EXPORTS.mozilla.dom += [
'SVGAnimatedAngle.h', 'SVGAnimatedAngle.h',
'SVGAnimatedBoolean.h', 'SVGAnimatedBoolean.h',
'SVGAnimatedEnumeration.h', 'SVGAnimatedEnumeration.h',
'SVGAnimatedInteger.h',
'SVGAnimatedLength.h', 'SVGAnimatedLength.h',
'SVGAnimatedRect.h', 'SVGAnimatedRect.h',
'SVGAnimatedString.h', 'SVGAnimatedString.h',
@ -118,6 +119,7 @@ CPP_SOURCES += [
'SVGAnimatedAngle.cpp', 'SVGAnimatedAngle.cpp',
'SVGAnimatedBoolean.cpp', 'SVGAnimatedBoolean.cpp',
'SVGAnimatedEnumeration.cpp', 'SVGAnimatedEnumeration.cpp',
'SVGAnimatedInteger.cpp',
'SVGAnimatedLength.cpp', 'SVGAnimatedLength.cpp',
'SVGAnimatedLengthList.cpp', 'SVGAnimatedLengthList.cpp',
'SVGAnimatedNumberList.cpp', 'SVGAnimatedNumberList.cpp',

View File

@ -10,19 +10,7 @@
#include "SMILIntegerType.h" #include "SMILIntegerType.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::dom;
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGInteger::DOMAnimatedInteger, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGInteger::DOMAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGInteger::DOMAnimatedInteger)
DOMCI_DATA(SVGAnimatedInteger, nsSVGInteger::DOMAnimatedInteger)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGInteger::DOMAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedInteger)
NS_INTERFACE_MAP_END
/* Implementation */ /* Implementation */
@ -112,15 +100,7 @@ nsSVGInteger::SetAnimValue(int aValue, nsSVGElement *aSVGElement)
aSVGElement->DidAnimateInteger(mAttrEnum); aSVGElement->DidAnimateInteger(mAttrEnum);
} }
nsresult already_AddRefed<SVGAnimatedInteger>
nsSVGInteger::ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult,
nsSVGElement *aSVGElement)
{
*aResult = ToDOMAnimatedInteger(aSVGElement).get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
nsSVGInteger::ToDOMAnimatedInteger(nsSVGElement *aSVGElement) nsSVGInteger::ToDOMAnimatedInteger(nsSVGElement *aSVGElement)
{ {
nsRefPtr<DOMAnimatedInteger> domAnimatedInteger = nsRefPtr<DOMAnimatedInteger> domAnimatedInteger =

View File

@ -9,7 +9,7 @@
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
#include "nsError.h" #include "nsError.h"
#include "nsIDOMSVGAnimatedInteger.h" #include "SVGAnimatedInteger.h"
#include "nsISMILAttr.h" #include "nsISMILAttr.h"
#include "nsSVGElement.h" #include "nsSVGElement.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
@ -53,10 +53,8 @@ public:
bool IsExplicitlySet() const bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; } { return mIsAnimated || mIsBaseSet; }
already_AddRefed<nsIDOMSVGAnimatedInteger> already_AddRefed<mozilla::dom::SVGAnimatedInteger>
ToDOMAnimatedInteger(nsSVGElement* aSVGElement); ToDOMAnimatedInteger(nsSVGElement* aSVGElement);
nsresult ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult,
nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete // Returns a new nsISMILAttr object that the caller must delete
nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);
@ -69,30 +67,31 @@ private:
bool mIsBaseSet; bool mIsBaseSet;
public: public:
struct DOMAnimatedInteger MOZ_FINAL : public nsIDOMSVGAnimatedInteger struct DOMAnimatedInteger MOZ_FINAL : public mozilla::dom::SVGAnimatedInteger
{ {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS DOMAnimatedInteger(nsSVGInteger* aVal, nsSVGElement* aSVGElement)
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedInteger) : mozilla::dom::SVGAnimatedInteger(aSVGElement)
, mVal(aVal)
DOMAnimatedInteger(nsSVGInteger* aVal, nsSVGElement *aSVGElement) {}
: mVal(aVal), mSVGElement(aSVGElement) {}
virtual ~DOMAnimatedInteger(); virtual ~DOMAnimatedInteger();
nsSVGInteger* mVal; // kept alive because it belongs to content nsSVGInteger* mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
NS_IMETHOD GetBaseVal(int32_t* aResult) MOZ_OVERRIDE virtual int32_t BaseVal() MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; } {
NS_IMETHOD SetBaseVal(int32_t aValue) MOZ_OVERRIDE return mVal->GetBaseValue();
{ mVal->SetBaseValue(aValue, mSVGElement); return NS_OK; } }
virtual void SetBaseVal(int32_t aValue) MOZ_OVERRIDE
{
mVal->SetBaseValue(aValue, mSVGElement);
}
// Script may have modified animation parameters or timeline -- DOM getters // Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications. // need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(int32_t* aResult) MOZ_OVERRIDE virtual int32_t AnimVal() MOZ_OVERRIDE
{ {
mSVGElement->FlushAnimations(); mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue(); return mVal->GetAnimValue();
return NS_OK;
} }
}; };

View File

@ -13,19 +13,7 @@
#include "SVGIntegerPairSMILType.h" #include "SVGIntegerPairSMILType.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::dom;
NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGIntegerPair::DOMAnimatedInteger, mSVGElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGIntegerPair::DOMAnimatedInteger)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGIntegerPair::DOMAnimatedInteger)
DOMCI_DATA(SVGAnimatedIntegerPair, nsSVGIntegerPair::DOMAnimatedInteger)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGIntegerPair::DOMAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedInteger)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedInteger)
NS_INTERFACE_MAP_END
static nsSVGAttrTearoffTable<nsSVGIntegerPair, nsSVGIntegerPair::DOMAnimatedInteger> static nsSVGAttrTearoffTable<nsSVGIntegerPair, nsSVGIntegerPair::DOMAnimatedInteger>
sSVGFirstAnimatedIntegerTearoffTable; sSVGFirstAnimatedIntegerTearoffTable;
@ -168,16 +156,7 @@ nsSVGIntegerPair::SetAnimValue(const int32_t aValue[2], nsSVGElement *aSVGElemen
aSVGElement->DidAnimateIntegerPair(mAttrEnum); aSVGElement->DidAnimateIntegerPair(mAttrEnum);
} }
nsresult already_AddRefed<SVGAnimatedInteger>
nsSVGIntegerPair::ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult,
PairIndex aIndex,
nsSVGElement *aSVGElement)
{
*aResult = ToDOMAnimatedInteger(aIndex, aSVGElement).get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedInteger>
nsSVGIntegerPair::ToDOMAnimatedInteger(PairIndex aIndex, nsSVGIntegerPair::ToDOMAnimatedInteger(PairIndex aIndex,
nsSVGElement* aSVGElement) nsSVGElement* aSVGElement)
{ {

View File

@ -9,10 +9,10 @@
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
#include "nsError.h" #include "nsError.h"
#include "nsIDOMSVGAnimatedInteger.h"
#include "nsISMILAttr.h" #include "nsISMILAttr.h"
#include "nsSVGElement.h" #include "nsSVGElement.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimatedInteger.h"
class nsSMILValue; class nsSMILValue;
@ -59,10 +59,7 @@ public:
bool IsExplicitlySet() const bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; } { return mIsAnimated || mIsBaseSet; }
nsresult ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult, already_AddRefed<mozilla::dom::SVGAnimatedInteger>
PairIndex aIndex,
nsSVGElement* aSVGElement);
already_AddRefed<nsIDOMSVGAnimatedInteger>
ToDOMAnimatedInteger(PairIndex aIndex, ToDOMAnimatedInteger(PairIndex aIndex,
nsSVGElement* aSVGElement); nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete // Returns a new nsISMILAttr object that the caller must delete
@ -77,34 +74,34 @@ private:
bool mIsBaseSet; bool mIsBaseSet;
public: public:
struct DOMAnimatedInteger MOZ_FINAL : public nsIDOMSVGAnimatedInteger struct DOMAnimatedInteger MOZ_FINAL : public mozilla::dom::SVGAnimatedInteger
{ {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS DOMAnimatedInteger(nsSVGIntegerPair* aVal, PairIndex aIndex,
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedInteger) nsSVGElement* aSVGElement)
: mozilla::dom::SVGAnimatedInteger(aSVGElement)
DOMAnimatedInteger(nsSVGIntegerPair* aVal, PairIndex aIndex, nsSVGElement *aSVGElement) , mVal(aVal)
: mVal(aVal), mSVGElement(aSVGElement), mIndex(aIndex) {} , mIndex(aIndex)
{}
virtual ~DOMAnimatedInteger(); virtual ~DOMAnimatedInteger();
nsSVGIntegerPair* mVal; // kept alive because it belongs to content nsSVGIntegerPair* mVal; // kept alive because it belongs to content
nsRefPtr<nsSVGElement> mSVGElement;
PairIndex mIndex; // are we the first or second integer PairIndex mIndex; // are we the first or second integer
NS_IMETHOD GetBaseVal(int32_t* aResult) MOZ_OVERRIDE virtual int32_t BaseVal() MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(mIndex); return NS_OK; } {
NS_IMETHOD SetBaseVal(int32_t aValue) MOZ_OVERRIDE return mVal->GetBaseValue(mIndex);
{ }
mVal->SetBaseValue(aValue, mIndex, mSVGElement); virtual void SetBaseVal(int32_t aValue) MOZ_OVERRIDE
return NS_OK; {
} mVal->SetBaseValue(aValue, mIndex, mSVGElement);
}
// Script may have modified animation parameters or timeline -- DOM getters // Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications. // need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(int32_t* aResult) MOZ_OVERRIDE virtual int32_t AnimVal() MOZ_OVERRIDE
{ {
mSVGElement->FlushAnimations(); mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue(mIndex); return mVal->GetAnimValue(mIndex);
return NS_OK;
} }
}; };

View File

@ -183,7 +183,6 @@
#include "nsIDOMXPathResult.h" #include "nsIDOMXPathResult.h"
#include "nsIDOMMozBrowserFrame.h" #include "nsIDOMMozBrowserFrame.h"
#include "nsIDOMSVGAnimatedInteger.h"
#include "nsIDOMSVGAnimatedNumber.h" #include "nsIDOMSVGAnimatedNumber.h"
#include "nsIDOMSVGLength.h" #include "nsIDOMSVGLength.h"
#include "nsIDOMSVGNumber.h" #include "nsIDOMSVGNumber.h"
@ -570,8 +569,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
DOM_DEFAULT_SCRIPTABLE_FLAGS) DOM_DEFAULT_SCRIPTABLE_FLAGS)
// other SVG classes // other SVG classes
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedInteger, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedNumber, nsDOMGenericSH, NS_DEFINE_CLASSINFO_DATA(SVGAnimatedNumber, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS) DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGLength, nsDOMGenericSH, NS_DEFINE_CLASSINFO_DATA(SVGLength, nsDOMGenericSH,
@ -1508,10 +1505,6 @@ nsDOMClassInfo::Init()
// The SVG document // The SVG document
// other SVG classes // other SVG classes
DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedInteger, nsIDOMSVGAnimatedInteger)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedInteger)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedNumber, nsIDOMSVGAnimatedNumber) DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedNumber, nsIDOMSVGAnimatedNumber)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedNumber) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END

View File

@ -74,7 +74,6 @@ DOMCI_CLASS(CSSMozDocumentRule)
DOMCI_CLASS(CSSSupportsRule) DOMCI_CLASS(CSSSupportsRule)
// other SVG classes // other SVG classes
DOMCI_CLASS(SVGAnimatedInteger)
DOMCI_CLASS(SVGAnimatedNumber) DOMCI_CLASS(SVGAnimatedNumber)
DOMCI_CLASS(SVGLength) DOMCI_CLASS(SVGLength)
DOMCI_CLASS(SVGNumber) DOMCI_CLASS(SVGNumber)

View File

@ -1663,7 +1663,6 @@ addExternalIface('PrintCallback', nativeType='nsIPrintCallback',
headerFile='nsIDOMHTMLCanvasElement.h') headerFile='nsIDOMHTMLCanvasElement.h')
addExternalIface('Selection', nativeType='nsISelection') addExternalIface('Selection', nativeType='nsISelection')
addExternalIface('StyleSheetList') addExternalIface('StyleSheetList')
addExternalIface('SVGAnimatedNumber')
addExternalIface('SVGLength') addExternalIface('SVGLength')
addExternalIface('SVGNumber') addExternalIface('SVGNumber')
addExternalIface('TouchList', headerFile='nsIDOMTouchEvent.h') addExternalIface('TouchList', headerFile='nsIDOMTouchEvent.h')

View File

@ -6,7 +6,6 @@
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIDOMSVGAnimatedEnum.idl', 'nsIDOMSVGAnimatedEnum.idl',
'nsIDOMSVGAnimatedInteger.idl',
'nsIDOMSVGAnimatedNumber.idl', 'nsIDOMSVGAnimatedNumber.idl',
'nsIDOMSVGElement.idl', 'nsIDOMSVGElement.idl',
'nsIDOMSVGLength.idl', 'nsIDOMSVGLength.idl',

View File

@ -1,25 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "domstubs.idl"
/**
* The nsIDOMSVGAnimatedNumber interface is the interface to an SVG
* Animated Integer.
*
* For more information on this interface please see
* http://www.w3.org/TR/SVG11/types.html
*
*/
[scriptable, uuid(7b196db6-955e-4a9f-8f42-645ebc2ce938)]
interface nsIDOMSVGAnimatedInteger : nsISupports
{
attribute long baseVal;
// raises DOMException on setting
readonly attribute long animVal;
};

View File

@ -0,0 +1,16 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedInteger
*
* Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
* W3C liability, trademark and document use rules apply.
*/
interface SVGAnimatedInteger {
attribute long baseVal;
readonly attribute long animVal;
};

View File

@ -10,7 +10,6 @@
* liability, trademark and document use rules apply. * liability, trademark and document use rules apply.
*/ */
interface SVGAnimatedInteger;
interface SVGAnimatedNumber; interface SVGAnimatedNumber;
interface SVGFETurbulenceElement : SVGElement { interface SVGFETurbulenceElement : SVGElement {

View File

@ -10,8 +10,6 @@
* liability, trademark and document use rules apply. * liability, trademark and document use rules apply.
*/ */
interface SVGAnimatedInteger;
interface SVGFilterElement : SVGElement { interface SVGFilterElement : SVGElement {
readonly attribute SVGAnimatedEnumeration filterUnits; readonly attribute SVGAnimatedEnumeration filterUnits;
readonly attribute SVGAnimatedEnumeration primitiveUnits; readonly attribute SVGAnimatedEnumeration primitiveUnits;

View File

@ -229,6 +229,7 @@ webidl_files = \
SVGAnimatedAngle.webidl \ SVGAnimatedAngle.webidl \
SVGAnimatedBoolean.webidl \ SVGAnimatedBoolean.webidl \
SVGAnimatedEnumeration.webidl \ SVGAnimatedEnumeration.webidl \
SVGAnimatedInteger.webidl \
SVGAnimatedLength.webidl \ SVGAnimatedLength.webidl \
SVGAnimatedLengthList.webidl \ SVGAnimatedLengthList.webidl \
SVGAnimatedNumberList.webidl \ SVGAnimatedNumberList.webidl \