Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 293893003: Web Animations: Rename TimedItem to AnimationSource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update expectations. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/css/CSSAnimations.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/css/CSSAnimations.cpp
diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp
index 195b3a7285a228f7c1937b7667fcdf26e5b53676..3b4832893908759588d2f8b80482c4204fdc8757 100644
--- a/Source/core/animation/css/CSSAnimations.cpp
+++ b/Source/core/animation/css/CSSAnimations.cpp
@@ -601,43 +601,43 @@ void CSSAnimations::AnimationEventDelegate::maybeDispatch(Document::ListenerType
}
}
-void CSSAnimations::AnimationEventDelegate::onEventCondition(const TimedItem* timedItem)
+void CSSAnimations::AnimationEventDelegate::onEventCondition(const AnimationSource* animationSource)
{
- const TimedItem::Phase currentPhase = timedItem->phase();
- const double currentIteration = timedItem->currentIteration();
+ const AnimationSource::Phase currentPhase = animationSource->phase();
+ const double currentIteration = animationSource->currentIteration();
if (m_previousPhase != currentPhase
- && (currentPhase == TimedItem::PhaseActive || currentPhase == TimedItem::PhaseAfter)
- && (m_previousPhase == TimedItem::PhaseNone || m_previousPhase == TimedItem::PhaseBefore)) {
+ && (currentPhase == AnimationSource::PhaseActive || currentPhase == AnimationSource::PhaseAfter)
+ && (m_previousPhase == AnimationSource::PhaseNone || m_previousPhase == AnimationSource::PhaseBefore)) {
// The spec states that the elapsed time should be
// 'delay < 0 ? -delay : 0', but we always use 0 to match the existing
// implementation. See crbug.com/279611
maybeDispatch(Document::ANIMATIONSTART_LISTENER, EventTypeNames::animationstart, 0);
}
- if (currentPhase == TimedItem::PhaseActive && m_previousPhase == currentPhase && m_previousIteration != currentIteration) {
+ if (currentPhase == AnimationSource::PhaseActive && m_previousPhase == currentPhase && m_previousIteration != currentIteration) {
// We fire only a single event for all iterations thast terminate
// between a single pair of samples. See http://crbug.com/275263. For
// compatibility with the existing implementation, this event uses
// the elapsedTime for the first iteration in question.
- ASSERT(!std::isnan(timedItem->specifiedTiming().iterationDuration));
- const double elapsedTime = timedItem->specifiedTiming().iterationDuration * (m_previousIteration + 1);
+ ASSERT(!std::isnan(animationSource->specifiedTiming().iterationDuration));
+ const double elapsedTime = animationSource->specifiedTiming().iterationDuration * (m_previousIteration + 1);
maybeDispatch(Document::ANIMATIONITERATION_LISTENER, EventTypeNames::animationiteration, elapsedTime);
}
- if (currentPhase == TimedItem::PhaseAfter && m_previousPhase != TimedItem::PhaseAfter)
- maybeDispatch(Document::ANIMATIONEND_LISTENER, EventTypeNames::animationend, timedItem->activeDurationInternal());
+ if (currentPhase == AnimationSource::PhaseAfter && m_previousPhase != AnimationSource::PhaseAfter)
+ maybeDispatch(Document::ANIMATIONEND_LISTENER, EventTypeNames::animationend, animationSource->activeDurationInternal());
m_previousPhase = currentPhase;
m_previousIteration = currentIteration;
}
-void CSSAnimations::TransitionEventDelegate::onEventCondition(const TimedItem* timedItem)
+void CSSAnimations::TransitionEventDelegate::onEventCondition(const AnimationSource* animationSource)
{
- const TimedItem::Phase currentPhase = timedItem->phase();
- if (currentPhase == TimedItem::PhaseAfter && currentPhase != m_previousPhase && m_target->document().hasListenerType(Document::TRANSITIONEND_LISTENER)) {
+ const AnimationSource::Phase currentPhase = animationSource->phase();
+ if (currentPhase == AnimationSource::PhaseAfter && currentPhase != m_previousPhase && m_target->document().hasListenerType(Document::TRANSITIONEND_LISTENER)) {
String propertyName = getPropertyNameString(m_property);
- const Timing& timing = timedItem->specifiedTiming();
+ const Timing& timing = animationSource->specifiedTiming();
double elapsedTime = timing.iterationDuration;
const AtomicString& eventType = EventTypeNames::transitionend;
String pseudoElement = PseudoElement::pseudoElementNameForEvents(m_target->pseudoId());
« no previous file with comments | « Source/core/animation/css/CSSAnimations.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698