nsresult nsSMILAnimationFunction::AccumulateResult(const nsSMILValueArray& aValues, nsSMILValue& aResult) { if (!IsToAnimation() && GetAccumulate() && mRepeatIteration) { const nsSMILValue& lastValue = aValues[aValues.Length() - 1]; // If the target attribute type doesn't support addition, Add will // fail and we leave aResult untouched. aResult.Add(lastValue, mRepeatIteration); } return NS_OK; }