Bug 974710 - Stop incorrectly reporting errors with values attribute on the animateMotion element. r=dholbert
authorRobert Longson <longsonr@gmail.com>
Wed, 16 Apr 2014 16:24:22 +0100
changeset 179230 32df543ab3c6a035d8b3a2e4cb03751d1173f275
parent 179229 58b82c1143fb6886ea5258bb83b9f491d773fa14
child 179231 7cfba1345851d9f3b2810e3cc54e134a3ba9e39a
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersdholbert
bugs974710
milestone31.0a1
Bug 974710 - Stop incorrectly reporting errors with values attribute on the animateMotion element. r=dholbert
content/svg/content/src/SVGMotionSMILAnimationFunction.cpp
--- a/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp
+++ b/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp
@@ -65,27 +65,26 @@ SVGMotionSMILAnimationFunction::SetAttr(
     if (aParseResult) {
       *aParseResult = rv;
     }
   } else if (aAttribute == nsGkAtoms::rotate) {
     nsresult rv = SetRotate(aValue, aResult);
     if (aParseResult) {
       *aParseResult = rv;
     }
-  } else if (aAttribute == nsGkAtoms::path) {
+  } else if (aAttribute == nsGkAtoms::path ||
+             aAttribute == nsGkAtoms::by ||
+             aAttribute == nsGkAtoms::from ||
+             aAttribute == nsGkAtoms::to ||
+             aAttribute == nsGkAtoms::values) {
     aResult.SetTo(aValue);
+    MarkStaleIfAttributeAffectsPath(aAttribute);
     if (aParseResult) {
       *aParseResult = NS_OK;
     }
-    MarkStaleIfAttributeAffectsPath(aAttribute);
-  } else if (aAttribute == nsGkAtoms::by ||
-             aAttribute == nsGkAtoms::from ||
-             aAttribute == nsGkAtoms::to ||
-             aAttribute == nsGkAtoms::values) {
-    MarkStaleIfAttributeAffectsPath(aAttribute);
   } else {
     // Defer to superclass method
     return nsSMILAnimationFunction::SetAttr(aAttribute, aValue,
                                             aResult, aParseResult);
   }
 
   return true;
 }