SVGAnimateElement.h [plain text]
#ifndef SVGAnimateElement_h
#define SVGAnimateElement_h
#include "SVGAnimatedType.h"
#include "SVGAnimatedTypeAnimator.h"
#include "SVGAnimationElement.h"
#include "SVGNames.h"
namespace WebCore {
class SVGAnimatedProperty;
class SVGAnimateElement : public SVGAnimationElement {
public:
static PassRefPtr<SVGAnimateElement> create(const QualifiedName&, Document&);
virtual ~SVGAnimateElement();
AnimatedPropertyType determineAnimatedPropertyType(SVGElement*) const;
protected:
SVGAnimateElement(const QualifiedName&, Document&);
virtual void resetAnimatedType() override;
virtual void clearAnimatedType(SVGElement* targetElement) override;
virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString) override;
virtual bool calculateFromAndToValues(const String& fromString, const String& toString) override;
virtual bool calculateFromAndByValues(const String& fromString, const String& byString) override;
virtual void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) override;
virtual void applyResultsToTarget() override;
virtual float calculateDistance(const String& fromString, const String& toString) override;
virtual bool isAdditive() const override;
virtual void setTargetElement(SVGElement*) override;
virtual void setAttributeName(const QualifiedName&) override;
AnimatedPropertyType m_animatedPropertyType;
private:
void resetAnimatedPropertyType();
SVGAnimatedTypeAnimator* ensureAnimator();
bool animatedPropertyTypeSupportsAddition() const;
virtual bool hasValidAttributeType() override;
std::unique_ptr<SVGAnimatedType> m_fromType;
std::unique_ptr<SVGAnimatedType> m_toType;
std::unique_ptr<SVGAnimatedType> m_toAtEndOfDurationType;
std::unique_ptr<SVGAnimatedType> m_animatedType;
SVGElementAnimatedPropertyList m_animatedProperties;
std::unique_ptr<SVGAnimatedTypeAnimator> m_animator;
};
void isSVGAnimateElement(const SVGAnimateElement&); bool isSVGAnimateElement(const Node&);
NODE_TYPE_CASTS(SVGAnimateElement)
}
#endif // SVGAnimateElement_h