ElementAnimationRareData.h [plain text]
#pragma once
#include "KeyframeEffectStack.h"
#include "WebAnimationTypes.h"
namespace WebCore {
class CSSAnimation;
class CSSTransition;
class RenderStyle;
class WebAnimation;
class ElementAnimationRareData {
WTF_MAKE_NONCOPYABLE(ElementAnimationRareData);
WTF_MAKE_FAST_ALLOCATED;
public:
explicit ElementAnimationRareData();
~ElementAnimationRareData();
KeyframeEffectStack* keyframeEffectStack() { return m_keyframeEffectStack.get(); }
KeyframeEffectStack& ensureKeyframeEffectStack();
AnimationCollection& webAnimations() { return m_webAnimations; }
AnimationCollection& cssAnimations() { return m_cssAnimations; }
AnimationCollection& transitions() { return m_transitions; }
CSSAnimationCollection& animationsCreatedByMarkup() { return m_animationsCreatedByMarkup; }
void setAnimationsCreatedByMarkup(CSSAnimationCollection&&);
PropertyToTransitionMap& completedTransitionsByProperty() { return m_completedTransitionsByProperty; }
PropertyToTransitionMap& runningTransitionsByProperty() { return m_runningTransitionsByProperty; }
const RenderStyle* lastStyleChangeEventStyle() const { return m_lastStyleChangeEventStyle.get(); }
void setLastStyleChangeEventStyle(std::unique_ptr<const RenderStyle>&& style) { m_lastStyleChangeEventStyle = WTFMove(style); }
private:
std::unique_ptr<KeyframeEffectStack> m_keyframeEffectStack;
std::unique_ptr<const RenderStyle> m_lastStyleChangeEventStyle;
AnimationCollection m_webAnimations;
AnimationCollection m_cssAnimations;
AnimationCollection m_transitions;
CSSAnimationCollection m_animationsCreatedByMarkup;
PropertyToTransitionMap m_completedTransitionsByProperty;
PropertyToTransitionMap m_runningTransitionsByProperty;
};
}