m_animationsWithPauseToggled.append(name);
}
- void startTransition(CSSPropertyID id, const AnimatableValue* from, const AnimatableValue* to, PassRefPtr<InertAnimation> animation)
+ void startTransition(CSSPropertyID id, CSSPropertyID eventId, const AnimatableValue* from, const AnimatableValue* to, PassRefPtr<InertAnimation> animation)
{
NewTransition newTransition;
newTransition.id = id;
+ newTransition.eventId = eventId;
newTransition.from = from;
newTransition.to = to;
newTransition.animation = animation;
}
CSSPropertyID id;
+ CSSPropertyID eventId;
RawPtrWillBeMember<const AnimatableValue> from;
RawPtrWillBeMember<const AnimatableValue> to;
RefPtr<InertAnimation> animation;
};
class CSSAnimations FINAL : public NoBaseWillBeGarbageCollectedFinalized<CSSAnimations> {
+ WTF_MAKE_NONCOPYABLE(CSSAnimations);
public:
+ CSSAnimations();
+
// FIXME: This method is only used here and in the legacy animations
// implementation. It should be made private or file-scope when the legacy
// engine is removed.
static bool isAnimatableProperty(CSSPropertyID);
static const StylePropertyShorthand& animatableProperties();
+ static bool isAllowedAnimation(CSSPropertyID);
// FIXME: This should take a const ScopedStyleTree instead of a StyleResolver.
// We should also change the Element* to a const Element*
static PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Element& parentElement, const RenderStyle&, RenderStyle* parentStyle, StyleResolver*);
visitor->trace(to);
}
- Animation* transition; // The TransitionTimeline keeps the AnimationPlayers alive
+ RefPtr<AnimationPlayer> player;
RawPtrWillBeMember<const AnimatableValue> from;
RawPtrWillBeMember<const AnimatableValue> to;
};
AnimationEventDelegate(Element* target, const AtomicString& name)
: m_target(target)
, m_name(name)
+ , m_previousPhase(TimedItem::PhaseNone)
+ , m_previousIteration(nullValue())
{
}
- virtual void onEventCondition(const TimedItem*, bool isFirstSample, TimedItem::Phase previousPhase, double previousIteration) OVERRIDE;
+ virtual void onEventCondition(const TimedItem*) OVERRIDE;
private:
void maybeDispatch(Document::ListenerType, const AtomicString& eventName, double elapsedTime);
Element* m_target;
const AtomicString m_name;
+ TimedItem::Phase m_previousPhase;
+ double m_previousIteration;
};
class TransitionEventDelegate FINAL : public TimedItem::EventDelegate {
TransitionEventDelegate(Element* target, CSSPropertyID property)
: m_target(target)
, m_property(property)
+ , m_previousPhase(TimedItem::PhaseNone)
{
}
- virtual void onEventCondition(const TimedItem*, bool isFirstSample, TimedItem::Phase previousPhase, double previousIteration) OVERRIDE;
+ virtual void onEventCondition(const TimedItem*) OVERRIDE;
private:
Element* m_target;
const CSSPropertyID m_property;
+ TimedItem::Phase m_previousPhase;
};
};