| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 26 matching lines...) Expand all Loading... |
| 37 OBJC_CLASS WebScrollAnimationHelperDelegate; | 37 OBJC_CLASS WebScrollAnimationHelperDelegate; |
| 38 OBJC_CLASS WebScrollbarPainterControllerDelegate; | 38 OBJC_CLASS WebScrollbarPainterControllerDelegate; |
| 39 OBJC_CLASS WebScrollbarPainterDelegate; | 39 OBJC_CLASS WebScrollbarPainterDelegate; |
| 40 | 40 |
| 41 typedef id ScrollbarPainterController; | 41 typedef id ScrollbarPainterController; |
| 42 | 42 |
| 43 #if !USE(RUBBER_BANDING) | 43 #if !USE(RUBBER_BANDING) |
| 44 class ScrollElasticityControllerClient { }; | 44 class ScrollElasticityControllerClient { }; |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 namespace WebCore { | 47 namespace blink { |
| 48 | 48 |
| 49 class Scrollbar; | 49 class Scrollbar; |
| 50 | 50 |
| 51 class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimator, private ScrollE
lasticityControllerClient { | 51 class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimator, private ScrollE
lasticityControllerClient { |
| 52 | 52 |
| 53 public: | 53 public: |
| 54 ScrollAnimatorMac(ScrollableArea*); | 54 ScrollAnimatorMac(ScrollableArea*); |
| 55 virtual ~ScrollAnimatorMac(); | 55 virtual ~ScrollAnimatorMac(); |
| 56 | 56 |
| 57 void immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition)
; | 57 void immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition)
; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 virtual bool isRubberBandInProgress() const OVERRIDE; | 130 virtual bool isRubberBandInProgress() const OVERRIDE; |
| 131 | 131 |
| 132 #if USE(RUBBER_BANDING) | 132 #if USE(RUBBER_BANDING) |
| 133 /// ScrollElasticityControllerClient member functions. | 133 /// ScrollElasticityControllerClient member functions. |
| 134 virtual IntSize stretchAmount() OVERRIDE; | 134 virtual IntSize stretchAmount() OVERRIDE; |
| 135 virtual bool allowsHorizontalStretching() OVERRIDE; | 135 virtual bool allowsHorizontalStretching() OVERRIDE; |
| 136 virtual bool allowsVerticalStretching() OVERRIDE; | 136 virtual bool allowsVerticalStretching() OVERRIDE; |
| 137 virtual bool pinnedInDirection(const FloatSize&) OVERRIDE; | 137 virtual bool pinnedInDirection(const FloatSize&) OVERRIDE; |
| 138 virtual bool canScrollHorizontally() OVERRIDE; | 138 virtual bool canScrollHorizontally() OVERRIDE; |
| 139 virtual bool canScrollVertically() OVERRIDE; | 139 virtual bool canScrollVertically() OVERRIDE; |
| 140 virtual WebCore::IntPoint absoluteScrollPosition() OVERRIDE; | 140 virtual blink::IntPoint absoluteScrollPosition() OVERRIDE; |
| 141 virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&
) OVERRIDE; | 141 virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&
) OVERRIDE; |
| 142 virtual void immediateScrollBy(const FloatSize&) OVERRIDE; | 142 virtual void immediateScrollBy(const FloatSize&) OVERRIDE; |
| 143 virtual void startSnapRubberbandTimer() OVERRIDE; | 143 virtual void startSnapRubberbandTimer() OVERRIDE; |
| 144 virtual void stopSnapRubberbandTimer() OVERRIDE; | 144 virtual void stopSnapRubberbandTimer() OVERRIDE; |
| 145 virtual void adjustScrollPositionToBoundsIfNecessary() OVERRIDE; | 145 virtual void adjustScrollPositionToBoundsIfNecessary() OVERRIDE; |
| 146 | 146 |
| 147 bool pinnedInDirection(float deltaX, float deltaY); | 147 bool pinnedInDirection(float deltaX, float deltaY); |
| 148 void snapRubberBandTimerFired(Timer<ScrollAnimatorMac>*); | 148 void snapRubberBandTimerFired(Timer<ScrollAnimatorMac>*); |
| 149 | 149 |
| 150 ScrollElasticityController m_scrollElasticityController; | 150 ScrollElasticityController m_scrollElasticityController; |
| 151 Timer<ScrollAnimatorMac> m_snapRubberBandTimer; | 151 Timer<ScrollAnimatorMac> m_snapRubberBandTimer; |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 bool m_haveScrolledSincePageLoad; | 154 bool m_haveScrolledSincePageLoad; |
| 155 bool m_needsScrollerStyleUpdate; | 155 bool m_needsScrollerStyleUpdate; |
| 156 IntRect m_visibleScrollerThumbRect; | 156 IntRect m_visibleScrollerThumbRect; |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace WebCore | 159 } // namespace blink |
| 160 | 160 |
| 161 #endif // ScrollAnimatorMac_h | 161 #endif // ScrollAnimatorMac_h |
| OLD | NEW |