| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 m_hadVerticalScrollbarBeforeRelayout = val; | 469 m_hadVerticalScrollbarBeforeRelayout = val; |
| 470 } | 470 } |
| 471 | 471 |
| 472 StickyConstraintsMap& stickyConstraintsMap() { | 472 StickyConstraintsMap& stickyConstraintsMap() { |
| 473 return ensureRareData().m_stickyConstraintsMap; | 473 return ensureRareData().m_stickyConstraintsMap; |
| 474 } | 474 } |
| 475 void invalidateAllStickyConstraints(); | 475 void invalidateAllStickyConstraints(); |
| 476 void invalidateStickyConstraintsFor(PaintLayer*, | 476 void invalidateStickyConstraintsFor(PaintLayer*, |
| 477 bool needsCompositingUpdate = true); | 477 bool needsCompositingUpdate = true); |
| 478 | 478 |
| 479 void removeStyleRelatedMainThreadScrollingReasons(); |
| 480 void addStyleRelatedMainThreadScrollingReasons(const uint32_t); |
| 481 bool hasMainThreadScrollingReason(uint32_t reason) const { |
| 482 return m_reasons & reason; |
| 483 } |
| 484 |
| 479 uint64_t id() const; | 485 uint64_t id() const; |
| 480 | 486 |
| 481 DECLARE_VIRTUAL_TRACE(); | 487 DECLARE_VIRTUAL_TRACE(); |
| 482 | 488 |
| 483 private: | 489 private: |
| 484 explicit PaintLayerScrollableArea(PaintLayer&); | 490 explicit PaintLayerScrollableArea(PaintLayer&); |
| 485 | 491 |
| 486 bool hasHorizontalOverflow() const; | 492 bool hasHorizontalOverflow() const; |
| 487 bool hasVerticalOverflow() const; | 493 bool hasVerticalOverflow() const; |
| 488 bool hasScrollableHorizontalOverflow() const; | 494 bool hasScrollableHorizontalOverflow() const; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 ScrollingCoordinator* getScrollingCoordinator() const; | 530 ScrollingCoordinator* getScrollingCoordinator() const; |
| 525 | 531 |
| 526 PaintLayerScrollableAreaRareData* rareData() { return m_rareData.get(); } | 532 PaintLayerScrollableAreaRareData* rareData() { return m_rareData.get(); } |
| 527 | 533 |
| 528 PaintLayerScrollableAreaRareData& ensureRareData() { | 534 PaintLayerScrollableAreaRareData& ensureRareData() { |
| 529 if (!m_rareData) | 535 if (!m_rareData) |
| 530 m_rareData = WTF::makeUnique<PaintLayerScrollableAreaRareData>(); | 536 m_rareData = WTF::makeUnique<PaintLayerScrollableAreaRareData>(); |
| 531 return *m_rareData.get(); | 537 return *m_rareData.get(); |
| 532 } | 538 } |
| 533 | 539 |
| 540 bool computeNeedsCompositedScrolling(const LCDTextMode, const PaintLayer*); |
| 534 PaintLayer& m_layer; | 541 PaintLayer& m_layer; |
| 535 | 542 |
| 536 PaintLayer* m_nextTopmostScrollChild; | 543 PaintLayer* m_nextTopmostScrollChild; |
| 537 PaintLayer* m_topmostScrollChild; | 544 PaintLayer* m_topmostScrollChild; |
| 538 | 545 |
| 539 // Keeps track of whether the layer is currently resizing, so events can cause | 546 // Keeps track of whether the layer is currently resizing, so events can cause |
| 540 // resizing to start and stop. | 547 // resizing to start and stop. |
| 541 unsigned m_inResizeMode : 1; | 548 unsigned m_inResizeMode : 1; |
| 542 unsigned m_scrollsOverflow : 1; | 549 unsigned m_scrollsOverflow : 1; |
| 543 | 550 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 // LayoutObject to hold our custom scroll corner. | 582 // LayoutObject to hold our custom scroll corner. |
| 576 LayoutScrollbarPart* m_scrollCorner; | 583 LayoutScrollbarPart* m_scrollCorner; |
| 577 | 584 |
| 578 // LayoutObject to hold our custom resizer. | 585 // LayoutObject to hold our custom resizer. |
| 579 LayoutScrollbarPart* m_resizer; | 586 LayoutScrollbarPart* m_resizer; |
| 580 | 587 |
| 581 ScrollAnchor m_scrollAnchor; | 588 ScrollAnchor m_scrollAnchor; |
| 582 | 589 |
| 583 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData; | 590 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData; |
| 584 | 591 |
| 592 // MainThreadScrollingReason due to the properties of the LayoutObject |
| 593 uint32_t m_reasons; |
| 594 |
| 585 #if ENABLE(ASSERT) | 595 #if ENABLE(ASSERT) |
| 586 bool m_hasBeenDisposed; | 596 bool m_hasBeenDisposed; |
| 587 #endif | 597 #endif |
| 588 }; | 598 }; |
| 589 | 599 |
| 590 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, | 600 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, |
| 591 ScrollableArea, | 601 ScrollableArea, |
| 592 scrollableArea, | 602 scrollableArea, |
| 593 scrollableArea->isPaintLayerScrollableArea(), | 603 scrollableArea->isPaintLayerScrollableArea(), |
| 594 scrollableArea.isPaintLayerScrollableArea()); | 604 scrollableArea.isPaintLayerScrollableArea()); |
| 595 | 605 |
| 596 } // namespace blink | 606 } // namespace blink |
| 597 | 607 |
| 598 #endif // LayerScrollableArea_h | 608 #endif // LayerScrollableArea_h |
| OLD | NEW |