| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 324 |
| 324 LayoutScrollbarPart* resizer() const override { return m_resizer; } | 325 LayoutScrollbarPart* resizer() const override { return m_resizer; } |
| 325 | 326 |
| 326 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol
lbarOffset; } | 327 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol
lbarOffset; } |
| 327 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl
ayScrollbarOffset = offset; } | 328 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl
ayScrollbarOffset = offset; } |
| 328 | 329 |
| 329 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; | 330 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; |
| 330 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; | 331 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; |
| 331 | 332 |
| 332 Widget* widget() override; | 333 Widget* widget() override; |
| 334 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } |
| 333 bool isPaintLayerScrollableArea() const override { return true; } | 335 bool isPaintLayerScrollableArea() const override { return true; } |
| 334 | 336 |
| 335 DECLARE_VIRTUAL_TRACE(); | 337 DECLARE_VIRTUAL_TRACE(); |
| 336 | 338 |
| 337 private: | 339 private: |
| 338 explicit PaintLayerScrollableArea(PaintLayer&); | 340 explicit PaintLayerScrollableArea(PaintLayer&); |
| 339 | 341 |
| 340 bool hasHorizontalOverflow() const; | 342 bool hasHorizontalOverflow() const; |
| 341 bool hasVerticalOverflow() const; | 343 bool hasVerticalOverflow() const; |
| 342 bool hasScrollableHorizontalOverflow() const; | 344 bool hasScrollableHorizontalOverflow() const; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 364 void updateResizerStyle(); | 366 void updateResizerStyle(); |
| 365 | 367 |
| 366 | 368 |
| 367 void updateScrollableAreaSet(bool hasOverflow); | 369 void updateScrollableAreaSet(bool hasOverflow); |
| 368 | 370 |
| 369 void updateCompositingLayersAfterScroll(); | 371 void updateCompositingLayersAfterScroll(); |
| 370 | 372 |
| 371 // PaintInvalidationCapableScrollableArea | 373 // PaintInvalidationCapableScrollableArea |
| 372 LayoutBox& boxForScrollControlPaintInvalidation() const { return box(); } | 374 LayoutBox& boxForScrollControlPaintInvalidation() const { return box(); } |
| 373 | 375 |
| 376 bool scrollAnchoringEnabled() const; |
| 377 |
| 374 PaintLayer& m_layer; | 378 PaintLayer& m_layer; |
| 375 | 379 |
| 376 // Keeps track of whether the layer is currently resizing, so events can cau
se resizing to start and stop. | 380 // Keeps track of whether the layer is currently resizing, so events can cau
se resizing to start and stop. |
| 377 unsigned m_inResizeMode : 1; | 381 unsigned m_inResizeMode : 1; |
| 378 unsigned m_scrollsOverflow : 1; | 382 unsigned m_scrollsOverflow : 1; |
| 379 | 383 |
| 380 unsigned m_inOverflowRelayout : 1; | 384 unsigned m_inOverflowRelayout : 1; |
| 381 | 385 |
| 382 PaintLayer* m_nextTopmostScrollChild; | 386 PaintLayer* m_nextTopmostScrollChild; |
| 383 PaintLayer* m_topmostScrollChild; | 387 PaintLayer* m_topmostScrollChild; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 399 DoubleSize m_scrollOffset; | 403 DoubleSize m_scrollOffset; |
| 400 | 404 |
| 401 IntPoint m_cachedOverlayScrollbarOffset; | 405 IntPoint m_cachedOverlayScrollbarOffset; |
| 402 | 406 |
| 403 // LayoutObject to hold our custom scroll corner. | 407 // LayoutObject to hold our custom scroll corner. |
| 404 LayoutScrollbarPart* m_scrollCorner; | 408 LayoutScrollbarPart* m_scrollCorner; |
| 405 | 409 |
| 406 // LayoutObject to hold our custom resizer. | 410 // LayoutObject to hold our custom resizer. |
| 407 LayoutScrollbarPart* m_resizer; | 411 LayoutScrollbarPart* m_resizer; |
| 408 | 412 |
| 413 ScrollAnchor m_scrollAnchor; |
| 414 |
| 409 #if ENABLE(ASSERT) | 415 #if ENABLE(ASSERT) |
| 410 bool m_hasBeenDisposed; | 416 bool m_hasBeenDisposed; |
| 411 #endif | 417 #endif |
| 412 }; | 418 }; |
| 413 | 419 |
| 414 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, | 420 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, |
| 415 scrollableArea->isPaintLayerScrollableArea(), | 421 scrollableArea->isPaintLayerScrollableArea(), |
| 416 scrollableArea.isPaintLayerScrollableArea()); | 422 scrollableArea.isPaintLayerScrollableArea()); |
| 417 | 423 |
| 418 } // namespace blink | 424 } // namespace blink |
| 419 | 425 |
| 420 #endif // LayerScrollableArea_h | 426 #endif // LayerScrollableArea_h |
| OLD | NEW |