ImplicitAnimation.h [plain text]
#ifndef ImplicitAnimation_h
#define ImplicitAnimation_h
#include "AnimationBase.h"
#include "CSSPropertyNames.h"
#include "Document.h"
namespace WebCore {
class RenderElement;
class ImplicitAnimation : public AnimationBase {
public:
static PassRefPtr<ImplicitAnimation> create(const Animation& animation, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compositeAnimation, RenderStyle* fromStyle)
{
return adoptRef(new ImplicitAnimation(animation, animatingProperty, renderer, compositeAnimation, fromStyle));
};
CSSPropertyID transitionProperty() const { return m_transitionProperty; }
CSSPropertyID animatingProperty() const { return m_animatingProperty; }
virtual void onAnimationEnd(double elapsedTime) override;
virtual bool startAnimation(double timeOffset) override;
virtual void pauseAnimation(double timeOffset) override;
virtual void endAnimation() override;
virtual void animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, RenderStyle* targetStyle, RefPtr<RenderStyle>& animatedStyle) override;
virtual void getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle) override;
virtual void reset(RenderStyle* to);
void setOverridden(bool);
virtual bool overridden() const override { return m_overridden; }
virtual bool affectsProperty(CSSPropertyID) const override;
bool hasStyle() const { return m_fromStyle && m_toStyle; }
bool isTargetPropertyEqual(CSSPropertyID, const RenderStyle*);
void blendPropertyValueInStyle(CSSPropertyID, RenderStyle*);
virtual double timeToNextService() override;
bool active() const { return m_active; }
void setActive(bool b) { m_active = b; }
protected:
bool shouldSendEventForListener(Document::ListenerType) const;
bool sendTransitionEvent(const AtomicString&, double elapsedTime);
void validateTransformFunctionList();
#if ENABLE(CSS_FILTERS)
void checkForMatchingFilterFunctionLists();
#endif
private:
ImplicitAnimation(const Animation&, CSSPropertyID, RenderElement*, CompositeAnimation*, RenderStyle*);
virtual ~ImplicitAnimation();
CSSPropertyID m_transitionProperty; CSSPropertyID m_animatingProperty; bool m_overridden; bool m_active;
RefPtr<RenderStyle> m_fromStyle;
RefPtr<RenderStyle> m_toStyle;
};
}
#endif // ImplicitAnimation_h