diff --git a/content/smil/nsSMILAnimationFunction.cpp b/content/smil/nsSMILAnimationFunction.cpp index bcb43689c049..da0ba8a438ae 100644 --- a/content/smil/nsSMILAnimationFunction.cpp +++ b/content/smil/nsSMILAnimationFunction.cpp @@ -464,8 +464,9 @@ nsSMILAnimationFunction::InterpolateResult(const nsSMILValueArray& aValues, // spec says to force discrete mode. if (GetCalcMode() == CALC_DISCRETE || NS_FAILED(rv)) { if (IsToAnimation()) { - // Two discrete values: our base value, and the val in our array - aResult = (simpleProgress < 0.5f) ? aBaseValue : aValues[0]; + // SMIL 3, 12.6.4: Since a to animation has only 1 value, a discrete to + // animation will simply set the to value for the simple duration. + aResult = aValues[0]; } else { PRUint32 index = (PRUint32) floor(simpleProgress * (aValues.Length())); aResult = aValues[index]; diff --git a/layout/reftests/svg/smil/anim-discrete-to-1.svg b/layout/reftests/svg/smil/anim-discrete-to-1.svg index 41a078764c33..29f8b34a9477 100644 --- a/layout/reftests/svg/smil/anim-discrete-to-1.svg +++ b/layout/reftests/svg/smil/anim-discrete-to-1.svg @@ -3,8 +3,8 @@ class="reftest-wait" onload="setTimeAndSnapshot(0.0, true)">