OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 virtual IntSize contentsSize() const OVERRIDE; | 103 virtual IntSize contentsSize() const OVERRIDE; |
104 virtual IntSize overhangAmount() const OVERRIDE; | 104 virtual IntSize overhangAmount() const OVERRIDE; |
105 virtual IntPoint lastKnownMousePosition() const OVERRIDE; | 105 virtual IntPoint lastKnownMousePosition() const OVERRIDE; |
106 virtual bool shouldSuspendScrollAnimations() const OVERRIDE; | 106 virtual bool shouldSuspendScrollAnimations() const OVERRIDE; |
107 virtual bool scrollbarsCanBeActive() const OVERRIDE; | 107 virtual bool scrollbarsCanBeActive() const OVERRIDE; |
108 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; | 108 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; |
109 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE; | 109 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE; |
110 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; | 110 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; |
111 virtual int pageStep(ScrollbarOrientation) const OVERRIDE; | 111 virtual int pageStep(ScrollbarOrientation) const OVERRIDE; |
112 | 112 |
| 113 virtual bool registerForAnimation() OVERRIDE; |
| 114 virtual void deregisterForAnimation() OVERRIDE; |
| 115 virtual bool scheduleAnimation() OVERRIDE; |
| 116 |
113 int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x
(); } | 117 int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x
(); } |
114 int scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin().
y(); } | 118 int scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin().
y(); } |
115 | 119 |
116 IntSize scrollOffset() const { return m_scrollOffset; } | 120 IntSize scrollOffset() const { return m_scrollOffset; } |
117 | 121 |
118 // FIXME: We shouldn't allow access to m_overflowRect outside this class. | 122 // FIXME: We shouldn't allow access to m_overflowRect outside this class. |
119 LayoutRect overflowRect() const { return m_overflowRect; } | 123 LayoutRect overflowRect() const { return m_overflowRect; } |
120 | 124 |
121 void scrollToOffset(const IntSize& scrollOffset, ScrollOffsetClamping = Scro
llOffsetUnclamped); | 125 void scrollToOffset(const IntSize& scrollOffset, ScrollOffsetClamping = Scro
llOffsetUnclamped, ScrollBehavior = ScrollBehaviorInstant); |
122 void scrollToXOffset(int x, ScrollOffsetClamping clamp = ScrollOffsetUnclamp
ed) { scrollToOffset(IntSize(x, scrollYOffset()), clamp); } | 126 void scrollToXOffset(int x, ScrollOffsetClamping clamp = ScrollOffsetUnclamp
ed, ScrollBehavior scrollBehavior = ScrollBehaviorInstant) |
123 void scrollToYOffset(int y, ScrollOffsetClamping clamp = ScrollOffsetUnclamp
ed) { scrollToOffset(IntSize(scrollXOffset(), y), clamp); } | 127 { |
| 128 scrollToOffset(IntSize(x, scrollYOffset()), clamp, scrollBehavior); |
| 129 } |
| 130 void scrollToYOffset(int y, ScrollOffsetClamping clamp = ScrollOffsetUnclamp
ed, ScrollBehavior scrollBehavior = ScrollBehaviorInstant) |
| 131 { |
| 132 scrollToOffset(IntSize(scrollXOffset(), y), clamp, scrollBehavior); |
| 133 } |
124 | 134 |
125 void updateAfterLayout(); | 135 void updateAfterLayout(); |
126 void updateAfterStyleChange(const RenderStyle*); | 136 void updateAfterStyleChange(const RenderStyle*); |
127 | 137 |
128 bool hasScrollbar() const { return m_hBar || m_vBar; } | 138 bool hasScrollbar() const { return m_hBar || m_vBar; } |
129 | 139 |
130 // FIXME: This should be removed. | 140 // FIXME: This should be removed. |
131 bool hasScrollCorner() const { return m_scrollCorner; } | 141 bool hasScrollCorner() const { return m_scrollCorner; } |
132 | 142 |
133 void resize(const PlatformEvent&, const LayoutSize&); | 143 void resize(const PlatformEvent&, const LayoutSize&); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 void updateScrollableAreaSet(bool hasOverflow); | 229 void updateScrollableAreaSet(bool hasOverflow); |
220 | 230 |
221 void updateCompositingLayersAfterScroll(); | 231 void updateCompositingLayersAfterScroll(); |
222 virtual void updateNeedsCompositedScrolling() OVERRIDE; | 232 virtual void updateNeedsCompositedScrolling() OVERRIDE; |
223 bool setNeedsCompositedScrolling(bool); | 233 bool setNeedsCompositedScrolling(bool); |
224 | 234 |
225 virtual void updateHasVisibleNonLayerContent() OVERRIDE; | 235 virtual void updateHasVisibleNonLayerContent() OVERRIDE; |
226 | 236 |
227 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); | 237 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); |
228 | 238 |
| 239 virtual bool compositedScrollAnimationsEnabled() const OVERRIDE; |
| 240 |
229 RenderBox* m_box; | 241 RenderBox* m_box; |
230 | 242 |
231 // Keeps track of whether the layer is currently resizing, so events can cau
se resizing to start and stop. | 243 // Keeps track of whether the layer is currently resizing, so events can cau
se resizing to start and stop. |
232 unsigned m_inResizeMode : 1; | 244 unsigned m_inResizeMode : 1; |
233 | 245 |
234 unsigned m_scrollDimensionsDirty : 1; | 246 unsigned m_scrollDimensionsDirty : 1; |
235 unsigned m_inOverflowRelayout : 1; | 247 unsigned m_inOverflowRelayout : 1; |
236 | 248 |
237 unsigned m_needsCompositedScrolling : 1; | 249 unsigned m_needsCompositedScrolling : 1; |
238 unsigned m_willUseCompositedScrollingHasBeenRecorded : 1; | 250 unsigned m_willUseCompositedScrollingHasBeenRecorded : 1; |
(...skipping 17 matching lines...) Expand all Loading... |
256 // Renderers to hold our custom scroll corner. | 268 // Renderers to hold our custom scroll corner. |
257 RenderScrollbarPart* m_scrollCorner; | 269 RenderScrollbarPart* m_scrollCorner; |
258 | 270 |
259 // Renderers to hold our custom resizer. | 271 // Renderers to hold our custom resizer. |
260 RenderScrollbarPart* m_resizer; | 272 RenderScrollbarPart* m_resizer; |
261 }; | 273 }; |
262 | 274 |
263 } // Namespace WebCore | 275 } // Namespace WebCore |
264 | 276 |
265 #endif // RenderLayerScrollableArea_h | 277 #endif // RenderLayerScrollableArea_h |
OLD | NEW |