| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 using namespace std; | 54 using namespace std; |
| 55 | 55 |
| 56 namespace WebCore { | 56 namespace WebCore { |
| 57 | 57 |
| 58 const double kFrameRate = 60; | 58 const double kFrameRate = 60; |
| 59 const double kTickTime = 1 / kFrameRate; | 59 const double kTickTime = 1 / kFrameRate; |
| 60 const double kMinimumTimerInterval = .001; | 60 const double kMinimumTimerInterval = .001; |
| 61 const double kZoomTicks = 11; | 61 const double kZoomTicks = 11; |
| 62 | 62 |
| 63 #if !(PLATFORM(BLACKBERRY)) | |
| 64 PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) | 63 PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) |
| 65 { | 64 { |
| 66 if (scrollableArea && scrollableArea->scrollAnimatorEnabled()) | 65 if (scrollableArea && scrollableArea->scrollAnimatorEnabled()) |
| 67 return adoptPtr(new ScrollAnimatorNone(scrollableArea)); | 66 return adoptPtr(new ScrollAnimatorNone(scrollableArea)); |
| 68 return adoptPtr(new ScrollAnimator(scrollableArea)); | 67 return adoptPtr(new ScrollAnimator(scrollableArea)); |
| 69 } | 68 } |
| 70 #endif | |
| 71 | 69 |
| 72 ScrollAnimatorNone::Parameters::Parameters() | 70 ScrollAnimatorNone::Parameters::Parameters() |
| 73 : m_isEnabled(false) | 71 : m_isEnabled(false) |
| 74 { | 72 { |
| 75 } | 73 } |
| 76 | 74 |
| 77 ScrollAnimatorNone::Parameters::Parameters(bool isEnabled, double animationTime,
double repeatMinimumSustainTime, Curve attackCurve, double attackTime, Curve re
leaseCurve, double releaseTime, Curve coastTimeCurve, double maximumCoastTime) | 75 ScrollAnimatorNone::Parameters::Parameters(bool isEnabled, double animationTime,
double repeatMinimumSustainTime, Curve attackCurve, double attackTime, Curve re
leaseCurve, double releaseTime, Curve coastTimeCurve, double maximumCoastTime) |
| 78 : m_isEnabled(isEnabled) | 76 : m_isEnabled(isEnabled) |
| 79 , m_animationTime(animationTime) | 77 , m_animationTime(animationTime) |
| 80 , m_repeatMinimumSustainTime(repeatMinimumSustainTime) | 78 , m_repeatMinimumSustainTime(repeatMinimumSustainTime) |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 #if USE(REQUEST_ANIMATION_FRAME_TIMER) | 589 #if USE(REQUEST_ANIMATION_FRAME_TIMER) |
| 592 m_animationTimer.stop(); | 590 m_animationTimer.stop(); |
| 593 #else | 591 #else |
| 594 m_animationActive = false; | 592 m_animationActive = false; |
| 595 #endif | 593 #endif |
| 596 } | 594 } |
| 597 | 595 |
| 598 } // namespace WebCore | 596 } // namespace WebCore |
| 599 | 597 |
| 600 #endif // ENABLE(SMOOTH_SCROLLING) | 598 #endif // ENABLE(SMOOTH_SCROLLING) |
| OLD | NEW |