| 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 28 matching lines...) Expand all Loading... |
| 39 * other provisions required by the MPL or the GPL, as the case may be. | 39 * other provisions required by the MPL or the GPL, as the case may be. |
| 40 * If you do not delete the provisions above, a recipient may use your | 40 * If you do not delete the provisions above, a recipient may use your |
| 41 * version of this file under any of the LGPL, the MPL or the GPL. | 41 * version of this file under any of the LGPL, the MPL or the GPL. |
| 42 */ | 42 */ |
| 43 | 43 |
| 44 #ifndef PaintLayerScrollableArea_h | 44 #ifndef PaintLayerScrollableArea_h |
| 45 #define PaintLayerScrollableArea_h | 45 #define PaintLayerScrollableArea_h |
| 46 | 46 |
| 47 #include "core/CoreExport.h" | 47 #include "core/CoreExport.h" |
| 48 #include "core/layout/LayoutBox.h" | 48 #include "core/layout/LayoutBox.h" |
| 49 #include "core/layout/ScrollAnchor.h" |
| 49 #include "core/paint/PaintInvalidationCapableScrollableArea.h" | 50 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
| 50 #include "core/paint/PaintLayerFragment.h" | 51 #include "core/paint/PaintLayerFragment.h" |
| 51 #include "platform/heap/Handle.h" | 52 #include "platform/heap/Handle.h" |
| 52 | 53 |
| 53 namespace blink { | 54 namespace blink { |
| 54 | 55 |
| 55 enum ResizerHitTestType { | 56 enum ResizerHitTestType { |
| 56 ResizerForPointer, | 57 ResizerForPointer, |
| 57 ResizerForTouch | 58 ResizerForTouch |
| 58 }; | 59 }; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 327 |
| 327 LayoutScrollbarPart* resizer() const override { return m_resizer; } | 328 LayoutScrollbarPart* resizer() const override { return m_resizer; } |
| 328 | 329 |
| 329 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol
lbarOffset; } | 330 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol
lbarOffset; } |
| 330 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl
ayScrollbarOffset = offset; } | 331 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl
ayScrollbarOffset = offset; } |
| 331 | 332 |
| 332 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; | 333 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; |
| 333 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; | 334 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; |
| 334 | 335 |
| 335 Widget* widget() override; | 336 Widget* widget() override; |
| 337 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } |
| 336 bool isPaintLayerScrollableArea() const override { return true; } | 338 bool isPaintLayerScrollableArea() const override { return true; } |
| 337 | 339 |
| 338 DECLARE_VIRTUAL_TRACE(); | 340 DECLARE_VIRTUAL_TRACE(); |
| 339 | 341 |
| 340 private: | 342 private: |
| 341 explicit PaintLayerScrollableArea(PaintLayer&); | 343 explicit PaintLayerScrollableArea(PaintLayer&); |
| 342 | 344 |
| 343 bool hasHorizontalOverflow() const; | 345 bool hasHorizontalOverflow() const; |
| 344 bool hasVerticalOverflow() const; | 346 bool hasVerticalOverflow() const; |
| 345 bool hasScrollableHorizontalOverflow() const; | 347 bool hasScrollableHorizontalOverflow() const; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 DoubleSize m_scrollOffset; | 404 DoubleSize m_scrollOffset; |
| 403 | 405 |
| 404 IntPoint m_cachedOverlayScrollbarOffset; | 406 IntPoint m_cachedOverlayScrollbarOffset; |
| 405 | 407 |
| 406 // LayoutObject to hold our custom scroll corner. | 408 // LayoutObject to hold our custom scroll corner. |
| 407 LayoutScrollbarPart* m_scrollCorner; | 409 LayoutScrollbarPart* m_scrollCorner; |
| 408 | 410 |
| 409 // LayoutObject to hold our custom resizer. | 411 // LayoutObject to hold our custom resizer. |
| 410 LayoutScrollbarPart* m_resizer; | 412 LayoutScrollbarPart* m_resizer; |
| 411 | 413 |
| 414 ScrollAnchor m_scrollAnchor; |
| 415 |
| 412 #if ENABLE(ASSERT) | 416 #if ENABLE(ASSERT) |
| 413 bool m_hasBeenDisposed; | 417 bool m_hasBeenDisposed; |
| 414 #endif | 418 #endif |
| 415 }; | 419 }; |
| 416 | 420 |
| 417 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, | 421 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, |
| 418 scrollableArea->isPaintLayerScrollableArea(), | 422 scrollableArea->isPaintLayerScrollableArea(), |
| 419 scrollableArea.isPaintLayerScrollableArea()); | 423 scrollableArea.isPaintLayerScrollableArea()); |
| 420 | 424 |
| 421 } // namespace blink | 425 } // namespace blink |
| 422 | 426 |
| 423 #endif // LayerScrollableArea_h | 427 #endif // LayerScrollableArea_h |
| OLD | NEW |