| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual bool canScrollVertically() = 0; | 50 virtual bool canScrollVertically() = 0; |
| 51 virtual bool shouldRubberBandInDirection(ScrollDirection) = 0; | 51 virtual bool shouldRubberBandInDirection(ScrollDirection) = 0; |
| 52 | 52 |
| 53 // Return the absolute scroll position, not relative to the scroll origin. | 53 // Return the absolute scroll position, not relative to the scroll origin. |
| 54 virtual WebCore::IntPoint absoluteScrollPosition() = 0; | 54 virtual WebCore::IntPoint absoluteScrollPosition() = 0; |
| 55 | 55 |
| 56 virtual void immediateScrollBy(const FloatSize&) = 0; | 56 virtual void immediateScrollBy(const FloatSize&) = 0; |
| 57 virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&
) = 0; | 57 virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&
) = 0; |
| 58 virtual void startSnapRubberbandTimer() = 0; | 58 virtual void startSnapRubberbandTimer() = 0; |
| 59 virtual void stopSnapRubberbandTimer() = 0; | 59 virtual void stopSnapRubberbandTimer() = 0; |
| 60 |
| 61 // If the current scroll position is within the overhang area, this function
will cause |
| 62 // the page to scroll to the nearest boundary point. |
| 63 virtual void adjustScrollPositionToBoundsIfNecessary() = 0; |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 class ScrollElasticityController { | 66 class ScrollElasticityController { |
| 63 WTF_MAKE_NONCOPYABLE(ScrollElasticityController); | 67 WTF_MAKE_NONCOPYABLE(ScrollElasticityController); |
| 64 | 68 |
| 65 public: | 69 public: |
| 66 explicit ScrollElasticityController(ScrollElasticityControllerClient*); | 70 explicit ScrollElasticityController(ScrollElasticityControllerClient*); |
| 67 | 71 |
| 68 bool handleWheelEvent(const PlatformWheelEvent&); | 72 bool handleWheelEvent(const PlatformWheelEvent&); |
| 69 void snapRubberBandTimerFired(); | 73 void snapRubberBandTimerFired(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 94 FloatSize m_origVelocity; | 98 FloatSize m_origVelocity; |
| 95 | 99 |
| 96 bool m_snapRubberbandTimerIsActive; | 100 bool m_snapRubberbandTimerIsActive; |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 } // namespace WebCore | 103 } // namespace WebCore |
| 100 | 104 |
| 101 #endif // USE(RUBBER_BANDING) | 105 #endif // USE(RUBBER_BANDING) |
| 102 | 106 |
| 103 #endif // ScrollElasticityController_h | 107 #endif // ScrollElasticityController_h |
| OLD | NEW |