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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // a new one. | 136 // a new one. |
137 public: | 137 public: |
138 ScrollbarManager(PaintLayerScrollableArea& scroller) | 138 ScrollbarManager(PaintLayerScrollableArea& scroller) |
139 : blink::ScrollbarManager(scroller) {} | 139 : blink::ScrollbarManager(scroller) {} |
140 | 140 |
141 void SetHasHorizontalScrollbar(bool has_scrollbar) override; | 141 void SetHasHorizontalScrollbar(bool has_scrollbar) override; |
142 void SetHasVerticalScrollbar(bool has_scrollbar) override; | 142 void SetHasVerticalScrollbar(bool has_scrollbar) override; |
143 | 143 |
144 void DestroyDetachedScrollbars(); | 144 void DestroyDetachedScrollbars(); |
145 | 145 |
146 protected: | |
147 Scrollbar* CreateScrollbar(ScrollbarOrientation) override; | |
148 void DestroyScrollbar(ScrollbarOrientation) override; | |
149 | |
150 PaintLayerScrollableArea* ScrollableArea(); | 146 PaintLayerScrollableArea* ScrollableArea(); |
151 }; | 147 }; |
152 | 148 |
153 public: | 149 public: |
154 // If a PreventRelayoutScope object is alive, updateAfterLayout() will not | 150 // If a PreventRelayoutScope object is alive, updateAfterLayout() will not |
155 // re-run box layout as a result of adding or removing scrollbars. | 151 // re-run box layout as a result of adding or removing scrollbars. |
156 // Instead, it will mark the PLSA as needing relayout of its box. | 152 // Instead, it will mark the PLSA as needing relayout of its box. |
157 // When the last PreventRelayoutScope object is popped off the stack, | 153 // When the last PreventRelayoutScope object is popped off the stack, |
158 // box().setNeedsLayout(), and box().scrollbarsChanged() for LayoutBlock's, | 154 // box().setNeedsLayout(), and box().scrollbarsChanged() for LayoutBlock's, |
159 // will be called as appropriate for all marked PLSA's. | 155 // will be called as appropriate for all marked PLSA's. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 static PaintLayerScrollableArea* Create(PaintLayer& layer) { | 217 static PaintLayerScrollableArea* Create(PaintLayer& layer) { |
222 return new PaintLayerScrollableArea(layer); | 218 return new PaintLayerScrollableArea(layer); |
223 } | 219 } |
224 | 220 |
225 ~PaintLayerScrollableArea() override; | 221 ~PaintLayerScrollableArea() override; |
226 void Dispose(); | 222 void Dispose(); |
227 | 223 |
228 bool HasHorizontalScrollbar() const { return HorizontalScrollbar(); } | 224 bool HasHorizontalScrollbar() const { return HorizontalScrollbar(); } |
229 bool HasVerticalScrollbar() const { return VerticalScrollbar(); } | 225 bool HasVerticalScrollbar() const { return VerticalScrollbar(); } |
230 | 226 |
| 227 void WillRemoveScrollbar(Scrollbar&, ScrollbarOrientation) override; |
| 228 |
231 Scrollbar* HorizontalScrollbar() const override { | 229 Scrollbar* HorizontalScrollbar() const override { |
232 return scrollbar_manager_.HorizontalScrollbar(); | 230 return scrollbar_manager_.HorizontalScrollbar(); |
233 } | 231 } |
234 Scrollbar* VerticalScrollbar() const override { | 232 Scrollbar* VerticalScrollbar() const override { |
235 return scrollbar_manager_.VerticalScrollbar(); | 233 return scrollbar_manager_.VerticalScrollbar(); |
236 } | 234 } |
237 | 235 |
238 PlatformChromeClient* GetChromeClient() const override; | 236 PlatformChromeClient* GetChromeClient() const override; |
239 | 237 |
240 SmoothScrollSequencer* GetSmoothScrollSequencer() const override; | 238 SmoothScrollSequencer* GetSmoothScrollSequencer() const override; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 IntSize ScrollOffsetInt() const override; | 271 IntSize ScrollOffsetInt() const override; |
274 ScrollOffset GetScrollOffset() const override; | 272 ScrollOffset GetScrollOffset() const override; |
275 IntSize MinimumScrollOffsetInt() const override; | 273 IntSize MinimumScrollOffsetInt() const override; |
276 IntSize MaximumScrollOffsetInt() const override; | 274 IntSize MaximumScrollOffsetInt() const override; |
277 IntRect VisibleContentRect( | 275 IntRect VisibleContentRect( |
278 IncludeScrollbarsInRect = kExcludeScrollbars) const override; | 276 IncludeScrollbarsInRect = kExcludeScrollbars) const override; |
279 int VisibleHeight() const override; | 277 int VisibleHeight() const override; |
280 int VisibleWidth() const override; | 278 int VisibleWidth() const override; |
281 IntSize ContentsSize() const override; | 279 IntSize ContentsSize() const override; |
282 void ContentsResized() override; | 280 void ContentsResized() override; |
| 281 LayoutObject* LayoutObjectForScrollbarStyle() const override; |
283 bool IsScrollable() const override; | 282 bool IsScrollable() const override; |
284 IntPoint LastKnownMousePosition() const override; | 283 IntPoint LastKnownMousePosition() const override; |
285 bool ScrollAnimatorEnabled() const override; | 284 bool ScrollAnimatorEnabled() const override; |
286 bool ShouldSuspendScrollAnimations() const override; | 285 bool ShouldSuspendScrollAnimations() const override; |
287 bool ScrollbarsCanBeActive() const override; | 286 bool ScrollbarsCanBeActive() const override; |
288 void ScrollbarVisibilityChanged() override; | 287 void ScrollbarVisibilityChanged() override; |
289 void ScrollbarFrameRectChanged() override; | 288 void ScrollbarFrameRectChanged() override; |
290 IntRect ScrollableAreaBoundingBox() const override; | 289 IntRect ScrollableAreaBoundingBox() const override; |
291 void RegisterForAnimation() override; | 290 void RegisterForAnimation() override; |
292 void DeregisterForAnimation() override; | 291 void DeregisterForAnimation() override; |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 | 612 |
614 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, | 613 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, |
615 ScrollableArea, | 614 ScrollableArea, |
616 scrollableArea, | 615 scrollableArea, |
617 scrollableArea->IsPaintLayerScrollableArea(), | 616 scrollableArea->IsPaintLayerScrollableArea(), |
618 scrollableArea.IsPaintLayerScrollableArea()); | 617 scrollableArea.IsPaintLayerScrollableArea()); |
619 | 618 |
620 } // namespace blink | 619 } // namespace blink |
621 | 620 |
622 #endif // LayerScrollableArea_h | 621 #endif // LayerScrollableArea_h |
OLD | NEW |