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

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

Issue 176903004: Have Document::timeline() / Document::transitionTimeline() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/animation/ElementAnimation.cpp ('k') | Source/core/dom/Document.h » ('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 af126f2cd3f2cd58e8f1b96497eb5a55b7920d64..56d8d1cfb92df4a05533e4cd5f0c40661922ea44 100644
--- a/Source/core/animation/css/CSSAnimations.cpp
+++ b/Source/core/animation/css/CSSAnimations.cpp
@@ -474,7 +474,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
// 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->specifiedTiming(), Animation::DefaultPriority, eventDelegate.release());
- Player* player = element->document().timeline()->createPlayer(animation.get());
+ Player* player = element->document().timeline().createPlayer(animation.get());
if (inertAnimation->paused())
player->pause();
element->document().cssPendingAnimations().add(player);
@@ -517,7 +517,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
const std::pair<RefPtr<Animation>, double>& oldTransition = retargetedCompositorTransitions.get(id);
RefPtr<Animation> oldAnimation = oldTransition.first;
double oldStartTime = oldTransition.second;
- double inheritedTime = isNull(oldStartTime) ? 0 : element->document().transitionTimeline()->currentTime() - oldStartTime;
+ double inheritedTime = isNull(oldStartTime) ? 0 : element->document().transitionTimeline().currentTime() - oldStartTime;
oldAnimation->updateInheritedTime(inheritedTime);
KeyframeEffectModel* oldEffect = toKeyframeEffectModel(inertAnimation->effect());
const KeyframeEffectModel::KeyframeVector& frames = oldEffect->getFrames();
@@ -532,7 +532,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
effect = KeyframeEffectModel::create(newFrames);
}
RefPtr<Animation> transition = Animation::create(element, effect, inertAnimation->specifiedTiming(), Animation::TransitionPriority, eventDelegate.release());
- RefPtr<Player> player = element->document().transitionTimeline()->createPlayer(transition.get());
+ RefPtr<Player> player = element->document().transitionTimeline().createPlayer(transition.get());
player->update();
element->document().cssPendingAnimations().add(player.get());
runningTransition.transition = transition.get();
@@ -737,7 +737,7 @@ void CSSAnimations::calculateTransitionCompositableValues(CSSAnimationUpdate* up
void CSSAnimations::AnimationEventDelegate::maybeDispatch(Document::ListenerType listenerType, const AtomicString& eventName, double elapsedTime)
{
if (m_target->document().hasListenerType(listenerType))
- m_target->document().timeline()->addEventToDispatch(m_target, WebKitAnimationEvent::create(eventName, m_name, elapsedTime));
+ m_target->document().timeline().addEventToDispatch(m_target, WebKitAnimationEvent::create(eventName, m_name, elapsedTime));
}
void CSSAnimations::AnimationEventDelegate::onEventCondition(const TimedItem* timedItem, bool isFirstSample, TimedItem::Phase previousPhase, double previousIteration)
@@ -786,7 +786,7 @@ void CSSAnimations::TransitionEventDelegate::onEventCondition(const TimedItem* t
double elapsedTime = timing.iterationDuration;
const AtomicString& eventType = EventTypeNames::transitionend;
String pseudoElement = PseudoElement::pseudoElementNameForEvents(m_target->pseudoId());
- m_target->document().transitionTimeline()->addEventToDispatch(m_target, TransitionEvent::create(eventType, propertyName, elapsedTime, pseudoElement));
+ m_target->document().transitionTimeline().addEventToDispatch(m_target, TransitionEvent::create(eventType, propertyName, elapsedTime, pseudoElement));
}
}
« no previous file with comments | « Source/core/animation/ElementAnimation.cpp ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698