| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 WTF_MAKE_NONCOPYABLE(ScrollableArea); | 58 WTF_MAKE_NONCOPYABLE(ScrollableArea); |
| 59 public: | 59 public: |
| 60 static int pixelsPerLineStep(); | 60 static int pixelsPerLineStep(); |
| 61 static float minFractionToStepWhenPaging(); | 61 static float minFractionToStepWhenPaging(); |
| 62 static int maxOverlapBetweenPages(); | 62 static int maxOverlapBetweenPages(); |
| 63 | 63 |
| 64 // The window that hosts the ScrollableArea. The ScrollableArea will communi
cate scrolls and repaints to the | 64 // The window that hosts the ScrollableArea. The ScrollableArea will communi
cate scrolls and repaints to the |
| 65 // host window in the window's coordinate space. | 65 // host window in the window's coordinate space. |
| 66 virtual HostWindow* hostWindow() const { return 0; }; | 66 virtual HostWindow* hostWindow() const { return 0; }; |
| 67 | 67 |
| 68 bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); | 68 ScrollResultOneDimensional scroll(ScrollDirection, ScrollGranularity, float
delta = 1); |
| 69 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe
haviorInstant); | 69 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe
haviorInstant); |
| 70 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat
icAnimations = true); | 70 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat
icAnimations = true); |
| 71 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); | 71 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); |
| 72 | 72 |
| 73 void programmaticallyScrollSmoothlyToOffset(const FloatPoint&); | 73 void programmaticallyScrollSmoothlyToOffset(const FloatPoint&); |
| 74 | 74 |
| 75 // Should be called when the scroll position changes externally, for example
if the scroll layer position | 75 // Should be called when the scroll position changes externally, for example
if the scroll layer position |
| 76 // is updated on the scrolling thread and we need to notify the main thread. | 76 // is updated on the scrolling thread and we need to notify the main thread. |
| 77 void notifyScrollPositionChanged(const DoublePoint&); | 77 void notifyScrollPositionChanged(const DoublePoint&); |
| 78 | 78 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // vertical-lr / ltr NO NO | 315 // vertical-lr / ltr NO NO |
| 316 // vertical-lr / rtl NO YES | 316 // vertical-lr / rtl NO YES |
| 317 // vertical-rl / ltr YES NO | 317 // vertical-rl / ltr YES NO |
| 318 // vertical-rl / rtl YES YES | 318 // vertical-rl / rtl YES YES |
| 319 IntPoint m_scrollOrigin; | 319 IntPoint m_scrollOrigin; |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 } // namespace blink | 322 } // namespace blink |
| 323 | 323 |
| 324 #endif // ScrollableArea_h | 324 #endif // ScrollableArea_h |
| OLD | NEW |