| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 virtual IntPoint scrollPosition() const = 0; | 117 virtual IntPoint scrollPosition() const = 0; |
| 118 virtual IntPoint minimumScrollPosition() const = 0; | 118 virtual IntPoint minimumScrollPosition() const = 0; |
| 119 virtual IntPoint maximumScrollPosition() const = 0; | 119 virtual IntPoint maximumScrollPosition() const = 0; |
| 120 | 120 |
| 121 virtual IntSize contentsSize() const = 0; | 121 virtual IntSize contentsSize() const = 0; |
| 122 | 122 |
| 123 bool shouldSuspendScrollAnimations() const { return true; } | 123 bool shouldSuspendScrollAnimations() const { return true; } |
| 124 | 124 |
| 125 IntPoint clampScrollPosition(const IntPoint&) const; | 125 IntPoint clampScrollPosition(const IntPoint&) const; |
| 126 | 126 |
| 127 // Let subclasses provide a way of asking for and servicing scroll | |
| 128 // animations. | |
| 129 bool scheduleAnimation(); | |
| 130 void serviceScrollAnimations(double monotonicTime); | |
| 131 | |
| 132 // Returns true if the GraphicsLayer tree needs to be rebuilt. | 127 // Returns true if the GraphicsLayer tree needs to be rebuilt. |
| 133 virtual bool updateAfterCompositingChange() = 0; | 128 virtual bool updateAfterCompositingChange() = 0; |
| 134 | 129 |
| 135 virtual bool userInputScrollable(ScrollbarOrientation) const = 0; | 130 virtual bool userInputScrollable(ScrollbarOrientation) const = 0; |
| 136 virtual bool shouldPlaceVerticalScrollbarOnLeft() const = 0; | 131 virtual bool shouldPlaceVerticalScrollbarOnLeft() const = 0; |
| 137 | 132 |
| 138 int scrollPosition(ScrollbarOrientation orientation) { return orientation ==
HorizontalScrollbar ? scrollPosition().x() : scrollPosition().y(); } | 133 int scrollPosition(ScrollbarOrientation orientation) { return orientation ==
HorizontalScrollbar ? scrollPosition().x() : scrollPosition().y(); } |
| 139 int minimumScrollPosition(ScrollbarOrientation orientation) { return orienta
tion == HorizontalScrollbar ? minimumScrollPosition().x() : minimumScrollPositio
n().y(); } | 134 int minimumScrollPosition(ScrollbarOrientation orientation) { return orienta
tion == HorizontalScrollbar ? minimumScrollPosition().x() : minimumScrollPositio
n().y(); } |
| 140 int maximumScrollPosition(ScrollbarOrientation orientation) { return orienta
tion == HorizontalScrollbar ? maximumScrollPosition().x() : maximumScrollPositio
n().y(); } | 135 int maximumScrollPosition(ScrollbarOrientation orientation) { return orienta
tion == HorizontalScrollbar ? maximumScrollPosition().x() : maximumScrollPositio
n().y(); } |
| 141 int clampScrollPosition(ScrollbarOrientation orientation, int pos) { return
std::max(std::min(pos, maximumScrollPosition(orientation)), minimumScrollPositi
on(orientation)); } | 136 int clampScrollPosition(ScrollbarOrientation orientation, int pos) { return
std::max(std::min(pos, maximumScrollPosition(orientation)), minimumScrollPositi
on(orientation)); } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // vertical-lr / ltr NO NO | 180 // vertical-lr / ltr NO NO |
| 186 // vertical-lr / rtl NO YES | 181 // vertical-lr / rtl NO YES |
| 187 // vertical-rl / ltr YES NO | 182 // vertical-rl / ltr YES NO |
| 188 // vertical-rl / rtl YES YES | 183 // vertical-rl / rtl YES YES |
| 189 IntPoint m_scrollOrigin; | 184 IntPoint m_scrollOrigin; |
| 190 }; | 185 }; |
| 191 | 186 |
| 192 } // namespace blink | 187 } // namespace blink |
| 193 | 188 |
| 194 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLABLEAREA_H_ | 189 #endif // SKY_ENGINE_PLATFORM_SCROLL_SCROLLABLEAREA_H_ |
| OLD | NEW |