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

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

Issue 152853003: Web Animations API: Bindings for TimedItem.specified with readonly attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small cleanup Created 6 years, 10 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
Index: Source/core/animation/css/CSSAnimations.cpp
diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp
index a6f22b783cde009273275586cefc77a2e81311f1..de88449025a0feccb4202ccace9138d6d67f2361 100644
--- a/Source/core/animation/css/CSSAnimations.cpp
+++ b/Source/core/animation/css/CSSAnimations.cpp
@@ -469,7 +469,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
const InertAnimation* inertAnimation = animationsIter->get();
// The event delegate is set on the the first animation only. We
// rely on the behavior of OwnPtr::release() to achieve this.
- RefPtr<Animation> animation = Animation::create(element, inertAnimation->effect(), inertAnimation->specified(), Animation::DefaultPriority, eventDelegate.release());
+ RefPtr<Animation> animation = Animation::create(element, inertAnimation->effect(), inertAnimation->specifiedTiming(), Animation::DefaultPriority, eventDelegate.release());
Player* player = element->document().timeline()->createPlayer(animation.get());
if (inertAnimation->paused())
player->pause();
@@ -527,7 +527,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
newFrames.append(frames[1]->clone());
effect = KeyframeEffectModel::create(newFrames);
}
- RefPtr<Animation> transition = Animation::create(element, effect, inertAnimation->specified(), Animation::TransitionPriority, eventDelegate.release());
+ RefPtr<Animation> transition = Animation::create(element, effect, inertAnimation->specifiedTiming(), Animation::TransitionPriority, eventDelegate.release());
RefPtr<Player> player = element->document().transitionTimeline()->createPlayer(transition.get());
player->update();
element->document().cssPendingAnimations().add(player.get());
@@ -753,13 +753,13 @@ void CSSAnimations::AnimationEventDelegate::onEventCondition(const TimedItem* ti
// 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->specified().iterationDuration));
- const double elapsedTime = timedItem->specified().iterationDuration * (previousIteration + 1);
+ ASSERT(!std::isnan(timedItem->specifiedTiming().iterationDuration));
+ const double elapsedTime = timedItem->specifiedTiming().iterationDuration * (previousIteration + 1);
maybeDispatch(Document::ANIMATIONITERATION_LISTENER, EventTypeNames::animationiteration, elapsedTime);
return;
}
if ((isFirstSample || previousPhase == TimedItem::PhaseBefore) && isLaterPhase(currentPhase, TimedItem::PhaseBefore)) {
- ASSERT(timedItem->specified().startDelay > 0 || isFirstSample);
+ ASSERT(timedItem->specifiedTiming().startDelay > 0 || isFirstSample);
// 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
@@ -778,7 +778,7 @@ void CSSAnimations::TransitionEventDelegate::onEventCondition(const TimedItem* t
const TimedItem::Phase currentPhase = timedItem->phase();
if (currentPhase == TimedItem::PhaseAfter && (isFirstSample || previousPhase != currentPhase) && m_target->document().hasListenerType(Document::TRANSITIONEND_LISTENER)) {
String propertyName = getPropertyNameString(m_property);
- const Timing& timing = timedItem->specified();
+ const Timing& timing = timedItem->specifiedTiming();
double elapsedTime = timing.iterationDuration;
const AtomicString& eventType = EventTypeNames::transitionend;
String pseudoElement = PseudoElement::pseudoElementNameForEvents(m_target->pseudoId());

Powered by Google App Engine
This is Rietveld 408576698