| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/scroll/ProgrammaticScrollAnimator.h" | 5 #include "platform/scroll/ProgrammaticScrollAnimator.h" |
| 6 | 6 |
| 7 #include "platform/animation/CompositorAnimation.h" | 7 #include "platform/animation/CompositorAnimation.h" |
| 8 #include "platform/animation/CompositorScrollOffsetAnimationCurve.h" | 8 #include "platform/animation/CompositorScrollOffsetAnimationCurve.h" |
| 9 #include "platform/geometry/IntPoint.h" | 9 #include "platform/geometry/IntPoint.h" |
| 10 #include "platform/graphics/CompositorFactory.h" | 10 #include "platform/graphics/CompositorFactory.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 { | 21 { |
| 22 } | 22 } |
| 23 | 23 |
| 24 ProgrammaticScrollAnimator::~ProgrammaticScrollAnimator() | 24 ProgrammaticScrollAnimator::~ProgrammaticScrollAnimator() |
| 25 { | 25 { |
| 26 } | 26 } |
| 27 | 27 |
| 28 void ProgrammaticScrollAnimator::resetAnimationState() | 28 void ProgrammaticScrollAnimator::resetAnimationState() |
| 29 { | 29 { |
| 30 ScrollAnimatorCompositorCoordinator::resetAnimationState(); | 30 ScrollAnimatorCompositorCoordinator::resetAnimationState(); |
| 31 m_animationCurve.clear(); | 31 m_animationCurve.reset(); |
| 32 m_startTime = 0.0; | 32 m_startTime = 0.0; |
| 33 } | 33 } |
| 34 | 34 |
| 35 void ProgrammaticScrollAnimator::notifyPositionChanged(const DoublePoint& offset
) | 35 void ProgrammaticScrollAnimator::notifyPositionChanged(const DoublePoint& offset
) |
| 36 { | 36 { |
| 37 m_scrollableArea->scrollPositionChanged(offset, ProgrammaticScroll); | 37 m_scrollableArea->scrollPositionChanged(offset, ProgrammaticScroll); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void ProgrammaticScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint
& offset) | 40 void ProgrammaticScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint
& offset) |
| 41 { | 41 { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 ScrollAnimatorCompositorCoordinator::compositorAnimationFinished(groupId); | 173 ScrollAnimatorCompositorCoordinator::compositorAnimationFinished(groupId); |
| 174 } | 174 } |
| 175 | 175 |
| 176 DEFINE_TRACE(ProgrammaticScrollAnimator) | 176 DEFINE_TRACE(ProgrammaticScrollAnimator) |
| 177 { | 177 { |
| 178 visitor->trace(m_scrollableArea); | 178 visitor->trace(m_scrollableArea); |
| 179 ScrollAnimatorCompositorCoordinator::trace(visitor); | 179 ScrollAnimatorCompositorCoordinator::trace(visitor); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace blink | 182 } // namespace blink |
| OLD | NEW |