| 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 18 matching lines...) Expand all Loading... |
| 29 #include "sky/engine/platform/PlatformExport.h" | 29 #include "sky/engine/platform/PlatformExport.h" |
| 30 #include "sky/engine/platform/scroll/ScrollAnimator.h" | 30 #include "sky/engine/platform/scroll/ScrollAnimator.h" |
| 31 #include "sky/engine/platform/scroll/Scrollbar.h" | 31 #include "sky/engine/platform/scroll/Scrollbar.h" |
| 32 #include "sky/engine/wtf/Noncopyable.h" | 32 #include "sky/engine/wtf/Noncopyable.h" |
| 33 #include "sky/engine/wtf/Vector.h" | 33 #include "sky/engine/wtf/Vector.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class FloatPoint; | 37 class FloatPoint; |
| 38 class HostWindow; | 38 class HostWindow; |
| 39 class PlatformWheelEvent; | |
| 40 class ScrollAnimator; | 39 class ScrollAnimator; |
| 41 | 40 |
| 42 enum ScrollBehavior { | 41 enum ScrollBehavior { |
| 43 ScrollBehaviorAuto, | 42 ScrollBehaviorAuto, |
| 44 ScrollBehaviorInstant, | 43 ScrollBehaviorInstant, |
| 45 ScrollBehaviorSmooth, | 44 ScrollBehaviorSmooth, |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 enum IncludeScrollbarsInRect { | 47 enum IncludeScrollbarsInRect { |
| 49 ExcludeScrollbars, | 48 ExcludeScrollbars, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 60 // The window that hosts the ScrollView. The ScrollView will communicate scr
olls and repaints to the | 59 // The window that hosts the ScrollView. The ScrollView will communicate scr
olls and repaints to the |
| 61 // host window in the window's coordinate space. | 60 // host window in the window's coordinate space. |
| 62 virtual HostWindow* hostWindow() const = 0; | 61 virtual HostWindow* hostWindow() const = 0; |
| 63 | 62 |
| 64 bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); | 63 bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); |
| 65 void scrollToOffsetWithoutAnimation(const FloatPoint&); | 64 void scrollToOffsetWithoutAnimation(const FloatPoint&); |
| 66 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); | 65 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); |
| 67 | 66 |
| 68 static bool scrollBehaviorFromString(const String&, ScrollBehavior&); | 67 static bool scrollBehaviorFromString(const String&, ScrollBehavior&); |
| 69 | 68 |
| 70 bool handleWheelEvent(const PlatformWheelEvent&); | |
| 71 | |
| 72 // 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. |
| 73 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling
ToContentEdge; } | 70 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling
ToContentEdge; } |
| 74 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd
ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; } | 71 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd
ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; } |
| 75 | 72 |
| 76 void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_vert
icalScrollElasticity = scrollElasticity; } | 73 void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_vert
icalScrollElasticity = scrollElasticity; } |
| 77 ScrollElasticity verticalScrollElasticity() const { return static_cast<Scrol
lElasticity>(m_verticalScrollElasticity); } | 74 ScrollElasticity verticalScrollElasticity() const { return static_cast<Scrol
lElasticity>(m_verticalScrollElasticity); } |
| 78 | 75 |
| 79 void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_ho
rizontalScrollElasticity = scrollElasticity; } | 76 void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_ho
rizontalScrollElasticity = scrollElasticity; } |
| 80 ScrollElasticity horizontalScrollElasticity() const { return static_cast<Scr
ollElasticity>(m_horizontalScrollElasticity); } | 77 ScrollElasticity horizontalScrollElasticity() const { return static_cast<Scr
ollElasticity>(m_horizontalScrollElasticity); } |
| 81 | 78 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // vertical-lr / ltr NO NO | 190 // vertical-lr / ltr NO NO |
| 194 // vertical-lr / rtl NO YES | 191 // vertical-lr / rtl NO YES |
| 195 // vertical-rl / ltr YES NO | 192 // vertical-rl / ltr YES NO |
| 196 // vertical-rl / rtl YES YES | 193 // vertical-rl / rtl YES YES |
| 197 IntPoint m_scrollOrigin; | 194 IntPoint m_scrollOrigin; |
| 198 }; | 195 }; |
| 199 | 196 |
| 200 } // namespace blink | 197 } // namespace blink |
| 201 | 198 |
| 202 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLABLEAREA_H_ | 199 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLABLEAREA_H_ |
| OLD | NEW |