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

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: Relocate the logic of updating mainThreadScrollingFromStyle 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 m_hadVerticalScrollbarBeforeRelayout = val; 468 m_hadVerticalScrollbarBeforeRelayout = val;
469 } 469 }
470 470
471 StickyConstraintsMap& stickyConstraintsMap() { 471 StickyConstraintsMap& stickyConstraintsMap() {
472 return ensureRareData().m_stickyConstraintsMap; 472 return ensureRareData().m_stickyConstraintsMap;
473 } 473 }
474 void invalidateAllStickyConstraints(); 474 void invalidateAllStickyConstraints();
475 void invalidateStickyConstraintsFor(PaintLayer*, 475 void invalidateStickyConstraintsFor(PaintLayer*,
476 bool needsCompositingUpdate = true); 476 bool needsCompositingUpdate = true);
477 477
478 bool hasMainThreadScrollingReason(uint32_t reason) const {
479 return m_reasons & reason;
480 }
481 void flipMainThreadScrollingReason(uint32_t reason) { m_reasons ^= reason; }
482
478 uint64_t id() const; 483 uint64_t id() const;
479 484
480 DECLARE_VIRTUAL_TRACE(); 485 DECLARE_VIRTUAL_TRACE();
481 486
482 private: 487 private:
483 explicit PaintLayerScrollableArea(PaintLayer&); 488 explicit PaintLayerScrollableArea(PaintLayer&);
484 489
485 bool hasHorizontalOverflow() const; 490 bool hasHorizontalOverflow() const;
486 bool hasVerticalOverflow() const; 491 bool hasVerticalOverflow() const;
487 bool hasScrollableHorizontalOverflow() const; 492 bool hasScrollableHorizontalOverflow() const;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 // LayoutObject to hold our custom scroll corner. 577 // LayoutObject to hold our custom scroll corner.
573 LayoutScrollbarPart* m_scrollCorner; 578 LayoutScrollbarPart* m_scrollCorner;
574 579
575 // LayoutObject to hold our custom resizer. 580 // LayoutObject to hold our custom resizer.
576 LayoutScrollbarPart* m_resizer; 581 LayoutScrollbarPart* m_resizer;
577 582
578 ScrollAnchor m_scrollAnchor; 583 ScrollAnchor m_scrollAnchor;
579 584
580 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData; 585 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData;
581 586
587 // MainThreadScrollingReason due to the property of each layout object
bokan 2016/12/14 13:28:59 "property of each layout object" -> "properties of
yigu 2016/12/14 21:17:33 Done.
588 uint32_t m_reasons;
589
582 #if ENABLE(ASSERT) 590 #if ENABLE(ASSERT)
583 bool m_hasBeenDisposed; 591 bool m_hasBeenDisposed;
584 #endif 592 #endif
585 }; 593 };
586 594
587 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, 595 DEFINE_TYPE_CASTS(PaintLayerScrollableArea,
588 ScrollableArea, 596 ScrollableArea,
589 scrollableArea, 597 scrollableArea,
590 scrollableArea->isPaintLayerScrollableArea(), 598 scrollableArea->isPaintLayerScrollableArea(),
591 scrollableArea.isPaintLayerScrollableArea()); 599 scrollableArea.isPaintLayerScrollableArea());
592 600
593 } // namespace blink 601 } // namespace blink
594 602
595 #endif // LayerScrollableArea_h 603 #endif // LayerScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698