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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 protected: | 86 protected: |
87 virtual void animationWillStart() { } | 87 virtual void animationWillStart() { } |
88 virtual void animationDidFinish() { } | 88 virtual void animationDidFinish() { } |
89 | 89 |
90 Parameters parametersForScrollGranularity(ScrollGranularity) const; | 90 Parameters parametersForScrollGranularity(ScrollGranularity) const; |
91 | 91 |
92 friend class ::ScrollAnimatorNoneTest; | 92 friend class ::ScrollAnimatorNoneTest; |
93 | 93 |
94 struct PLATFORM_EXPORT PerAxisData { | 94 struct PLATFORM_EXPORT PerAxisData { |
95 PerAxisData(ScrollAnimatorNone* parent, float* currentPos, int visibleLe
ngth); | 95 PerAxisData(float* currentPos, int visibleLength); |
96 void reset(); | 96 void reset(); |
97 bool updateDataFromParameters(float step, float delta, float scrollableS
ize, double currentTime, Parameters*); | 97 bool updateDataFromParameters(float step, float delta, float scrollableS
ize, double currentTime, Parameters*); |
98 bool animateScroll(double currentTime); | 98 bool animateScroll(double currentTime); |
99 void updateVisibleLength(int visibleLength); | 99 void updateVisibleLength(int visibleLength); |
100 | 100 |
101 static double curveAt(Curve, double t); | 101 static double curveAt(Curve, double t); |
102 static double attackCurve(Curve, double deltaT, double curveT, double st
artPos, double attackPos); | 102 static double attackCurve(Curve, double deltaT, double curveT, double st
artPos, double attackPos); |
103 static double releaseCurve(Curve, double deltaT, double curveT, double r
eleasePos, double desiredPos); | 103 static double releaseCurve(Curve, double deltaT, double curveT, double r
eleasePos, double desiredPos); |
104 static double coastCurve(Curve, double factor); | 104 static double coastCurve(Curve, double factor); |
105 | 105 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 PerAxisData m_horizontalData; | 143 PerAxisData m_horizontalData; |
144 PerAxisData m_verticalData; | 144 PerAxisData m_verticalData; |
145 | 145 |
146 double m_startTime; | 146 double m_startTime; |
147 bool m_animationActive; | 147 bool m_animationActive; |
148 }; | 148 }; |
149 | 149 |
150 } // namespace blink | 150 } // namespace blink |
151 | 151 |
152 #endif // ScrollAnimatorNone_h | 152 #endif // ScrollAnimatorNone_h |
OLD | NEW |