Bug 1062106 part 4 - Remove GetTargetAttributeType() from svg element. r?birtles draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Tue, 21 Mar 2017 15:45:58 +0900
changeset 503389 f79a4df402d578a3f1dd9430402f84114a03f0b8
parent 503388 1bf8d2fdea14cc37c8eba70689eb217068daaaee
child 550413 523d86e842c09eeb523c70a595ab7e531dfdad33
push id50563
push userbmo:mantaroh@gmail.com
push dateThu, 23 Mar 2017 05:52:17 +0000
reviewersbirtles
bugs1062106
milestone55.0a1
Bug 1062106 part 4 - Remove GetTargetAttributeType() from svg element. r?birtles MozReview-Commit-ID: L6UDAJUGnlx
dom/svg/SVGAnimateMotionElement.cpp
dom/svg/SVGAnimateMotionElement.h
dom/svg/SVGAnimationElement.cpp
dom/svg/SVGAnimationElement.h
--- 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();