| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 m_compositorAnimationId = 0; | 272 m_compositorAnimationId = 0; |
| 273 m_compositorAnimationGroupId = 0; | 273 m_compositorAnimationGroupId = 0; |
| 274 if (m_runState == RunState::WaitingToCancelOnCompositor) { | 274 if (m_runState == RunState::WaitingToCancelOnCompositor) { |
| 275 postAnimationCleanupAndReset(); | 275 postAnimationCleanupAndReset(); |
| 276 return; | 276 return; |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 | 279 |
| 280 if (m_runState == RunState::WaitingToSendToCompositor | 280 if (m_runState == RunState::WaitingToSendToCompositor |
| 281 || m_runState == RunState::RunningOnCompositorButNeedsUpdate) { | 281 || m_runState == RunState::RunningOnCompositorButNeedsUpdate) { |
| 282 if (!m_compositorAnimationAttachedToLayerId) |
| 283 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim
ationTimeline()); |
| 284 |
| 282 if (m_runState == RunState::RunningOnCompositorButNeedsUpdate) { | 285 if (m_runState == RunState::RunningOnCompositorButNeedsUpdate) { |
| 283 // Abort the running animation before a new one with an updated | 286 // Abort the running animation before a new one with an updated |
| 284 // target is added. | 287 // target is added. |
| 285 abortAnimation(); | 288 abortAnimation(); |
| 286 | 289 |
| 287 m_compositorAnimationId = 0; | 290 m_compositorAnimationId = 0; |
| 288 m_compositorAnimationGroupId = 0; | 291 m_compositorAnimationGroupId = 0; |
| 289 | 292 |
| 290 m_animationCurve->updateTarget(m_timeFunction() - m_startTime, | 293 m_animationCurve->updateTarget(m_timeFunction() - m_startTime, |
| 291 compositorOffsetFromBlinkOffset(m_targetOffset)); | 294 compositorOffsetFromBlinkOffset(m_targetOffset)); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 402 } |
| 400 return true; | 403 return true; |
| 401 } | 404 } |
| 402 | 405 |
| 403 DEFINE_TRACE(ScrollAnimator) | 406 DEFINE_TRACE(ScrollAnimator) |
| 404 { | 407 { |
| 405 ScrollAnimatorBase::trace(visitor); | 408 ScrollAnimatorBase::trace(visitor); |
| 406 } | 409 } |
| 407 | 410 |
| 408 } // namespace blink | 411 } // namespace blink |
| OLD | NEW |