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(PseudoId);
~ElementAnimationRareData();
PseudoId pseudoId() const { return m_pseudoId; }
KeyframeEffectStack* keyframeEffectStack() { return m_keyframeEffectStack.get(); }
KeyframeEffectStack& ensureKeyframeEffectStack();
AnimationCollection& animations() { return m_animations; }
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_animations;
CSSAnimationCollection m_animationsCreatedByMarkup;
PropertyToTransitionMap m_completedTransitionsByProperty;
PropertyToTransitionMap m_runningTransitionsByProperty;
PseudoId m_pseudoId;
};
}