зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1450643 part 2 - remove SVGAnimationElement wrappers around GetAttr/HasAttr in favour of directly using the Element versions. r=dholbert
This commit is contained in:
Родитель
46e051dd40
Коммит
307a272379
|
@ -707,19 +707,19 @@ nsSMILAnimationFunction::ScaleIntervalProgress(double aProgress,
|
|||
bool
|
||||
nsSMILAnimationFunction::HasAttr(nsAtom* aAttName) const
|
||||
{
|
||||
return mAnimationElement->HasAnimAttr(aAttName);
|
||||
return mAnimationElement->HasAttr(aAttName);
|
||||
}
|
||||
|
||||
const nsAttrValue*
|
||||
nsSMILAnimationFunction::GetAttr(nsAtom* aAttName) const
|
||||
{
|
||||
return mAnimationElement->GetAnimAttr(aAttName);
|
||||
return mAnimationElement->GetParsedAttr(aAttName);
|
||||
}
|
||||
|
||||
bool
|
||||
nsSMILAnimationFunction::GetAttr(nsAtom* aAttName, nsAString& aResult) const
|
||||
{
|
||||
return mAnimationElement->GetAnimAttr(aAttName, aResult);
|
||||
return mAnimationElement->GetAttr(aAttName, aResult);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1480,15 +1480,15 @@ nsSMILTimedElement::RebuildTimingState(RemovalTestFunction aRemove)
|
|||
MOZ_ASSERT(mElementState == STATE_STARTUP,
|
||||
"Rebuilding timing state from non-startup state");
|
||||
|
||||
if (mAnimationElement->HasAnimAttr(nsGkAtoms::begin)) {
|
||||
if (mAnimationElement->HasAttr(nsGkAtoms::begin)) {
|
||||
nsAutoString attValue;
|
||||
mAnimationElement->GetAnimAttr(nsGkAtoms::begin, attValue);
|
||||
mAnimationElement->GetAttr(nsGkAtoms::begin, attValue);
|
||||
SetBeginSpec(attValue, mAnimationElement, aRemove);
|
||||
}
|
||||
|
||||
if (mAnimationElement->HasAnimAttr(nsGkAtoms::end)) {
|
||||
if (mAnimationElement->HasAttr(nsGkAtoms::end)) {
|
||||
nsAutoString attValue;
|
||||
mAnimationElement->GetAnimAttr(nsGkAtoms::end, attValue);
|
||||
mAnimationElement->GetAttr(nsGkAtoms::end, attValue);
|
||||
SetEndSpec(attValue, mAnimationElement, aRemove);
|
||||
}
|
||||
|
||||
|
@ -1738,7 +1738,7 @@ nsSMILTimedElement::GetNextInterval(const nsSMILInterval* aPrevInterval,
|
|||
// our ref-counting is not const-correct
|
||||
tempBegin = const_cast<nsSMILInstanceTime*>(aFixedBeginTime);
|
||||
} else if ((!mAnimationElement ||
|
||||
!mAnimationElement->HasAnimAttr(nsGkAtoms::begin)) &&
|
||||
!mAnimationElement->HasAttr(nsGkAtoms::begin)) &&
|
||||
beginAfter <= zeroTime) {
|
||||
tempBegin = new nsSMILInstanceTime(nsSMILTimeValue(0));
|
||||
} else {
|
||||
|
|
|
@ -59,25 +59,6 @@ SVGAnimationElement::Init()
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const nsAttrValue*
|
||||
SVGAnimationElement::GetAnimAttr(nsAtom* aName) const
|
||||
{
|
||||
return mAttrsAndChildren.GetAttr(aName, kNameSpaceID_None);
|
||||
}
|
||||
|
||||
bool
|
||||
SVGAnimationElement::GetAnimAttr(nsAtom* aAttName,
|
||||
nsAString& aResult) const
|
||||
{
|
||||
return GetAttr(kNameSpaceID_None, aAttName, aResult);
|
||||
}
|
||||
|
||||
bool
|
||||
SVGAnimationElement::HasAnimAttr(nsAtom* aAttName) const
|
||||
{
|
||||
return HasAttr(kNameSpaceID_None, aAttName);
|
||||
}
|
||||
|
||||
Element*
|
||||
SVGAnimationElement::GetTargetElementContent()
|
||||
{
|
||||
|
|
|
@ -62,9 +62,6 @@ public:
|
|||
nsIPrincipal* aSubjectPrincipal,
|
||||
bool aNotify) override;
|
||||
|
||||
const nsAttrValue* GetAnimAttr(nsAtom* aName) const;
|
||||
bool GetAnimAttr(nsAtom* aAttName, nsAString& aResult) const;
|
||||
bool HasAnimAttr(nsAtom* aAttName) const;
|
||||
Element* GetTargetElementContent();
|
||||
virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
|
||||
nsAtom** aLocalName) const;
|
||||
|
|
|
@ -189,7 +189,7 @@ nsSVGAnimatedTransformList::SMILAnimatedTransformList::ValueFromString(
|
|||
MOZ_ASSERT(aValue.IsNull(),
|
||||
"aValue should have been cleared before calling ValueFromString");
|
||||
|
||||
const nsAttrValue* typeAttr = aSrcElement->GetAnimAttr(nsGkAtoms::type);
|
||||
const nsAttrValue* typeAttr = aSrcElement->GetParsedAttr(nsGkAtoms::type);
|
||||
const nsAtom* transformType = nsGkAtoms::translate; // default val
|
||||
if (typeAttr) {
|
||||
if (typeAttr->Type() != nsAttrValue::eAtom) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче