Bug 758505, Part 1: Avoid unnecessary invalidations on repeated calls to set the same animated value (nsSVGLength2 part). r=dholbert

This commit is contained in:
Matt Woodrow 2012-06-01 16:52:15 -07:00
parent f1803c5e39
commit 714c391777

View File

@ -460,6 +460,9 @@ void
nsSVGLength2::SetAnimValueInSpecifiedUnits(float aValue,
nsSVGElement* aSVGElement)
{
if (mAnimVal == aValue && mIsAnimated) {
return;
}
mAnimVal = aValue;
mIsAnimated = true;
aSVGElement->DidAnimateLength(mAttrEnum);