| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 | 32 |
| 33 #include "core/svg/SVGAnimatedIntegerOptionalInteger.h" | 33 #include "core/svg/SVGAnimatedIntegerOptionalInteger.h" |
| 34 | 34 |
| 35 #include "core/svg/SVGElement.h" |
| 36 |
| 35 namespace blink { | 37 namespace blink { |
| 36 | 38 |
| 37 SVGAnimatedIntegerOptionalInteger::SVGAnimatedIntegerOptionalInteger(SVGElement*
contextElement, const QualifiedName& attributeName, float initialFirstValue, fl
oat initialSecondValue) | 39 SVGAnimatedIntegerOptionalInteger::SVGAnimatedIntegerOptionalInteger(SVGElement*
contextElement, const QualifiedName& attributeName, float initialFirstValue, fl
oat initialSecondValue) |
| 38 : SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>(contextElement, attri
buteName, | 40 : SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>(contextElement, attri
buteName, |
| 39 SVGIntegerOptionalInteger::create(SVGInteger::create(initialFirstValue),
SVGInteger::create(initialSecondValue))) | 41 SVGIntegerOptionalInteger::create(SVGInteger::create(initialFirstValue),
SVGInteger::create(initialSecondValue))) |
| 40 , m_firstInteger(SVGAnimatedInteger::create(contextElement, attributeName, b
aseValue()->firstInteger())) | 42 , m_firstInteger(SVGAnimatedInteger::create(contextElement, attributeName, b
aseValue()->firstInteger())) |
| 41 , m_secondInteger(SVGAnimatedInteger::create(contextElement, attributeName,
baseValue()->secondInteger())) | 43 , m_secondInteger(SVGAnimatedInteger::create(contextElement, attributeName,
baseValue()->secondInteger())) |
| 42 { | 44 { |
| 43 m_firstInteger->setParentOptionalInteger(this); | 45 m_firstInteger->setParentOptionalInteger(this); |
| 44 m_secondInteger->setParentOptionalInteger(this); | 46 m_secondInteger->setParentOptionalInteger(this); |
| 45 } | 47 } |
| 46 | 48 |
| 47 void SVGAnimatedIntegerOptionalInteger::setAnimatedValue(PassRefPtr<SVGPropertyB
ase> value) | 49 void SVGAnimatedIntegerOptionalInteger::trace(Visitor* visitor) |
| 50 { |
| 51 visitor->trace(m_firstInteger); |
| 52 visitor->trace(m_secondInteger); |
| 53 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::trace(visitor); |
| 54 } |
| 55 |
| 56 void SVGAnimatedIntegerOptionalInteger::setAnimatedValue(PassRefPtrWillBeRawPtr<
SVGPropertyBase> value) |
| 48 { | 57 { |
| 49 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::setAnimatedValue(value
); | 58 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::setAnimatedValue(value
); |
| 50 m_firstInteger->setAnimatedValue(currentValue()->firstInteger()); | 59 m_firstInteger->setAnimatedValue(currentValue()->firstInteger()); |
| 51 m_secondInteger->setAnimatedValue(currentValue()->secondInteger()); | 60 m_secondInteger->setAnimatedValue(currentValue()->secondInteger()); |
| 52 } | 61 } |
| 53 | 62 |
| 54 void SVGAnimatedIntegerOptionalInteger::animationEnded() | 63 void SVGAnimatedIntegerOptionalInteger::animationEnded() |
| 55 { | 64 { |
| 56 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::animationEnded(); | 65 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::animationEnded(); |
| 57 m_firstInteger->animationEnded(); | 66 m_firstInteger->animationEnded(); |
| 58 m_secondInteger->animationEnded(); | 67 m_secondInteger->animationEnded(); |
| 59 } | 68 } |
| 60 | 69 |
| 61 bool SVGAnimatedIntegerOptionalInteger::needsSynchronizeAttribute() | 70 bool SVGAnimatedIntegerOptionalInteger::needsSynchronizeAttribute() |
| 62 { | 71 { |
| 63 return m_firstInteger->needsSynchronizeAttribute() | 72 return m_firstInteger->needsSynchronizeAttribute() |
| 64 || m_secondInteger->needsSynchronizeAttribute(); | 73 || m_secondInteger->needsSynchronizeAttribute(); |
| 65 } | 74 } |
| 66 | 75 |
| 67 } | 76 } |
| OLD | NEW |