本文整理汇总了C++中nsSVGAttrTearoffTable类的典型用法代码示例。如果您正苦于以下问题:C++ nsSVGAttrTearoffTable类的具体用法?C++ nsSVGAttrTearoffTable怎么用?C++ nsSVGAttrTearoffTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了nsSVGAttrTearoffTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
nsSVGNumberPair::DOMAnimatedNumber::~DOMAnimatedNumber()
{
if (mIndex == eFirst) {
sSVGFirstAnimatedNumberTearoffTable.RemoveTearoff(mVal);
} else {
sSVGSecondAnimatedNumberTearoffTable.RemoveTearoff(mVal);
}
}
示例2: if
SVGAngle::~SVGAngle()
{
if (mType == BaseValue) {
sBaseSVGAngleTearoffTable.RemoveTearoff(mVal);
} else if (mType == AnimValue) {
sAnimSVGAngleTearoffTable.RemoveTearoff(mVal);
} else {
delete mVal;
}
}
示例3: SVGAngle
already_AddRefed<SVGAngle>
nsSVGAngle::ToDOMBaseVal(nsSVGElement *aSVGElement)
{
nsRefPtr<SVGAngle> domBaseVal =
sBaseSVGAngleTearoffTable.GetTearoff(this);
if (!domBaseVal) {
domBaseVal = new SVGAngle(this, aSVGElement, SVGAngle::BaseValue);
sBaseSVGAngleTearoffTable.AddTearoff(this, domBaseVal);
}
return domBaseVal.forget();
}
示例4: DOMAnimatedNumber
already_AddRefed<SVGAnimatedNumber>
nsSVGNumber2::ToDOMAnimatedNumber(nsSVGElement* aSVGElement)
{
nsRefPtr<DOMAnimatedNumber> domAnimatedNumber =
sSVGAnimatedNumberTearoffTable.GetTearoff(this);
if (!domAnimatedNumber) {
domAnimatedNumber = new DOMAnimatedNumber(this, aSVGElement);
sSVGAnimatedNumberTearoffTable.AddTearoff(this, domAnimatedNumber);
}
return domAnimatedNumber.forget();
}
示例5: SVGAnimatedLength
already_AddRefed<SVGAnimatedLength>
nsSVGLength2::ToDOMAnimatedLength(nsSVGElement* aSVGElement)
{
nsRefPtr<SVGAnimatedLength> svgAnimatedLength =
sSVGAnimatedLengthTearoffTable.GetTearoff(this);
if (!svgAnimatedLength) {
svgAnimatedLength = new SVGAnimatedLength(this, aSVGElement);
sSVGAnimatedLengthTearoffTable.AddTearoff(this, svgAnimatedLength);
}
return svgAnimatedLength.forget();
}
示例6: SVGAngle
already_AddRefed<SVGAngle>
nsSVGAngle::ToDOMAnimVal(nsSVGElement *aSVGElement)
{
RefPtr<SVGAngle> domAnimVal =
sAnimSVGAngleTearoffTable.GetTearoff(this);
if (!domAnimVal) {
domAnimVal = new SVGAngle(this, aSVGElement, SVGAngle::AnimValue);
sAnimSVGAngleTearoffTable.AddTearoff(this, domAnimVal);
}
return domAnimVal.forget();
}
示例7: SVGAnimatedAngle
already_AddRefed<SVGAnimatedAngle>
nsSVGAngle::ToDOMAnimatedAngle(nsSVGElement *aSVGElement)
{
RefPtr<SVGAnimatedAngle> domAnimatedAngle =
sSVGAnimatedAngleTearoffTable.GetTearoff(this);
if (!domAnimatedAngle) {
domAnimatedAngle = new SVGAnimatedAngle(this, aSVGElement);
sSVGAnimatedAngleTearoffTable.AddTearoff(this, domAnimatedAngle);
}
return domAnimatedAngle.forget();
}
示例8: DOMAnimatedLength
already_AddRefed<nsIDOMSVGAnimatedLength>
nsSVGLength2::ToDOMAnimatedLength(nsSVGElement* aSVGElement)
{
nsRefPtr<DOMAnimatedLength> domAnimatedLength =
sSVGAnimatedLengthTearoffTable.GetTearoff(this);
if (!domAnimatedLength) {
domAnimatedLength = new DOMAnimatedLength(this, aSVGElement);
sSVGAnimatedLengthTearoffTable.AddTearoff(this, domAnimatedLength);
}
return domAnimatedLength.forget();
}
示例9: DOMBaseVal
nsresult
nsSVGViewBox::ToDOMBaseVal(nsIDOMSVGRect **aResult, nsSVGElement *aSVGElement)
{
nsRefPtr<DOMBaseVal> domBaseVal =
sBaseSVGViewBoxTearoffTable.GetTearoff(this);
if (!domBaseVal) {
domBaseVal = new DOMBaseVal(this, aSVGElement);
sBaseSVGViewBoxTearoffTable.AddTearoff(this, domBaseVal);
}
domBaseVal.forget(aResult);
return NS_OK;
}
示例10: DOMAnimVal
nsresult
nsSVGLength2::ToDOMAnimVal(nsIDOMSVGLength **aResult, nsSVGElement *aSVGElement)
{
nsRefPtr<DOMAnimVal> domAnimVal =
sAnimSVGLengthTearoffTable.GetTearoff(this);
if (!domAnimVal) {
domAnimVal = new DOMAnimVal(this, aSVGElement);
sAnimSVGLengthTearoffTable.AddTearoff(this, domAnimVal);
}
domAnimVal.forget(aResult);
return NS_OK;
}
示例11: DOMAnimatedLength
nsresult
nsSVGLength2::ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
nsSVGElement *aSVGElement)
{
nsRefPtr<DOMAnimatedLength> domAnimatedLength =
sSVGAnimatedLengthTearoffTable.GetTearoff(this);
if (!domAnimatedLength) {
domAnimatedLength = new DOMAnimatedLength(this, aSVGElement);
sSVGAnimatedLengthTearoffTable.AddTearoff(this, domAnimatedLength);
}
domAnimatedLength.forget(aResult);
return NS_OK;
}
示例12:
nsresult
nsSVGLength2::ToDOMAnimVal(nsIDOMSVGLength **aResult, nsSVGElement *aSVGElement)
{
*aResult = sAnimSVGLengthTearoffTable.GetTearoff(this);
if (!*aResult) {
*aResult = new DOMAnimVal(this, aSVGElement);
if (!*aResult)
return NS_ERROR_OUT_OF_MEMORY;
sAnimSVGLengthTearoffTable.AddTearoff(this, *aResult);
}
NS_ADDREF(*aResult);
return NS_OK;
}
示例13: DOMAnimVal
already_AddRefed<dom::SVGIRect>
nsSVGViewBox::ToDOMAnimVal(nsSVGElement *aSVGElement)
{
if ((mAnimVal && mAnimVal->none) ||
(!mAnimVal && (!mHasBaseVal || mBaseVal.none))) {
return nullptr;
}
RefPtr<DOMAnimVal> domAnimVal =
sAnimSVGViewBoxTearoffTable.GetTearoff(this);
if (!domAnimVal) {
domAnimVal = new DOMAnimVal(this, aSVGElement);
sAnimSVGViewBoxTearoffTable.AddTearoff(this, domAnimVal);
}
return domAnimVal.forget();
}
示例14: DOMAnimatedNumber
already_AddRefed<SVGAnimatedNumber>
nsSVGNumberPair::ToDOMAnimatedNumber(PairIndex aIndex,
nsSVGElement* aSVGElement)
{
nsRefPtr<DOMAnimatedNumber> domAnimatedNumber =
aIndex == eFirst ? sSVGFirstAnimatedNumberTearoffTable.GetTearoff(this) :
sSVGSecondAnimatedNumberTearoffTable.GetTearoff(this);
if (!domAnimatedNumber) {
domAnimatedNumber = new DOMAnimatedNumber(this, aIndex, aSVGElement);
if (aIndex == eFirst) {
sSVGFirstAnimatedNumberTearoffTable.AddTearoff(this, domAnimatedNumber);
} else {
sSVGSecondAnimatedNumberTearoffTable.AddTearoff(this, domAnimatedNumber);
}
}
return domAnimatedNumber.forget();
}
示例15: DOMAnimVal
nsresult
nsSVGViewBox::ToDOMAnimVal(dom::SVGIRect **aResult,
nsSVGElement *aSVGElement)
{
if ((mAnimVal && mAnimVal->none) ||
(!mAnimVal && (!mHasBaseVal || mBaseVal.none))) {
*aResult = nullptr;
return NS_OK;
}
nsRefPtr<DOMAnimVal> domAnimVal =
sAnimSVGViewBoxTearoffTable.GetTearoff(this);
if (!domAnimVal) {
domAnimVal = new DOMAnimVal(this, aSVGElement);
sAnimSVGViewBoxTearoffTable.AddTearoff(this, domAnimVal);
}
domAnimVal.forget(aResult);
return NS_OK;
}