| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 | 511 |
| 512 if (calcMode == CalcModeSpline) { | 512 if (calcMode == CalcModeSpline) { |
| 513 ASSERT(m_keySplines.size() == m_values.size() - 1); | 513 ASSERT(m_keySplines.size() == m_values.size() - 1); |
| 514 effectivePercent = calculatePercentForSpline(effectivePercent, index); | 514 effectivePercent = calculatePercentForSpline(effectivePercent, index); |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 | 517 |
| 518 void SVGAnimationElement::startedActiveInterval() { | 518 void SVGAnimationElement::startedActiveInterval() { |
| 519 m_animationValid = false; | 519 m_animationValid = false; |
| 520 | 520 |
| 521 if (!isValid()) | 521 if (!isValid() || !hasValidTarget()) |
| 522 return; | |
| 523 if (!targetElement()) | |
| 524 return; | |
| 525 if (!hasValidAttributeType()) | |
| 526 return; | 522 return; |
| 527 | 523 |
| 528 // These validations are appropriate for all animation modes. | 524 // These validations are appropriate for all animation modes. |
| 529 if (fastHasAttribute(SVGNames::keyPointsAttr) && | 525 if (fastHasAttribute(SVGNames::keyPointsAttr) && |
| 530 m_keyPoints.size() != m_keyTimes.size()) | 526 m_keyPoints.size() != m_keyTimes.size()) |
| 531 return; | 527 return; |
| 532 | 528 |
| 533 AnimationMode animationMode = this->getAnimationMode(); | 529 AnimationMode animationMode = this->getAnimationMode(); |
| 534 CalcMode calcMode = this->getCalcMode(); | 530 CalcMode calcMode = this->getCalcMode(); |
| 535 if (calcMode == CalcModeSpline) { | 531 if (calcMode == CalcModeSpline) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 calculatePercentForSpline(percent, calculateKeyTimesIndex(percent)); | 618 calculatePercentForSpline(percent, calculateKeyTimesIndex(percent)); |
| 623 else if (animationMode == FromToAnimation || animationMode == ToAnimation) | 619 else if (animationMode == FromToAnimation || animationMode == ToAnimation) |
| 624 effectivePercent = calculatePercentForFromTo(percent); | 620 effectivePercent = calculatePercentForFromTo(percent); |
| 625 else | 621 else |
| 626 effectivePercent = percent; | 622 effectivePercent = percent; |
| 627 | 623 |
| 628 calculateAnimatedValue(effectivePercent, repeatCount, resultElement); | 624 calculateAnimatedValue(effectivePercent, repeatCount, resultElement); |
| 629 } | 625 } |
| 630 | 626 |
| 631 } // namespace blink | 627 } // namespace blink |
| OLD | NEW |