OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 static int maxOverlapBetweenPages(); | 55 static int maxOverlapBetweenPages(); |
56 | 56 |
57 bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); | 57 bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); |
58 void scrollToOffsetWithoutAnimation(const FloatPoint&); | 58 void scrollToOffsetWithoutAnimation(const FloatPoint&); |
59 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); | 59 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); |
60 | 60 |
61 // Should be called when the scroll position changes externally, for example
if the scroll layer position | 61 // Should be called when the scroll position changes externally, for example
if the scroll layer position |
62 // is updated on the scrolling thread and we need to notify the main thread. | 62 // is updated on the scrolling thread and we need to notify the main thread. |
63 void notifyScrollPositionChanged(const IntPoint&); | 63 void notifyScrollPositionChanged(const IntPoint&); |
64 | 64 |
| 65 static bool scrollBehaviorFromString(const String&, ScrollBehavior&); |
| 66 |
65 bool handleWheelEvent(const PlatformWheelEvent&); | 67 bool handleWheelEvent(const PlatformWheelEvent&); |
66 | 68 |
67 // Functions for controlling if you can scroll past the end of the document. | 69 // Functions for controlling if you can scroll past the end of the document. |
68 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling
ToContentEdge; } | 70 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling
ToContentEdge; } |
69 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd
ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; } | 71 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd
ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; } |
70 | 72 |
71 void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_vert
icalScrollElasticity = scrollElasticity; } | 73 void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_vert
icalScrollElasticity = scrollElasticity; } |
72 ScrollElasticity verticalScrollElasticity() const { return static_cast<Scrol
lElasticity>(m_verticalScrollElasticity); } | 74 ScrollElasticity verticalScrollElasticity() const { return static_cast<Scrol
lElasticity>(m_verticalScrollElasticity); } |
73 | 75 |
74 void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_ho
rizontalScrollElasticity = scrollElasticity; } | 76 void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_ho
rizontalScrollElasticity = scrollElasticity; } |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // vertical-lr / ltr NO NO | 250 // vertical-lr / ltr NO NO |
249 // vertical-lr / rtl NO YES | 251 // vertical-lr / rtl NO YES |
250 // vertical-rl / ltr YES NO | 252 // vertical-rl / ltr YES NO |
251 // vertical-rl / rtl YES YES | 253 // vertical-rl / rtl YES YES |
252 IntPoint m_scrollOrigin; | 254 IntPoint m_scrollOrigin; |
253 }; | 255 }; |
254 | 256 |
255 } // namespace WebCore | 257 } // namespace WebCore |
256 | 258 |
257 #endif // ScrollableArea_h | 259 #endif // ScrollableArea_h |
OLD | NEW |