OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 15 matching lines...) Expand all Loading... |
26 SVGAnimatedNumberOptionalNumber::SVGAnimatedNumberOptionalNumber(SVGElement* con
textElement, const QualifiedName& attributeName, float initialFirstValue, float
initialSecondValue) | 26 SVGAnimatedNumberOptionalNumber::SVGAnimatedNumberOptionalNumber(SVGElement* con
textElement, const QualifiedName& attributeName, float initialFirstValue, float
initialSecondValue) |
27 : SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>(contextElement, attribu
teName, | 27 : SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>(contextElement, attribu
teName, |
28 SVGNumberOptionalNumber::create(SVGNumber::create(initialFirstValue), SV
GNumber::create(initialSecondValue))) | 28 SVGNumberOptionalNumber::create(SVGNumber::create(initialFirstValue), SV
GNumber::create(initialSecondValue))) |
29 , m_firstNumber(SVGAnimatedNumber::create(contextElement, attributeName, bas
eValue()->firstNumber())) | 29 , m_firstNumber(SVGAnimatedNumber::create(contextElement, attributeName, bas
eValue()->firstNumber())) |
30 , m_secondNumber(SVGAnimatedNumber::create(contextElement, attributeName, ba
seValue()->secondNumber())) | 30 , m_secondNumber(SVGAnimatedNumber::create(contextElement, attributeName, ba
seValue()->secondNumber())) |
31 { | 31 { |
32 m_firstNumber->setParentOptionalNumber(this); | 32 m_firstNumber->setParentOptionalNumber(this); |
33 m_secondNumber->setParentOptionalNumber(this); | 33 m_secondNumber->setParentOptionalNumber(this); |
34 } | 34 } |
35 | 35 |
36 void SVGAnimatedNumberOptionalNumber::animationStarted() | |
37 { | |
38 SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::animationStarted(); | |
39 m_firstNumber->animationStarted(); | |
40 m_secondNumber->animationStarted(); | |
41 } | |
42 | |
43 void SVGAnimatedNumberOptionalNumber::setAnimatedValue(PassRefPtr<SVGPropertyBas
e> value) | 36 void SVGAnimatedNumberOptionalNumber::setAnimatedValue(PassRefPtr<SVGPropertyBas
e> value) |
44 { | 37 { |
45 SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::setAnimatedValue(value); | 38 SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::setAnimatedValue(value); |
46 m_firstNumber->setAnimatedValue(currentValue()->firstNumber()); | 39 m_firstNumber->setAnimatedValue(currentValue()->firstNumber()); |
47 m_secondNumber->setAnimatedValue(currentValue()->secondNumber()); | 40 m_secondNumber->setAnimatedValue(currentValue()->secondNumber()); |
48 } | 41 } |
49 | 42 |
50 void SVGAnimatedNumberOptionalNumber::animationEnded() | 43 void SVGAnimatedNumberOptionalNumber::animationEnded() |
51 { | 44 { |
52 SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::animationEnded(); | 45 SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::animationEnded(); |
53 m_firstNumber->animationEnded(); | 46 m_firstNumber->animationEnded(); |
54 m_secondNumber->animationEnded(); | 47 m_secondNumber->animationEnded(); |
55 } | 48 } |
56 | 49 |
57 bool SVGAnimatedNumberOptionalNumber::needsSynchronizeAttribute() | 50 bool SVGAnimatedNumberOptionalNumber::needsSynchronizeAttribute() |
58 { | 51 { |
59 return m_firstNumber->needsSynchronizeAttribute() | 52 return m_firstNumber->needsSynchronizeAttribute() |
60 || m_secondNumber->needsSynchronizeAttribute(); | 53 || m_secondNumber->needsSynchronizeAttribute(); |
61 } | 54 } |
62 | 55 |
63 } | 56 } |
OLD | NEW |