This source file includes following definitions.
- m_secondNumber
- animationStarted
- setAnimatedValue
- animationEnded
- needsSynchronizeAttribute
#include "config.h"
#include "core/svg/SVGAnimatedNumberOptionalNumber.h"
namespace WebCore {
SVGAnimatedNumberOptionalNumber::SVGAnimatedNumberOptionalNumber(SVGElement* contextElement, const QualifiedName& attributeName, float initialFirstValue, float initialSecondValue)
: SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>(contextElement, attributeName,
SVGNumberOptionalNumber::create(SVGNumber::create(initialFirstValue), SVGNumber::create(initialSecondValue)))
, m_firstNumber(SVGAnimatedNumber::create(contextElement, attributeName, baseValue()->firstNumber()))
, m_secondNumber(SVGAnimatedNumber::create(contextElement, attributeName, baseValue()->secondNumber()))
{
m_firstNumber->setParentOptionalNumber(this);
m_secondNumber->setParentOptionalNumber(this);
}
void SVGAnimatedNumberOptionalNumber::animationStarted()
{
SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::animationStarted();
m_firstNumber->animationStarted();
m_secondNumber->animationStarted();
}
void SVGAnimatedNumberOptionalNumber::setAnimatedValue(PassRefPtr<SVGPropertyBase> value)
{
SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::setAnimatedValue(value);
m_firstNumber->setAnimatedValue(currentValue()->firstNumber());
m_secondNumber->setAnimatedValue(currentValue()->secondNumber());
}
void SVGAnimatedNumberOptionalNumber::animationEnded()
{
SVGAnimatedPropertyCommon<SVGNumberOptionalNumber>::animationEnded();
m_firstNumber->animationEnded();
m_secondNumber->animationEnded();
}
bool SVGAnimatedNumberOptionalNumber::needsSynchronizeAttribute()
{
return m_firstNumber->needsSynchronizeAttribute()
|| m_secondNumber->needsSynchronizeAttribute();
}
}