| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 if (percent == 1 || valuesCount == 1) { | 460 if (percent == 1 || valuesCount == 1) { |
| 461 from = m_values[valuesCount - 1]; | 461 from = m_values[valuesCount - 1]; |
| 462 to = m_values[valuesCount - 1]; | 462 to = m_values[valuesCount - 1]; |
| 463 effectivePercent = 1; | 463 effectivePercent = 1; |
| 464 return; | 464 return; |
| 465 } | 465 } |
| 466 | 466 |
| 467 CalcMode calcMode = this->getCalcMode(); | 467 CalcMode calcMode = this->getCalcMode(); |
| 468 if (isSVGAnimateElement(*this)) { | 468 if (isSVGAnimateElement(*this)) { |
| 469 SVGAnimateElement& animateElement = toSVGAnimateElement(*this); | 469 SVGAnimateElement& animateElement = toSVGAnimateElement(*this); |
| 470 if (!animateElement.animatedPropertyTypeSupportsAddition()) { | 470 if (!animateElement.animatedPropertyTypeSupportsAddition()) |
| 471 ASSERT(animateElement.animatedPropertyType() != AnimatedTransformList || | |
| 472 isSVGAnimateTransformElement(*this)); | |
| 473 ASSERT(animateElement.animatedPropertyType() != AnimatedUnknown); | |
| 474 calcMode = CalcModeDiscrete; | 471 calcMode = CalcModeDiscrete; |
| 475 } | |
| 476 } | 472 } |
| 477 if (!m_keyPoints.isEmpty() && calcMode != CalcModePaced) | 473 if (!m_keyPoints.isEmpty() && calcMode != CalcModePaced) |
| 478 return currentValuesFromKeyPoints(percent, effectivePercent, from, to); | 474 return currentValuesFromKeyPoints(percent, effectivePercent, from, to); |
| 479 | 475 |
| 480 unsigned keyTimesCount = m_keyTimes.size(); | 476 unsigned keyTimesCount = m_keyTimes.size(); |
| 481 ASSERT(!keyTimesCount || valuesCount == keyTimesCount); | 477 ASSERT(!keyTimesCount || valuesCount == keyTimesCount); |
| 482 ASSERT(!keyTimesCount || (keyTimesCount > 1 && !m_keyTimes[0])); | 478 ASSERT(!keyTimesCount || (keyTimesCount > 1 && !m_keyTimes[0])); |
| 483 | 479 |
| 484 unsigned index = calculateKeyTimesIndex(percent); | 480 unsigned index = calculateKeyTimesIndex(percent); |
| 485 if (calcMode == CalcModeDiscrete) { | 481 if (calcMode == CalcModeDiscrete) { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 calculatePercentForSpline(percent, calculateKeyTimesIndex(percent)); | 614 calculatePercentForSpline(percent, calculateKeyTimesIndex(percent)); |
| 619 else if (animationMode == FromToAnimation || animationMode == ToAnimation) | 615 else if (animationMode == FromToAnimation || animationMode == ToAnimation) |
| 620 effectivePercent = calculatePercentForFromTo(percent); | 616 effectivePercent = calculatePercentForFromTo(percent); |
| 621 else | 617 else |
| 622 effectivePercent = percent; | 618 effectivePercent = percent; |
| 623 | 619 |
| 624 calculateAnimatedValue(effectivePercent, repeatCount, resultElement); | 620 calculateAnimatedValue(effectivePercent, repeatCount, resultElement); |
| 625 } | 621 } |
| 626 | 622 |
| 627 } // namespace blink | 623 } // namespace blink |
| OLD | NEW |