| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // setHas*Scrollbar(true) is called, the existing scrollbar will be reat
tached. When | 127 // setHas*Scrollbar(true) is called, the existing scrollbar will be reat
tached. When |
| 128 // setCanDetachScrollbars(false) is called, any detached scrollbars will
be destructed. | 128 // setCanDetachScrollbars(false) is called, any detached scrollbars will
be destructed. |
| 129 bool canDetachScrollbars() const { return m_canDetachScrollbars; } | 129 bool canDetachScrollbars() const { return m_canDetachScrollbars; } |
| 130 void setCanDetachScrollbars(bool); | 130 void setCanDetachScrollbars(bool); |
| 131 | 131 |
| 132 Scrollbar* horizontalScrollbar() const { return m_hBarIsAttached ? m_hBa
r.get(): nullptr; } | 132 Scrollbar* horizontalScrollbar() const { return m_hBarIsAttached ? m_hBa
r.get(): nullptr; } |
| 133 Scrollbar* verticalScrollbar() const { return m_vBarIsAttached ? m_vBar.
get() : nullptr; } | 133 Scrollbar* verticalScrollbar() const { return m_vBarIsAttached ? m_vBar.
get() : nullptr; } |
| 134 bool hasHorizontalScrollbar() const { return horizontalScrollbar(); } | 134 bool hasHorizontalScrollbar() const { return horizontalScrollbar(); } |
| 135 bool hasVerticalScrollbar() const { return verticalScrollbar(); } | 135 bool hasVerticalScrollbar() const { return verticalScrollbar(); } |
| 136 | 136 |
| 137 void setHasHorizontalScrollbar(bool hasScrollbar); | 137 void setHasHorizontalScrollbar(bool hasScrollbar, bool useCustomScrollba
rStyle); |
| 138 void setHasVerticalScrollbar(bool hasScrollbar); | 138 void setHasVerticalScrollbar(bool hasScrollbar, bool useCustomScrollbarS
tyle); |
| 139 | 139 |
| 140 DECLARE_TRACE(); | 140 DECLARE_TRACE(); |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation); | 143 PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation,
bool useCustomScrollbarStyle); |
| 144 void destroyScrollbar(ScrollbarOrientation); | 144 void destroyScrollbar(ScrollbarOrientation); |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 RawPtrWillBeMember<PaintLayerScrollableArea> m_scrollableArea; | 147 RawPtrWillBeMember<PaintLayerScrollableArea> m_scrollableArea; |
| 148 | 148 |
| 149 // The scrollbars associated with m_scrollableArea. Both can nullptr. | 149 // The scrollbars associated with m_scrollableArea. Both can nullptr. |
| 150 RefPtrWillBeMember<Scrollbar> m_hBar; | 150 RefPtrWillBeMember<Scrollbar> m_hBar; |
| 151 RefPtrWillBeMember<Scrollbar> m_vBar; | 151 RefPtrWillBeMember<Scrollbar> m_vBar; |
| 152 | 152 |
| 153 unsigned m_canDetachScrollbars: 1; | 153 unsigned m_canDetachScrollbars: 1; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 private: | 343 private: |
| 344 explicit PaintLayerScrollableArea(PaintLayer&); | 344 explicit PaintLayerScrollableArea(PaintLayer&); |
| 345 | 345 |
| 346 bool hasHorizontalOverflow() const; | 346 bool hasHorizontalOverflow() const; |
| 347 bool hasVerticalOverflow() const; | 347 bool hasVerticalOverflow() const; |
| 348 bool hasScrollableHorizontalOverflow() const; | 348 bool hasScrollableHorizontalOverflow() const; |
| 349 bool hasScrollableVerticalOverflow() const; | 349 bool hasScrollableVerticalOverflow() const; |
| 350 bool visualViewportSuppliesScrollbars() const; | 350 bool visualViewportSuppliesScrollbars() const; |
| 351 | 351 |
| 352 bool useCustomScrollbarStyle() const; |
| 352 bool needsScrollbarReconstruction() const; | 353 bool needsScrollbarReconstruction() const; |
| 353 | 354 |
| 354 void computeScrollDimensions(); | 355 void computeScrollDimensions(); |
| 355 | 356 |
| 356 void setScrollOffset(const IntPoint&, ScrollType) override; | 357 void setScrollOffset(const IntPoint&, ScrollType) override; |
| 357 void setScrollOffset(const DoublePoint&, ScrollType) override; | 358 void setScrollOffset(const DoublePoint&, ScrollType) override; |
| 358 | 359 |
| 359 int verticalScrollbarStart(int minX, int maxX) const; | 360 int verticalScrollbarStart(int minX, int maxX) const; |
| 360 int horizontalScrollbarStart(int minX) const; | 361 int horizontalScrollbarStart(int minX) const; |
| 361 IntSize scrollbarOffset(const Scrollbar&) const; | 362 IntSize scrollbarOffset(const Scrollbar&) const; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 #endif | 426 #endif |
| 426 }; | 427 }; |
| 427 | 428 |
| 428 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, | 429 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, |
| 429 scrollableArea->isPaintLayerScrollableArea(), | 430 scrollableArea->isPaintLayerScrollableArea(), |
| 430 scrollableArea.isPaintLayerScrollableArea()); | 431 scrollableArea.isPaintLayerScrollableArea()); |
| 431 | 432 |
| 432 } // namespace blink | 433 } // namespace blink |
| 433 | 434 |
| 434 #endif // LayerScrollableArea_h | 435 #endif // LayerScrollableArea_h |
| OLD | NEW |