OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // destination and returns true. Scrolling may be immediate or animated. | 57 // destination and returns true. Scrolling may be immediate or animated. |
58 // The base class implementation always scrolls immediately, never animates. | 58 // The base class implementation always scrolls immediately, never animates. |
59 virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, flo
at delta); | 59 virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, flo
at delta); |
60 | 60 |
61 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&); | 61 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&); |
62 | 62 |
63 ScrollableArea* scrollableArea() const { return m_scrollableArea; } | 63 ScrollableArea* scrollableArea() const { return m_scrollableArea; } |
64 | 64 |
65 virtual void setIsActive() { } | 65 virtual void setIsActive() { } |
66 | 66 |
67 virtual bool handleWheelEvent(const PlatformWheelEvent&); | 67 virtual bool handleWheelEvent(const PlatformWheelEvent&, bool canRubberbandL
eft, bool canRubberbandRight); |
68 | 68 |
69 #if OS(MACOSX) | 69 #if OS(MACOSX) |
70 virtual void handleWheelEventPhase(PlatformWheelEventPhase) { } | 70 virtual void handleWheelEventPhase(PlatformWheelEventPhase) { } |
71 #endif | 71 #endif |
72 | 72 |
73 void setCurrentPosition(const FloatPoint&); | 73 void setCurrentPosition(const FloatPoint&); |
74 FloatPoint currentPosition() const; | 74 FloatPoint currentPosition() const; |
75 | 75 |
76 virtual void cancelAnimations() { } | 76 virtual void cancelAnimations() { } |
77 virtual void serviceScrollAnimations() { } | 77 virtual void serviceScrollAnimations() { } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 float m_currentPosX; // We avoid using a FloatPoint in order to reduce | 110 float m_currentPosX; // We avoid using a FloatPoint in order to reduce |
111 float m_currentPosY; // subclass code complexity. | 111 float m_currentPosY; // subclass code complexity. |
112 | 112 |
113 private: | 113 private: |
114 float clampScrollPosition(ScrollbarOrientation, float); | 114 float clampScrollPosition(ScrollbarOrientation, float); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace WebCore | 117 } // namespace WebCore |
118 | 118 |
119 #endif // ScrollAnimator_h | 119 #endif // ScrollAnimator_h |
OLD | NEW |