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

Unified Diff: Source/core/animation/ElementAnimation.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/DocumentTimelineTest.cpp ('k') | Source/core/animation/css/CSSAnimations.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ElementAnimation.cpp
diff --git a/Source/core/animation/ElementAnimation.cpp b/Source/core/animation/ElementAnimation.cpp
index ebf4be354bbcc50afee2d5aa9d2ac5f0e9a27a4d..defcbb10a0e5a2d9ff542d0de7a74f295f23c136 100644
--- a/Source/core/animation/ElementAnimation.cpp
+++ b/Source/core/animation/ElementAnimation.cpp
@@ -42,9 +42,8 @@ Animation* ElementAnimation::animate(Element& element, Vector<Dictionary> keyfra
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
RefPtr<Animation> animation = Animation::create(&element, keyframeDictionaryVector, timingInput);
- DocumentTimeline* timeline = element.document().timeline();
- ASSERT(timeline);
- timeline->play(animation.get());
+ DocumentTimeline& timeline = element.document().timeline();
+ timeline.play(animation.get());
return animation.get();
}
@@ -54,9 +53,8 @@ Animation* ElementAnimation::animate(Element& element, Vector<Dictionary> keyfra
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
RefPtr<Animation> animation = Animation::create(&element, keyframeDictionaryVector, timingInput);
- DocumentTimeline* timeline = element.document().timeline();
- ASSERT(timeline);
- timeline->play(animation.get());
+ DocumentTimeline& timeline = element.document().timeline();
+ timeline.play(animation.get());
return animation.get();
}
@@ -66,9 +64,8 @@ Animation* ElementAnimation::animate(Element& element, Vector<Dictionary> keyfra
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
RefPtr<Animation> animation = Animation::create(&element, keyframeDictionaryVector);
- DocumentTimeline* timeline = element.document().timeline();
- ASSERT(timeline);
- timeline->play(animation.get());
+ DocumentTimeline& timeline = element.document().timeline();
+ timeline.play(animation.get());
return animation.get();
}
« no previous file with comments | « Source/core/animation/DocumentTimelineTest.cpp ('k') | Source/core/animation/css/CSSAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698