| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // A possibly animated scroll. The base class implementation always scrolls | 56 // A possibly animated scroll. The base class implementation always scrolls |
| 57 // immediately, never animates. If the scroll is animated and currently the | 57 // immediately, never animates. If the scroll is animated and currently the |
| 58 // animator has an in-progress animation, the ScrollResult will always return | 58 // animator has an in-progress animation, the ScrollResult will always return |
| 59 // no unusedDelta and didScroll=true, i.e. fully consuming the scroll request. | 59 // no unusedDelta and didScroll=true, i.e. fully consuming the scroll request. |
| 60 // This makes animations latch to a single scroller. Note, the semantics are | 60 // This makes animations latch to a single scroller. Note, the semantics are |
| 61 // currently somewhat different on Mac - see ScrollAnimatorMac.mm. | 61 // currently somewhat different on Mac - see ScrollAnimatorMac.mm. |
| 62 virtual ScrollResult userScroll(ScrollGranularity, const ScrollOffset& delta); | 62 virtual ScrollResult userScroll(ScrollGranularity, const ScrollOffset& delta); |
| 63 | 63 |
| 64 virtual void scrollToOffsetWithoutAnimation(const ScrollOffset&); | 64 virtual void scrollToOffsetWithoutAnimation(const ScrollOffset&); |
| 65 | 65 |
| 66 #if OS(MACOSX) | |
| 67 virtual void handleWheelEventPhase(PlatformWheelEventPhase) {} | |
| 68 #endif | |
| 69 | |
| 70 void setCurrentOffset(const ScrollOffset&); | 66 void setCurrentOffset(const ScrollOffset&); |
| 71 ScrollOffset currentOffset() const; | 67 ScrollOffset currentOffset() const; |
| 72 virtual ScrollOffset desiredTargetOffset() const { return currentOffset(); } | 68 virtual ScrollOffset desiredTargetOffset() const { return currentOffset(); } |
| 73 | 69 |
| 74 // Returns how much of pixelDelta will be used by the underlying scrollable | 70 // Returns how much of pixelDelta will be used by the underlying scrollable |
| 75 // area. | 71 // area. |
| 76 virtual ScrollOffset computeDeltaToConsume(const ScrollOffset& delta) const; | 72 virtual ScrollOffset computeDeltaToConsume(const ScrollOffset& delta) const; |
| 77 | 73 |
| 78 // ScrollAnimatorCompositorCoordinator implementation. | 74 // ScrollAnimatorCompositorCoordinator implementation. |
| 79 ScrollableArea* getScrollableArea() const override { | 75 ScrollableArea* getScrollableArea() const override { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 virtual void notifyOffsetChanged(); | 114 virtual void notifyOffsetChanged(); |
| 119 | 115 |
| 120 Member<ScrollableArea> m_scrollableArea; | 116 Member<ScrollableArea> m_scrollableArea; |
| 121 | 117 |
| 122 ScrollOffset m_currentOffset; | 118 ScrollOffset m_currentOffset; |
| 123 }; | 119 }; |
| 124 | 120 |
| 125 } // namespace blink | 121 } // namespace blink |
| 126 | 122 |
| 127 #endif // ScrollAnimatorBase_h | 123 #endif // ScrollAnimatorBase_h |
| OLD | NEW |