Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 711 // properties are either created by this FrameView or are inherited from | 711 // properties are either created by this FrameView or are inherited from |
| 712 // an ancestor. | 712 // an ancestor. |
| 713 void setTotalPropertyTreeStateForContents( | 713 void setTotalPropertyTreeStateForContents( |
| 714 std::unique_ptr<PropertyTreeState> state) { | 714 std::unique_ptr<PropertyTreeState> state) { |
| 715 m_totalPropertyTreeStateForContents = std::move(state); | 715 m_totalPropertyTreeStateForContents = std::move(state); |
| 716 } | 716 } |
| 717 const PropertyTreeState* totalPropertyTreeStateForContents() const { | 717 const PropertyTreeState* totalPropertyTreeStateForContents() const { |
| 718 return m_totalPropertyTreeStateForContents.get(); | 718 return m_totalPropertyTreeStateForContents.get(); |
| 719 } | 719 } |
| 720 | 720 |
| 721 // Paint properties (e.g., m_preTranslation, etc.) are built from the | |
| 722 // FrameView's state (e.g., x(), y(), etc.) and need to be invalidated when | |
| 723 // these values change (see: PaintPropertyTreeBuilder::updateProperties). | |
| 724 // Invalid paint properties will be rebuilt during the next lifecycle update | |
| 725 // (see: FrameView::updatePaintProperties). | |
| 726 void setPaintPropertiesInvalid() { m_paintPropertiesValid = false; } | |
|
chrishtr
2016/10/21 22:03:09
...Invalid is different nomenclature from invalida
pdr.
2016/10/26 03:10:48
I've switched this to the following which is simil
| |
| 727 void setPaintPropertiesValid() { | |
| 728 DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint); | |
| 729 m_paintPropertiesValid = true; | |
| 730 } | |
| 731 bool paintPropertiesValid() const { return m_paintPropertiesValid; } | |
| 732 | |
| 721 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 733 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
| 722 IntRect computeVisibleArea(); | 734 IntRect computeVisibleArea(); |
| 723 | 735 |
| 724 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 736 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
| 725 FloatSize viewportSizeForViewportUnits() const; | 737 FloatSize viewportSizeForViewportUnits() const; |
| 726 | 738 |
| 727 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } | 739 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } |
| 728 void clearScrollAnchor(); | 740 void clearScrollAnchor(); |
| 729 bool shouldPerformScrollAnchoring() const override; | 741 bool shouldPerformScrollAnchoring() const override; |
| 730 | 742 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1052 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 1064 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 1053 RefPtr<ScrollPaintPropertyNode> m_scroll; | 1065 RefPtr<ScrollPaintPropertyNode> m_scroll; |
| 1054 // The content clip clips the document (= LayoutView) but not the scrollbars. | 1066 // The content clip clips the document (= LayoutView) but not the scrollbars. |
| 1055 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() is | 1067 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() is |
| 1056 // enabled. | 1068 // enabled. |
| 1057 RefPtr<ClipPaintPropertyNode> m_contentClip; | 1069 RefPtr<ClipPaintPropertyNode> m_contentClip; |
| 1058 // The property tree state that should be used for painting contents. These | 1070 // The property tree state that should be used for painting contents. These |
| 1059 // properties are either created by this FrameView or are inherited from | 1071 // properties are either created by this FrameView or are inherited from |
| 1060 // an ancestor. | 1072 // an ancestor. |
| 1061 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; | 1073 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; |
| 1074 // True if the paint properties are up-to-date with the FrameView's state. | |
| 1075 // See: setPaintPropertiesValid and setPaintPropertiesInvalid. | |
| 1076 bool m_paintPropertiesValid = false; | |
| 1062 | 1077 |
| 1063 // This is set on the local root frame view only. | 1078 // This is set on the local root frame view only. |
| 1064 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 1079 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
| 1065 | 1080 |
| 1066 ScrollAnchor m_scrollAnchor; | 1081 ScrollAnchor m_scrollAnchor; |
| 1067 | 1082 |
| 1068 bool m_needsScrollbarsUpdate; | 1083 bool m_needsScrollbarsUpdate; |
| 1069 bool m_suppressAdjustViewSize; | 1084 bool m_suppressAdjustViewSize; |
| 1070 bool m_allowsLayoutInvalidationAfterLayoutClean; | 1085 bool m_allowsLayoutInvalidationAfterLayoutClean; |
| 1071 | 1086 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1113 widget.isFrameView()); | 1128 widget.isFrameView()); |
| 1114 DEFINE_TYPE_CASTS(FrameView, | 1129 DEFINE_TYPE_CASTS(FrameView, |
| 1115 ScrollableArea, | 1130 ScrollableArea, |
| 1116 scrollableArea, | 1131 scrollableArea, |
| 1117 scrollableArea->isFrameView(), | 1132 scrollableArea->isFrameView(), |
| 1118 scrollableArea.isFrameView()); | 1133 scrollableArea.isFrameView()); |
| 1119 | 1134 |
| 1120 } // namespace blink | 1135 } // namespace blink |
| 1121 | 1136 |
| 1122 #endif // FrameView_h | 1137 #endif // FrameView_h |
| OLD | NEW |