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