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

Side by Side Diff: third_party/WebKit/Source/core/animation/AnimationTimeline.cpp

Issue 2944423003: Implement new AnimationTimeline superclass (Closed)
Patch Set: Rebase Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 compositor_timeline_ = CompositorAnimationTimeline::Create(); 80 compositor_timeline_ = CompositorAnimationTimeline::Create();
81 81
82 DCHECK(document); 82 DCHECK(document);
83 } 83 }
84 84
85 bool AnimationTimeline::IsActive() { 85 bool AnimationTimeline::IsActive() {
86 return document_ && document_->GetPage(); 86 return document_ && document_->GetPage();
87 } 87 }
88 88
89 void AnimationTimeline::AnimationAttached(Animation& animation) { 89 void AnimationTimeline::AnimationAttached(Animation& animation) {
90 DCHECK_EQ(animation.timeline(), this); 90 DCHECK_EQ(animation.TimelineInternal(), this);
91 DCHECK(!animations_.Contains(&animation)); 91 DCHECK(!animations_.Contains(&animation));
92 animations_.insert(&animation); 92 animations_.insert(&animation);
93 } 93 }
94 94
95 Animation* AnimationTimeline::Play(AnimationEffectReadOnly* child) { 95 Animation* AnimationTimeline::Play(AnimationEffectReadOnly* child) {
96 if (!document_) 96 if (!document_)
97 return nullptr; 97 return nullptr;
98 98
99 Animation* animation = Animation::Create(child, this); 99 Animation* animation = Animation::Create(child, this);
100 DCHECK(animations_.Contains(animation)); 100 DCHECK(animations_.Contains(animation));
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 void AnimationTimeline::InvalidateKeyframeEffects(const TreeScope& tree_scope) { 292 void AnimationTimeline::InvalidateKeyframeEffects(const TreeScope& tree_scope) {
293 for (const auto& animation : animations_) 293 for (const auto& animation : animations_)
294 animation->InvalidateKeyframeEffect(tree_scope); 294 animation->InvalidateKeyframeEffect(tree_scope);
295 } 295 }
296 296
297 DEFINE_TRACE(AnimationTimeline) { 297 DEFINE_TRACE(AnimationTimeline) {
298 visitor->Trace(document_); 298 visitor->Trace(document_);
299 visitor->Trace(timing_); 299 visitor->Trace(timing_);
300 visitor->Trace(animations_needing_update_); 300 visitor->Trace(animations_needing_update_);
301 visitor->Trace(animations_); 301 visitor->Trace(animations_);
302 SuperAnimationTimeline::Trace(visitor);
302 } 303 }
303 304
304 } // namespace blink 305 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698