| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 m_compositorAnimationGroupId = 0; | 309 m_compositorAnimationGroupId = 0; |
| 310 | 310 |
| 311 m_animationCurve->updateTarget(m_timeFunction() - m_startTime, | 311 m_animationCurve->updateTarget(m_timeFunction() - m_startTime, |
| 312 compositorOffsetFromBlinkOffset(m_targetOffset)); | 312 compositorOffsetFromBlinkOffset(m_targetOffset)); |
| 313 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll) | 313 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll) |
| 314 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); | 314 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); |
| 315 m_runState = RunState::WaitingToSendToCompositor; | 315 m_runState = RunState::WaitingToSendToCompositor; |
| 316 } | 316 } |
| 317 | 317 |
| 318 if (m_runState == RunState::WaitingToSendToCompositor) { | 318 if (m_runState == RunState::WaitingToSendToCompositor) { |
| 319 if (!m_compositorAnimationAttachedToLayerId) | 319 if (!m_compositorAnimationAttachedToElementId) |
| 320 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim
ationTimeline()); | 320 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim
ationTimeline()); |
| 321 | 321 |
| 322 if (!m_animationCurve) { | 322 if (!m_animationCurve) { |
| 323 m_animationCurve = adoptPtr(CompositorFactory::current().createScrol
lOffsetAnimationCurve( | 323 m_animationCurve = adoptPtr(CompositorFactory::current().createScrol
lOffsetAnimationCurve( |
| 324 compositorOffsetFromBlinkOffset(m_targetOffset), | 324 compositorOffsetFromBlinkOffset(m_targetOffset), |
| 325 CompositorAnimationCurve::TimingFunctionTypeEaseInOut, | 325 CompositorAnimationCurve::TimingFunctionTypeEaseInOut, |
| 326 m_lastGranularity == ScrollByPixel ? | 326 m_lastGranularity == ScrollByPixel ? |
| 327 CompositorScrollOffsetAnimationCurve::ScrollDurationInverseD
elta : | 327 CompositorScrollOffsetAnimationCurve::ScrollDurationInverseD
elta : |
| 328 CompositorScrollOffsetAnimationCurve::ScrollDurationConstant
)); | 328 CompositorScrollOffsetAnimationCurve::ScrollDurationConstant
)); |
| 329 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); | 329 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 } | 426 } |
| 427 return true; | 427 return true; |
| 428 } | 428 } |
| 429 | 429 |
| 430 DEFINE_TRACE(ScrollAnimator) | 430 DEFINE_TRACE(ScrollAnimator) |
| 431 { | 431 { |
| 432 ScrollAnimatorBase::trace(visitor); | 432 ScrollAnimatorBase::trace(visitor); |
| 433 } | 433 } |
| 434 | 434 |
| 435 } // namespace blink | 435 } // namespace blink |
| OLD | NEW |