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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 bool HadVerticalScrollbarBeforeRelayout() const { | 472 bool HadVerticalScrollbarBeforeRelayout() const { |
473 return had_vertical_scrollbar_before_relayout_; | 473 return had_vertical_scrollbar_before_relayout_; |
474 } | 474 } |
475 void SetHadVerticalScrollbarBeforeRelayout(bool val) { | 475 void SetHadVerticalScrollbarBeforeRelayout(bool val) { |
476 had_vertical_scrollbar_before_relayout_ = val; | 476 had_vertical_scrollbar_before_relayout_ = val; |
477 } | 477 } |
478 | 478 |
479 StickyConstraintsMap& GetStickyConstraintsMap() { | 479 StickyConstraintsMap& GetStickyConstraintsMap() { |
480 return EnsureRareData().sticky_constraints_map_; | 480 return EnsureRareData().sticky_constraints_map_; |
481 } | 481 } |
482 | |
483 void InvalidateAllStickyConstraints(); | 482 void InvalidateAllStickyConstraints(); |
484 void InvalidateStickyConstraintsFor(PaintLayer*, | 483 void InvalidateStickyConstraintsFor(PaintLayer*, |
485 bool needs_compositing_update = true); | 484 bool needs_compositing_update = true); |
486 uint32_t GetNonCompositedMainThreadScrollingReasons() { | 485 |
487 return non_composited_main_thread_scrolling_reasons_; | 486 void RemoveStyleRelatedMainThreadScrollingReasons(); |
| 487 void AddStyleRelatedMainThreadScrollingReasons(const uint32_t); |
| 488 bool HasMainThreadScrollingReason(uint32_t reason) const { |
| 489 return reasons_ & reason; |
488 } | 490 } |
489 | 491 |
490 uint64_t Id() const; | 492 uint64_t Id() const; |
491 | 493 |
492 DECLARE_VIRTUAL_TRACE(); | 494 DECLARE_VIRTUAL_TRACE(); |
493 | 495 |
494 private: | 496 private: |
495 explicit PaintLayerScrollableArea(PaintLayer&); | 497 explicit PaintLayerScrollableArea(PaintLayer&); |
496 | 498 |
497 bool HasHorizontalOverflow() const; | 499 bool HasHorizontalOverflow() const; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 LayoutScrollbarPart* scroll_corner_; | 590 LayoutScrollbarPart* scroll_corner_; |
589 | 591 |
590 // LayoutObject to hold our custom resizer. | 592 // LayoutObject to hold our custom resizer. |
591 LayoutScrollbarPart* resizer_; | 593 LayoutScrollbarPart* resizer_; |
592 | 594 |
593 ScrollAnchor scroll_anchor_; | 595 ScrollAnchor scroll_anchor_; |
594 | 596 |
595 std::unique_ptr<PaintLayerScrollableAreaRareData> rare_data_; | 597 std::unique_ptr<PaintLayerScrollableAreaRareData> rare_data_; |
596 | 598 |
597 // MainThreadScrollingReason due to the properties of the LayoutObject | 599 // MainThreadScrollingReason due to the properties of the LayoutObject |
598 uint32_t non_composited_main_thread_scrolling_reasons_; | 600 uint32_t reasons_; |
599 | 601 |
600 #if DCHECK_IS_ON() | 602 #if DCHECK_IS_ON() |
601 bool has_been_disposed_; | 603 bool has_been_disposed_; |
602 #endif | 604 #endif |
603 }; | 605 }; |
604 | 606 |
605 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, | 607 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, |
606 ScrollableArea, | 608 ScrollableArea, |
607 scrollableArea, | 609 scrollableArea, |
608 scrollableArea->IsPaintLayerScrollableArea(), | 610 scrollableArea->IsPaintLayerScrollableArea(), |
609 scrollableArea.IsPaintLayerScrollableArea()); | 611 scrollableArea.IsPaintLayerScrollableArea()); |
610 | 612 |
611 } // namespace blink | 613 } // namespace blink |
612 | 614 |
613 #endif // LayerScrollableArea_h | 615 #endif // LayerScrollableArea_h |
OLD | NEW |