Bug 1062106 part 4 - Remove GetTargetAttributeType() from svg element. r=birtles
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Tue, 21 Mar 2017 15:45:58 +0900
changeset 349061 d307e9e3d791c9a6f240629daf8959d213951521
parent 349060 b63a6a20dea64b4c11df13cb1c4b9e125c770196
child 349062 5e304691d84bb0caab48ac16a229309592f1be3a
push id31541
push usercbook@mozilla.com
push dateThu, 23 Mar 2017 12:43:04 +0000
treeherdermozilla-central@89b93d310da5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1062106
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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();