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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 742 void setOnlyThisNeedsPaintPropertyUpdateForTesting() { | 742 void setOnlyThisNeedsPaintPropertyUpdateForTesting() { |
| 743 m_needsPaintPropertyUpdate = true; | 743 m_needsPaintPropertyUpdate = true; |
| 744 } | 744 } |
| 745 #endif | 745 #endif |
| 746 void clearNeedsPaintPropertyUpdate() { | 746 void clearNeedsPaintPropertyUpdate() { |
| 747 DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint); | 747 DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint); |
| 748 m_needsPaintPropertyUpdate = false; | 748 m_needsPaintPropertyUpdate = false; |
| 749 } | 749 } |
| 750 bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; } | 750 bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; } |
| 751 | 751 |
| 752 // Set when the whole frame subtree needs full paint invalidation and paint | |
| 753 // property update, e.g. when beginning or finishing printing. | |
| 754 void setShouldInvalidateAllPaintAndPaintProperties() { | |
| 755 m_shouldInvalidateAllPaintAndPaintProperties = true; | |
| 756 } | |
| 757 void clearShouldInvalidateAllPaintAndPaintProperties() { | |
| 758 m_shouldInvalidateAllPaintAndPaintProperties = true; | |
| 759 } | |
| 760 bool shouldInvalidateAllPaintAndPaintProperties() const { | |
| 761 return m_shouldInvalidateAllPaintAndPaintProperties; | |
| 762 } | |
| 763 | |
|
Xianzhu
2016/12/16 01:00:04
Some changes in this CL are actually revert of htt
| |
| 764 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 752 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
| 765 IntRect computeVisibleArea(); | 753 IntRect computeVisibleArea(); |
| 766 | 754 |
| 767 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 755 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
| 768 FloatSize viewportSizeForViewportUnits() const; | 756 FloatSize viewportSizeForViewportUnits() const; |
| 769 | 757 |
| 770 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } | 758 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } |
| 771 void clearScrollAnchor(); | 759 void clearScrollAnchor(); |
| 772 bool shouldPerformScrollAnchoring() const override; | 760 bool shouldPerformScrollAnchoring() const override; |
| 773 void enqueueScrollAnchoringAdjustment(ScrollableArea*); | 761 void enqueueScrollAnchoringAdjustment(ScrollableArea*); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1109 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() is | 1097 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() is |
| 1110 // enabled. | 1098 // enabled. |
| 1111 RefPtr<ClipPaintPropertyNode> m_contentClip; | 1099 RefPtr<ClipPaintPropertyNode> m_contentClip; |
| 1112 // The property tree state that should be used for painting contents. These | 1100 // The property tree state that should be used for painting contents. These |
| 1113 // properties are either created by this FrameView or are inherited from | 1101 // properties are either created by this FrameView or are inherited from |
| 1114 // an ancestor. | 1102 // an ancestor. |
| 1115 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; | 1103 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; |
| 1116 // Whether the paint properties need to be updated. For more details, see | 1104 // Whether the paint properties need to be updated. For more details, see |
| 1117 // FrameView::needsPaintPropertyUpdate(). | 1105 // FrameView::needsPaintPropertyUpdate(). |
| 1118 bool m_needsPaintPropertyUpdate; | 1106 bool m_needsPaintPropertyUpdate; |
| 1119 bool m_shouldInvalidateAllPaintAndPaintProperties; | |
| 1120 | 1107 |
| 1121 // This is set on the local root frame view only. | 1108 // This is set on the local root frame view only. |
| 1122 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 1109 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
| 1123 | 1110 |
| 1124 ScrollAnchor m_scrollAnchor; | 1111 ScrollAnchor m_scrollAnchor; |
| 1125 using AnchoringAdjustmentQueue = | 1112 using AnchoringAdjustmentQueue = |
| 1126 HeapLinkedHashSet<WeakMember<ScrollableArea>>; | 1113 HeapLinkedHashSet<WeakMember<ScrollableArea>>; |
| 1127 AnchoringAdjustmentQueue m_anchoringAdjustmentQueue; | 1114 AnchoringAdjustmentQueue m_anchoringAdjustmentQueue; |
| 1128 | 1115 |
| 1129 // ScrollbarManager holds the Scrollbar instances. | 1116 // ScrollbarManager holds the Scrollbar instances. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1179 widget.isFrameView()); | 1166 widget.isFrameView()); |
| 1180 DEFINE_TYPE_CASTS(FrameView, | 1167 DEFINE_TYPE_CASTS(FrameView, |
| 1181 ScrollableArea, | 1168 ScrollableArea, |
| 1182 scrollableArea, | 1169 scrollableArea, |
| 1183 scrollableArea->isFrameView(), | 1170 scrollableArea->isFrameView(), |
| 1184 scrollableArea.isFrameView()); | 1171 scrollableArea.isFrameView()); |
| 1185 | 1172 |
| 1186 } // namespace blink | 1173 } // namespace blink |
| 1187 | 1174 |
| 1188 #endif // FrameView_h | 1175 #endif // FrameView_h |
| OLD | NEW |