| 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 // properties are either created by this FrameView or are inherited from | 712 // properties are either created by this FrameView or are inherited from |
| 713 // an ancestor. | 713 // an ancestor. |
| 714 void setTotalPropertyTreeStateForContents( | 714 void setTotalPropertyTreeStateForContents( |
| 715 std::unique_ptr<PropertyTreeState> state) { | 715 std::unique_ptr<PropertyTreeState> state) { |
| 716 m_totalPropertyTreeStateForContents = std::move(state); | 716 m_totalPropertyTreeStateForContents = std::move(state); |
| 717 } | 717 } |
| 718 const PropertyTreeState* totalPropertyTreeStateForContents() const { | 718 const PropertyTreeState* totalPropertyTreeStateForContents() const { |
| 719 return m_totalPropertyTreeStateForContents.get(); | 719 return m_totalPropertyTreeStateForContents.get(); |
| 720 } | 720 } |
| 721 | 721 |
| 722 // Paint properties (e.g., m_preTranslation, etc.) are built from the |
| 723 // FrameView's state (e.g., x(), y(), etc.) as well as inherited context. |
| 724 // When these inputs change, setNeedsPaintPropertyUpdate will cause a property |
| 725 // tree update during the next document lifecycle update. |
| 726 // TODO(pdr): Add additional granularity such as the ability to signal that |
| 727 // only a local paint property update is needed. |
| 728 void setNeedsPaintPropertyUpdate() { m_needsPaintPropertyUpdate = true; } |
| 729 void clearNeedsPaintPropertyUpdate() { |
| 730 DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint); |
| 731 m_needsPaintPropertyUpdate = false; |
| 732 } |
| 733 bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; } |
| 722 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 734 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
| 723 IntRect computeVisibleArea(); | 735 IntRect computeVisibleArea(); |
| 724 | 736 |
| 725 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 737 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
| 726 FloatSize viewportSizeForViewportUnits() const; | 738 FloatSize viewportSizeForViewportUnits() const; |
| 727 | 739 |
| 728 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } | 740 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } |
| 729 void clearScrollAnchor(); | 741 void clearScrollAnchor(); |
| 730 bool shouldPerformScrollAnchoring() const override; | 742 bool shouldPerformScrollAnchoring() const override; |
| 731 | 743 |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 1076 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 1065 RefPtr<ScrollPaintPropertyNode> m_scroll; | 1077 RefPtr<ScrollPaintPropertyNode> m_scroll; |
| 1066 // The content clip clips the document (= LayoutView) but not the scrollbars. | 1078 // The content clip clips the document (= LayoutView) but not the scrollbars. |
| 1067 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() is | 1079 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() is |
| 1068 // enabled. | 1080 // enabled. |
| 1069 RefPtr<ClipPaintPropertyNode> m_contentClip; | 1081 RefPtr<ClipPaintPropertyNode> m_contentClip; |
| 1070 // The property tree state that should be used for painting contents. These | 1082 // The property tree state that should be used for painting contents. These |
| 1071 // properties are either created by this FrameView or are inherited from | 1083 // properties are either created by this FrameView or are inherited from |
| 1072 // an ancestor. | 1084 // an ancestor. |
| 1073 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; | 1085 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; |
| 1086 // Whether the paint properties need to be updated. For more details, see |
| 1087 // FrameView::needsPaintPropertyUpdate(). |
| 1088 bool m_needsPaintPropertyUpdate; |
| 1074 | 1089 |
| 1075 // This is set on the local root frame view only. | 1090 // This is set on the local root frame view only. |
| 1076 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 1091 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
| 1077 | 1092 |
| 1078 ScrollAnchor m_scrollAnchor; | 1093 ScrollAnchor m_scrollAnchor; |
| 1079 | 1094 |
| 1080 // ScrollbarManager holds the Scrollbar instances. | 1095 // ScrollbarManager holds the Scrollbar instances. |
| 1081 ScrollbarManager m_scrollbarManager; | 1096 ScrollbarManager m_scrollbarManager; |
| 1082 | 1097 |
| 1083 bool m_needsScrollbarsUpdate; | 1098 bool m_needsScrollbarsUpdate; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 widget.isFrameView()); | 1143 widget.isFrameView()); |
| 1129 DEFINE_TYPE_CASTS(FrameView, | 1144 DEFINE_TYPE_CASTS(FrameView, |
| 1130 ScrollableArea, | 1145 ScrollableArea, |
| 1131 scrollableArea, | 1146 scrollableArea, |
| 1132 scrollableArea->isFrameView(), | 1147 scrollableArea->isFrameView(), |
| 1133 scrollableArea.isFrameView()); | 1148 scrollableArea.isFrameView()); |
| 1134 | 1149 |
| 1135 } // namespace blink | 1150 } // namespace blink |
| 1136 | 1151 |
| 1137 #endif // FrameView_h | 1152 #endif // FrameView_h |
| OLD | NEW |