| 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 // properties are either created by this FrameView or are inherited from | 717 // properties are either created by this FrameView or are inherited from |
| 718 // an ancestor. | 718 // an ancestor. |
| 719 void setTotalPropertyTreeStateForContents( | 719 void setTotalPropertyTreeStateForContents( |
| 720 std::unique_ptr<PropertyTreeState> state) { | 720 std::unique_ptr<PropertyTreeState> state) { |
| 721 m_totalPropertyTreeStateForContents = std::move(state); | 721 m_totalPropertyTreeStateForContents = std::move(state); |
| 722 } | 722 } |
| 723 const PropertyTreeState* totalPropertyTreeStateForContents() const { | 723 const PropertyTreeState* totalPropertyTreeStateForContents() const { |
| 724 return m_totalPropertyTreeStateForContents.get(); | 724 return m_totalPropertyTreeStateForContents.get(); |
| 725 } | 725 } |
| 726 | 726 |
| 727 // Paint properties (e.g., m_preTranslation, etc.) are built from the |
| 728 // FrameView's state (e.g., x(), y(), etc.) as well as inherited context. |
| 729 // When these inputs change, setNeedsPaintPropertyUpdate will cause a property |
| 730 // tree update during the next document lifecycle update. |
| 731 // TODO(pdr): Add additional granularity such as the ability to signal that |
| 732 // only a local paint property update is needed. |
| 733 void setNeedsPaintPropertyUpdate() { m_needsPaintPropertyUpdate = true; } |
| 734 void clearNeedsPaintPropertyUpdate() { |
| 735 DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint); |
| 736 m_needsPaintPropertyUpdate = false; |
| 737 } |
| 738 bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; } |
| 727 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 739 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
| 728 IntRect computeVisibleArea(); | 740 IntRect computeVisibleArea(); |
| 729 | 741 |
| 730 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 742 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
| 731 FloatSize viewportSizeForViewportUnits() const; | 743 FloatSize viewportSizeForViewportUnits() const; |
| 732 | 744 |
| 733 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } | 745 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } |
| 734 void clearScrollAnchor(); | 746 void clearScrollAnchor(); |
| 735 bool shouldPerformScrollAnchoring() const override; | 747 bool shouldPerformScrollAnchoring() const override; |
| 736 void enqueueScrollAnchoringAdjustment(ScrollableArea*); | 748 void enqueueScrollAnchoringAdjustment(ScrollableArea*); |
| (...skipping 327 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 using AnchoringAdjustmentQueue = | 1094 using AnchoringAdjustmentQueue = |
| 1080 HeapLinkedHashSet<WeakMember<ScrollableArea>>; | 1095 HeapLinkedHashSet<WeakMember<ScrollableArea>>; |
| 1081 AnchoringAdjustmentQueue m_anchoringAdjustmentQueue; | 1096 AnchoringAdjustmentQueue m_anchoringAdjustmentQueue; |
| 1082 | 1097 |
| 1083 // ScrollbarManager holds the Scrollbar instances. | 1098 // ScrollbarManager holds the Scrollbar instances. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 widget.isFrameView()); | 1148 widget.isFrameView()); |
| 1134 DEFINE_TYPE_CASTS(FrameView, | 1149 DEFINE_TYPE_CASTS(FrameView, |
| 1135 ScrollableArea, | 1150 ScrollableArea, |
| 1136 scrollableArea, | 1151 scrollableArea, |
| 1137 scrollableArea->isFrameView(), | 1152 scrollableArea->isFrameView(), |
| 1138 scrollableArea.isFrameView()); | 1153 scrollableArea.isFrameView()); |
| 1139 | 1154 |
| 1140 } // namespace blink | 1155 } // namespace blink |
| 1141 | 1156 |
| 1142 #endif // FrameView_h | 1157 #endif // FrameView_h |
| OLD | NEW |