| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 setValue(m_value + toSVGInteger(other)->value()); | 61 setValue(m_value + toSVGInteger(other)->value()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void SVGInteger::calculateAnimatedValue(SVGAnimationElement* animationElement, | 64 void SVGInteger::calculateAnimatedValue(SVGAnimationElement* animationElement, |
| 65 float percentage, | 65 float percentage, |
| 66 unsigned repeatCount, | 66 unsigned repeatCount, |
| 67 SVGPropertyBase* from, | 67 SVGPropertyBase* from, |
| 68 SVGPropertyBase* to, | 68 SVGPropertyBase* to, |
| 69 SVGPropertyBase* toAtEndOfDuration, | 69 SVGPropertyBase* toAtEndOfDuration, |
| 70 SVGElement*) { | 70 SVGElement*) { |
| 71 ASSERT(animationElement); | 71 DCHECK(animationElement); |
| 72 | 72 |
| 73 SVGInteger* fromInteger = toSVGInteger(from); | 73 SVGInteger* fromInteger = toSVGInteger(from); |
| 74 SVGInteger* toInteger = toSVGInteger(to); | 74 SVGInteger* toInteger = toSVGInteger(to); |
| 75 SVGInteger* toAtEndOfDurationInteger = toSVGInteger(toAtEndOfDuration); | 75 SVGInteger* toAtEndOfDurationInteger = toSVGInteger(toAtEndOfDuration); |
| 76 | 76 |
| 77 float animatedFloat = m_value; | 77 float animatedFloat = m_value; |
| 78 animationElement->animateAdditiveNumber( | 78 animationElement->animateAdditiveNumber( |
| 79 percentage, repeatCount, fromInteger->value(), toInteger->value(), | 79 percentage, repeatCount, fromInteger->value(), toInteger->value(), |
| 80 toAtEndOfDurationInteger->value(), animatedFloat); | 80 toAtEndOfDurationInteger->value(), animatedFloat); |
| 81 m_value = static_cast<int>(roundf(animatedFloat)); | 81 m_value = static_cast<int>(roundf(animatedFloat)); |
| 82 } | 82 } |
| 83 | 83 |
| 84 float SVGInteger::calculateDistance(SVGPropertyBase* other, SVGElement*) { | 84 float SVGInteger::calculateDistance(SVGPropertyBase* other, SVGElement*) { |
| 85 return abs(m_value - toSVGInteger(other)->value()); | 85 return abs(m_value - toSVGInteger(other)->value()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |