| Index: cc/animation/animation_player.cc
|
| diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
|
| index a5e0e64f2207cb4f4d0bdda128d64107eaae178d..a00e7394219295f9a5d87853f40b589f48d37a70 100644
|
| --- a/cc/animation/animation_player.cc
|
| +++ b/cc/animation/animation_player.cc
|
| @@ -37,7 +37,8 @@ class AnimationPlayer::ValueObserver : public LayerAnimationValueObserver {
|
| }
|
|
|
| void OnAnimationWaitingForDeletion() override {
|
| - // TODO(loyso): implement it.
|
| + // TODO(loyso): See Layer::OnAnimationWaitingForDeletion. But we always do
|
| + // PushProperties for AnimationTimelines for now.
|
| }
|
|
|
| bool IsActive() const override { return is_active_; }
|
| @@ -170,6 +171,8 @@ void AnimationPlayer::LayerUnregistered(int layer_id, bool is_active_tree) {
|
|
|
| void AnimationPlayer::AddAnimation(scoped_ptr<Animation> animation) {
|
| DCHECK(layer_animation_controller_);
|
| + DCHECK(animation->target_property() != Animation::SCROLL_OFFSET ||
|
| + !animation_host_ || animation_host_->GetSupportsScrollAnimations());
|
| layer_animation_controller_->AddAnimation(animation.Pass());
|
| SetNeedsCommit();
|
| }
|
| @@ -288,7 +291,14 @@ void AnimationPlayer::DestroyPendingValueObserver() {
|
| }
|
|
|
| gfx::ScrollOffset AnimationPlayer::ScrollOffsetForAnimation() const {
|
| - // TODO(loyso): implement it.
|
| + DCHECK(layer_id_);
|
| + if (animation_host()) {
|
| + DCHECK(animation_host()->layer_tree_mutators_client());
|
| + return animation_host()
|
| + ->layer_tree_mutators_client()
|
| + ->GetScrollOffsetForAnimation(layer_id_);
|
| + }
|
| +
|
| return gfx::ScrollOffset();
|
| }
|
|
|
|
|