This source file includes following definitions.
- usesDefaultInterpolationWith
- interpolateTo
- addWith
- equalTo
- trace
#include "config.h"
#include "core/animation/AnimatableLengthBoxAndBool.h"
namespace WebCore {
bool AnimatableLengthBoxAndBool::usesDefaultInterpolationWith(const AnimatableValue* value) const
{
const AnimatableLengthBoxAndBool* lengthBox = toAnimatableLengthBoxAndBool(value);
if (lengthBox->flag() != flag())
return true;
return AnimatableValue::usesDefaultInterpolation(lengthBox->box(), box());
}
PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableLengthBoxAndBool::interpolateTo(const AnimatableValue* value, double fraction) const
{
const AnimatableLengthBoxAndBool* lengthBox = toAnimatableLengthBoxAndBool(value);
if (lengthBox->flag() == flag()) {
return AnimatableLengthBoxAndBool::create(
AnimatableValue::interpolate(box(), lengthBox->box(), fraction),
flag());
}
return defaultInterpolateTo(this, value, fraction);
}
PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableLengthBoxAndBool::addWith(const AnimatableValue* value) const
{
const AnimatableLengthBoxAndBool* lengthBox = toAnimatableLengthBoxAndBool(value);
if (lengthBox->flag() == flag()) {
return AnimatableLengthBoxAndBool::create(
AnimatableValue::add(box(), lengthBox->box()),
flag());
}
return defaultAddWith(this, value);
}
bool AnimatableLengthBoxAndBool::equalTo(const AnimatableValue* value) const
{
const AnimatableLengthBoxAndBool* lengthBox = toAnimatableLengthBoxAndBool(value);
return box()->equals(lengthBox->box()) && flag() == lengthBox->flag();
}
void AnimatableLengthBoxAndBool::trace(Visitor* visitor)
{
visitor->trace(m_box);
}
}