Bug 1062106 part 4 - Remove GetTargetAttributeType() from svg element. r?birtles
MozReview-Commit-ID: L6UDAJUGnlx
--- a/dom/svg/SVGAnimateMotionElement.cpp
+++ b/dom/svg/SVGAnimateMotionElement.cpp
@@ -46,20 +46,11 @@ SVGAnimateMotionElement::GetTargetAttrib
// <animateMotion> doesn't take an attributeName, since it doesn't target an
// 'attribute' per se. We'll use a unique dummy attribute-name so that our
// nsSMILTargetIdentifier logic (which requires a attribute name) still works.
*aNamespaceID = kNameSpaceID_None;
*aLocalName = nsGkAtoms::mozAnimateMotionDummyAttr;
return true;
}
-nsSMILTargetAttrType
-SVGAnimateMotionElement::GetTargetAttributeType() const
-{
- // <animateMotion> doesn't take an attributeType, since it doesn't target an
- // 'attribute' per se. We'll just return 'XML' for simplicity. (This just
- // needs to match what we expect in nsSVGElement::GetAnimAttr.)
- return eSMILTargetAttrType_XML;
-}
-
} // namespace dom
} // namespace mozilla
--- a/dom/svg/SVGAnimateMotionElement.h
+++ b/dom/svg/SVGAnimateMotionElement.h
@@ -32,17 +32,16 @@ protected:
public:
// nsIDOMNode specializations
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction() override;
virtual bool GetTargetAttributeName(int32_t *aNamespaceID,
nsIAtom **aLocalName) const override;
- virtual nsSMILTargetAttrType GetTargetAttributeType() const override;
// nsSVGElement
virtual nsIAtom* GetPathDataAttrName() const override {
return nsGkAtoms::path;
}
// Utility method to let our <mpath> children tell us when they've changed,
// so we can make sure our mAnimationFunction is marked as having changed.
--- a/dom/svg/SVGAnimationElement.cpp
+++ b/dom/svg/SVGAnimationElement.cpp
@@ -107,31 +107,16 @@ SVGAnimationElement::GetTargetAttributeN
NS_ASSERTION(nameAttr->Type() == nsAttrValue::eAtom,
"attributeName should have been parsed as an atom");
return NS_SUCCEEDED(nsContentUtils::SplitQName(
this, nsDependentAtomString(nameAttr->GetAtomValue()),
aNamespaceID, aLocalName));
}
-nsSMILTargetAttrType
-SVGAnimationElement::GetTargetAttributeType() const
-{
- nsIContent::AttrValuesArray typeValues[] = { &nsGkAtoms::css,
- &nsGkAtoms::XML,
- nullptr};
- nsSMILTargetAttrType smilTypes[] = { eSMILTargetAttrType_CSS,
- eSMILTargetAttrType_XML };
- int32_t index = FindAttrValueIn(kNameSpaceID_None,
- nsGkAtoms::attributeType,
- typeValues,
- eCaseMatters);
- return (index >= 0) ? smilTypes[index] : eSMILTargetAttrType_auto;
-}
-
nsSMILTimedElement&
SVGAnimationElement::TimedElement()
{
return mTimedElement;
}
nsSVGElement*
SVGAnimationElement::GetTargetElement()
--- a/dom/svg/SVGAnimationElement.h
+++ b/dom/svg/SVGAnimationElement.h
@@ -61,17 +61,16 @@ public:
const nsAttrValue* aValue, bool aNotify) override;
const nsAttrValue* GetAnimAttr(nsIAtom* aName) const;
bool GetAnimAttr(nsIAtom* aAttName, nsAString& aResult) const;
bool HasAnimAttr(nsIAtom* aAttName) const;
Element* GetTargetElementContent();
virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
nsIAtom** aLocalName) const;
- virtual nsSMILTargetAttrType GetTargetAttributeType() const;
nsSMILTimedElement& TimedElement();
nsSMILTimeContainer* GetTimeContainer();
virtual nsSMILAnimationFunction& AnimationFunction() = 0;
virtual bool IsEventAttributeName(nsIAtom* aName) override;
// Utility methods for within SVG
void ActivateByHyperlink();