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

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

Issue 2565223002: Add more specific metrics for main thread scrolling reasons (Closed)
Patch Set: Move updating main thread scrolling reasons from style to PLSA Created 4 years 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 m_hadVerticalScrollbarBeforeRelayout = val; 467 m_hadVerticalScrollbarBeforeRelayout = val;
468 } 468 }
469 469
470 StickyConstraintsMap& stickyConstraintsMap() { 470 StickyConstraintsMap& stickyConstraintsMap() {
471 return ensureRareData().m_stickyConstraintsMap; 471 return ensureRareData().m_stickyConstraintsMap;
472 } 472 }
473 void invalidateAllStickyConstraints(); 473 void invalidateAllStickyConstraints();
474 void invalidateStickyConstraintsFor(PaintLayer*, 474 void invalidateStickyConstraintsFor(PaintLayer*,
475 bool needsCompositingUpdate = true); 475 bool needsCompositingUpdate = true);
476 476
477 void updateMainThreadScrollingReasonsFromStyle(const PaintLayer*) const;
478 bool hasMainThreadScrollingReason(uint32_t reason) const {
479 return m_reasons & reason;
480 }
481 void flipMainThreadScrollingReason(uint32_t reason) { m_reasons ^= reason; }
482
477 uint64_t id() const; 483 uint64_t id() const;
478 484
479 DECLARE_VIRTUAL_TRACE(); 485 DECLARE_VIRTUAL_TRACE();
480 486
481 private: 487 private:
482 explicit PaintLayerScrollableArea(PaintLayer&); 488 explicit PaintLayerScrollableArea(PaintLayer&);
483 489
484 bool hasHorizontalOverflow() const; 490 bool hasHorizontalOverflow() const;
485 bool hasVerticalOverflow() const; 491 bool hasVerticalOverflow() const;
486 bool hasScrollableHorizontalOverflow() const; 492 bool hasScrollableHorizontalOverflow() const;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 // LayoutObject to hold our custom scroll corner. 577 // LayoutObject to hold our custom scroll corner.
572 LayoutScrollbarPart* m_scrollCorner; 578 LayoutScrollbarPart* m_scrollCorner;
573 579
574 // LayoutObject to hold our custom resizer. 580 // LayoutObject to hold our custom resizer.
575 LayoutScrollbarPart* m_resizer; 581 LayoutScrollbarPart* m_resizer;
576 582
577 ScrollAnchor m_scrollAnchor; 583 ScrollAnchor m_scrollAnchor;
578 584
579 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData; 585 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData;
580 586
587 // MainThreadScrollingReason due to the properties of the LayoutObject
588 uint32_t m_reasons;
589
581 #if ENABLE(ASSERT) 590 #if ENABLE(ASSERT)
582 bool m_hasBeenDisposed; 591 bool m_hasBeenDisposed;
583 #endif 592 #endif
584 }; 593 };
585 594
586 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, 595 DEFINE_TYPE_CASTS(PaintLayerScrollableArea,
587 ScrollableArea, 596 ScrollableArea,
588 scrollableArea, 597 scrollableArea,
589 scrollableArea->isPaintLayerScrollableArea(), 598 scrollableArea->isPaintLayerScrollableArea(),
590 scrollableArea.isPaintLayerScrollableArea()); 599 scrollableArea.isPaintLayerScrollableArea());
591 600
592 } // namespace blink 601 } // namespace blink
593 602
594 #endif // LayerScrollableArea_h 603 #endif // LayerScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698