| 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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (isSVGSetElement(*this)) | 87 if (isSVGSetElement(*this)) |
| 88 percentage = 1; | 88 percentage = 1; |
| 89 | 89 |
| 90 if (calcMode() == CalcModeDiscrete) | 90 if (calcMode() == CalcModeDiscrete) |
| 91 percentage = percentage < 0.5 ? 0 : 1; | 91 percentage = percentage < 0.5 ? 0 : 1; |
| 92 | 92 |
| 93 // Target element might have changed. | 93 // Target element might have changed. |
| 94 m_animator->setContextElement(targetElement); | 94 m_animator->setContextElement(targetElement); |
| 95 | 95 |
| 96 // Values-animation accumulates using the last values entry corresponding to
the end of duration time. | 96 // Values-animation accumulates using the last values entry corresponding to
the end of duration time. |
| 97 NewSVGPropertyBase* toAtEndOfDurationProperty = m_toAtEndOfDurationProperty
? m_toAtEndOfDurationProperty.get() : m_toProperty.get(); | 97 SVGPropertyBase* toAtEndOfDurationProperty = m_toAtEndOfDurationProperty ? m
_toAtEndOfDurationProperty.get() : m_toProperty.get(); |
| 98 m_animator->calculateAnimatedValue(percentage, repeatCount, m_fromProperty.g
et(), m_toProperty.get(), toAtEndOfDurationProperty, resultAnimationElement->m_a
nimatedProperty.get()); | 98 m_animator->calculateAnimatedValue(percentage, repeatCount, m_fromProperty.g
et(), m_toProperty.get(), toAtEndOfDurationProperty, resultAnimationElement->m_a
nimatedProperty.get()); |
| 99 } | 99 } |
| 100 | 100 |
| 101 bool SVGAnimateElement::calculateToAtEndOfDurationValue(const String& toAtEndOfD
urationString) | 101 bool SVGAnimateElement::calculateToAtEndOfDurationValue(const String& toAtEndOfD
urationString) |
| 102 { | 102 { |
| 103 if (toAtEndOfDurationString.isEmpty()) | 103 if (toAtEndOfDurationString.isEmpty()) |
| 104 return false; | 104 return false; |
| 105 m_toAtEndOfDurationProperty = ensureAnimator()->constructFromString(toAtEndO
fDurationString); | 105 m_toAtEndOfDurationProperty = ensureAnimator()->constructFromString(toAtEndO
fDurationString); |
| 106 return true; | 106 return true; |
| 107 } | 107 } |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 392 |
| 393 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() | 393 SVGAnimatedTypeAnimator* SVGAnimateElement::ensureAnimator() |
| 394 { | 394 { |
| 395 if (!m_animator) | 395 if (!m_animator) |
| 396 m_animator = SVGAnimatedTypeAnimator::create(m_animatedPropertyType, thi
s, targetElement()); | 396 m_animator = SVGAnimatedTypeAnimator::create(m_animatedPropertyType, thi
s, targetElement()); |
| 397 ASSERT(m_animatedPropertyType == m_animator->type()); | 397 ASSERT(m_animatedPropertyType == m_animator->type()); |
| 398 return m_animator.get(); | 398 return m_animator.get(); |
| 399 } | 399 } |
| 400 | 400 |
| 401 } | 401 } |
| OLD | NEW |