Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h

Issue 2773593005: Move logic of recording main thread scrolling reasons from cc to blink::ScrollManager (Closed)
Patch Set: fix incorrect test for android devices Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
482 void InvalidateAllStickyConstraints(); 483 void InvalidateAllStickyConstraints();
483 void InvalidateStickyConstraintsFor(PaintLayer*, 484 void InvalidateStickyConstraintsFor(PaintLayer*,
484 bool needs_compositing_update = true); 485 bool needs_compositing_update = true);
485 486 uint32_t GetNonCompositedMainThreadScrollingReasons() {
486 void RemoveStyleRelatedMainThreadScrollingReasons(); 487 return non_composited_main_thread_scrolling_reasons_;
487 void AddStyleRelatedMainThreadScrollingReasons(const uint32_t);
488 bool HasMainThreadScrollingReason(uint32_t reason) const {
489 return reasons_ & reason;
490 } 488 }
491 489
492 uint64_t Id() const; 490 uint64_t Id() const;
493 491
494 DECLARE_VIRTUAL_TRACE(); 492 DECLARE_VIRTUAL_TRACE();
495 493
496 private: 494 private:
497 explicit PaintLayerScrollableArea(PaintLayer&); 495 explicit PaintLayerScrollableArea(PaintLayer&);
498 496
499 bool HasHorizontalOverflow() const; 497 bool HasHorizontalOverflow() const;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 LayoutScrollbarPart* scroll_corner_; 588 LayoutScrollbarPart* scroll_corner_;
591 589
592 // LayoutObject to hold our custom resizer. 590 // LayoutObject to hold our custom resizer.
593 LayoutScrollbarPart* resizer_; 591 LayoutScrollbarPart* resizer_;
594 592
595 ScrollAnchor scroll_anchor_; 593 ScrollAnchor scroll_anchor_;
596 594
597 std::unique_ptr<PaintLayerScrollableAreaRareData> rare_data_; 595 std::unique_ptr<PaintLayerScrollableAreaRareData> rare_data_;
598 596
599 // MainThreadScrollingReason due to the properties of the LayoutObject 597 // MainThreadScrollingReason due to the properties of the LayoutObject
600 uint32_t reasons_; 598 uint32_t non_composited_main_thread_scrolling_reasons_;
601 599
602 #if DCHECK_IS_ON() 600 #if DCHECK_IS_ON()
603 bool has_been_disposed_; 601 bool has_been_disposed_;
604 #endif 602 #endif
605 }; 603 };
606 604
607 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, 605 DEFINE_TYPE_CASTS(PaintLayerScrollableArea,
608 ScrollableArea, 606 ScrollableArea,
609 scrollableArea, 607 scrollableArea,
610 scrollableArea->IsPaintLayerScrollableArea(), 608 scrollableArea->IsPaintLayerScrollableArea(),
611 scrollableArea.IsPaintLayerScrollableArea()); 609 scrollableArea.IsPaintLayerScrollableArea());
612 610
613 } // namespace blink 611 } // namespace blink
614 612
615 #endif // LayerScrollableArea_h 613 #endif // LayerScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698