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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2539693002: Early-out from the prepaint tree walk (Closed)
Patch Set: Address chrishtrs comments 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
8 reserved. 8 reserved.
9 9
10 This library is free software; you can redistribute it and/or 10 This library is free software; you can redistribute it and/or
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 void setTotalPropertyTreeStateForContents( 720 void setTotalPropertyTreeStateForContents(
721 std::unique_ptr<PropertyTreeState> state) { 721 std::unique_ptr<PropertyTreeState> state) {
722 m_totalPropertyTreeStateForContents = std::move(state); 722 m_totalPropertyTreeStateForContents = std::move(state);
723 } 723 }
724 const PropertyTreeState* totalPropertyTreeStateForContents() const { 724 const PropertyTreeState* totalPropertyTreeStateForContents() const {
725 return m_totalPropertyTreeStateForContents.get(); 725 return m_totalPropertyTreeStateForContents.get();
726 } 726 }
727 727
728 // Paint properties (e.g., m_preTranslation, etc.) are built from the 728 // Paint properties (e.g., m_preTranslation, etc.) are built from the
729 // FrameView's state (e.g., x(), y(), etc.) as well as inherited context. 729 // FrameView's state (e.g., x(), y(), etc.) as well as inherited context.
730 // When these inputs change, setNeedsPaintPropertyUpdate will cause a property 730 // When these inputs change, setNeedsPaintPropertyUpdate will cause a paint
731 // tree update during the next document lifecycle update. 731 // property tree update during the next document lifecycle update.
732 // TODO(pdr): Add additional granularity such as the ability to signal that 732 // setNeedsPaintPropertyUpdate also sets the owning layout tree as needing a
733 // only a local paint property update is needed. 733 // paint property update.
734 void setNeedsPaintPropertyUpdate() { m_needsPaintPropertyUpdate = true; } 734 void setNeedsPaintPropertyUpdate();
735 #if DCHECK_IS_ON()
736 // Similar to setNeedsPaintPropertyUpdate() but does not set the owning layout
737 // tree as needing a paint property update.
738 void setOnlyThisNeedsPaintPropertyUpdateForTesting() {
739 m_needsPaintPropertyUpdate = true;
740 }
741 #endif
735 void clearNeedsPaintPropertyUpdate() { 742 void clearNeedsPaintPropertyUpdate() {
736 DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint); 743 DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint);
737 m_needsPaintPropertyUpdate = false; 744 m_needsPaintPropertyUpdate = false;
738 } 745 }
739 bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; } 746 bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; }
740 // TODO(ojan): Merge this with IntersectionObserver once it lands. 747 // TODO(ojan): Merge this with IntersectionObserver once it lands.
741 IntRect computeVisibleArea(); 748 IntRect computeVisibleArea();
742 749
743 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). 750 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw').
744 FloatSize viewportSizeForViewportUnits() const; 751 FloatSize viewportSizeForViewportUnits() const;
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 widget.isFrameView()); 1159 widget.isFrameView());
1153 DEFINE_TYPE_CASTS(FrameView, 1160 DEFINE_TYPE_CASTS(FrameView,
1154 ScrollableArea, 1161 ScrollableArea,
1155 scrollableArea, 1162 scrollableArea,
1156 scrollableArea->isFrameView(), 1163 scrollableArea->isFrameView(),
1157 scrollableArea.isFrameView()); 1164 scrollableArea.isFrameView());
1158 1165
1159 } // namespace blink 1166 } // namespace blink
1160 1167
1161 #endif // FrameView_h 1168 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698