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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 compositorOffsetFromBlinkOffset(m_targetOffset)); | 328 compositorOffsetFromBlinkOffset(m_targetOffset)); |
329 } | 329 } |
330 | 330 |
331 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll) | 331 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll) |
332 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); | 332 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); |
333 | 333 |
334 m_runState = RunState::WaitingToSendToCompositor; | 334 m_runState = RunState::WaitingToSendToCompositor; |
335 } | 335 } |
336 | 336 |
337 if (m_runState == RunState::WaitingToSendToCompositor) { | 337 if (m_runState == RunState::WaitingToSendToCompositor) { |
338 if (!m_compositorAnimationAttachedToLayerId) | 338 if (!m_compositorAnimationAttachedToElementId) |
339 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim
ationTimeline()); | 339 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim
ationTimeline()); |
340 | 340 |
341 if (!m_animationCurve) { | 341 if (!m_animationCurve) { |
342 m_animationCurve = adoptPtr(CompositorFactory::current().createScrol
lOffsetAnimationCurve( | 342 m_animationCurve = adoptPtr(CompositorFactory::current().createScrol
lOffsetAnimationCurve( |
343 compositorOffsetFromBlinkOffset(m_targetOffset), | 343 compositorOffsetFromBlinkOffset(m_targetOffset), |
344 m_lastGranularity == ScrollByPixel ? | 344 m_lastGranularity == ScrollByPixel ? |
345 CompositorScrollOffsetAnimationCurve::ScrollDurationInverseD
elta : | 345 CompositorScrollOffsetAnimationCurve::ScrollDurationInverseD
elta : |
346 CompositorScrollOffsetAnimationCurve::ScrollDurationConstant
)); | 346 CompositorScrollOffsetAnimationCurve::ScrollDurationConstant
)); |
347 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); | 347 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); |
348 } | 348 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 } | 444 } |
445 return true; | 445 return true; |
446 } | 446 } |
447 | 447 |
448 DEFINE_TRACE(ScrollAnimator) | 448 DEFINE_TRACE(ScrollAnimator) |
449 { | 449 { |
450 ScrollAnimatorBase::trace(visitor); | 450 ScrollAnimatorBase::trace(visitor); |
451 } | 451 } |
452 | 452 |
453 } // namespace blink | 453 } // namespace blink |
OLD | NEW |