| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/ScrollAnchor.h" | 48 #include "core/layout/ScrollAnchor.h" |
| 49 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" | 49 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" |
| 50 #include "core/paint/PaintInvalidationCapableScrollableArea.h" | 50 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
| 51 #include "core/paint/PaintLayerFragment.h" | 51 #include "core/paint/PaintLayerFragment.h" |
| 52 #include "core/paint/ScrollbarManager.h" | 52 #include "core/paint/ScrollbarManager.h" |
| 53 #include "platform/heap/Handle.h" | 53 #include "platform/heap/Handle.h" |
| 54 #include "platform/scroll/MainThreadScrollingReason.h" |
| 54 #include "wtf/PtrUtil.h" | 55 #include "wtf/PtrUtil.h" |
| 55 #include <memory> | 56 #include <memory> |
| 56 | 57 |
| 57 namespace blink { | 58 namespace blink { |
| 58 | 59 |
| 59 enum ResizerHitTestType { ResizerForPointer, ResizerForTouch }; | 60 enum ResizerHitTestType { ResizerForPointer, ResizerForTouch }; |
| 60 | 61 |
| 61 class ComputedStyle; | 62 class ComputedStyle; |
| 62 class HitTestResult; | 63 class HitTestResult; |
| 63 class LayoutBox; | 64 class LayoutBox; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 m_hadVerticalScrollbarBeforeRelayout = val; | 469 m_hadVerticalScrollbarBeforeRelayout = val; |
| 469 } | 470 } |
| 470 | 471 |
| 471 StickyConstraintsMap& stickyConstraintsMap() { | 472 StickyConstraintsMap& stickyConstraintsMap() { |
| 472 return ensureRareData().m_stickyConstraintsMap; | 473 return ensureRareData().m_stickyConstraintsMap; |
| 473 } | 474 } |
| 474 void invalidateAllStickyConstraints(); | 475 void invalidateAllStickyConstraints(); |
| 475 void invalidateStickyConstraintsFor(PaintLayer*, | 476 void invalidateStickyConstraintsFor(PaintLayer*, |
| 476 bool needsCompositingUpdate = true); | 477 bool needsCompositingUpdate = true); |
| 477 | 478 |
| 479 bool hasMainThreadScrollingReason(uint32_t reason) const { |
| 480 return m_reasons & reason; |
| 481 } |
| 482 void flipMainThreadScrollingReason(uint32_t reason) { m_reasons ^= reason; } |
| 483 |
| 478 uint64_t id() const; | 484 uint64_t id() const; |
| 479 | 485 |
| 480 DECLARE_VIRTUAL_TRACE(); | 486 DECLARE_VIRTUAL_TRACE(); |
| 481 | 487 |
| 482 private: | 488 private: |
| 483 explicit PaintLayerScrollableArea(PaintLayer&); | 489 explicit PaintLayerScrollableArea(PaintLayer&); |
| 484 | 490 |
| 485 bool hasHorizontalOverflow() const; | 491 bool hasHorizontalOverflow() const; |
| 486 bool hasVerticalOverflow() const; | 492 bool hasVerticalOverflow() const; |
| 487 bool hasScrollableHorizontalOverflow() const; | 493 bool hasScrollableHorizontalOverflow() const; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 // LayoutObject to hold our custom scroll corner. | 578 // LayoutObject to hold our custom scroll corner. |
| 573 LayoutScrollbarPart* m_scrollCorner; | 579 LayoutScrollbarPart* m_scrollCorner; |
| 574 | 580 |
| 575 // LayoutObject to hold our custom resizer. | 581 // LayoutObject to hold our custom resizer. |
| 576 LayoutScrollbarPart* m_resizer; | 582 LayoutScrollbarPart* m_resizer; |
| 577 | 583 |
| 578 ScrollAnchor m_scrollAnchor; | 584 ScrollAnchor m_scrollAnchor; |
| 579 | 585 |
| 580 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData; | 586 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData; |
| 581 | 587 |
| 588 // MainThreadScrollingReason due to the property of each layout object |
| 589 uint32_t m_reasons; |
| 590 |
| 582 #if ENABLE(ASSERT) | 591 #if ENABLE(ASSERT) |
| 583 bool m_hasBeenDisposed; | 592 bool m_hasBeenDisposed; |
| 584 #endif | 593 #endif |
| 585 }; | 594 }; |
| 586 | 595 |
| 587 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, | 596 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, |
| 588 ScrollableArea, | 597 ScrollableArea, |
| 589 scrollableArea, | 598 scrollableArea, |
| 590 scrollableArea->isPaintLayerScrollableArea(), | 599 scrollableArea->isPaintLayerScrollableArea(), |
| 591 scrollableArea.isPaintLayerScrollableArea()); | 600 scrollableArea.isPaintLayerScrollableArea()); |
| 592 | 601 |
| 593 } // namespace blink | 602 } // namespace blink |
| 594 | 603 |
| 595 #endif // LayerScrollableArea_h | 604 #endif // LayerScrollableArea_h |
| OLD | NEW |