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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 | 721 |
722 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 722 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
723 IntRect computeVisibleArea(); | 723 IntRect computeVisibleArea(); |
724 | 724 |
725 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 725 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
726 FloatSize viewportSizeForViewportUnits() const; | 726 FloatSize viewportSizeForViewportUnits() const; |
727 | 727 |
728 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } | 728 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } |
729 void clearScrollAnchor(); | 729 void clearScrollAnchor(); |
730 bool shouldPerformScrollAnchoring() const override; | 730 bool shouldPerformScrollAnchoring() const override; |
| 731 void enqueueScrollAnchoringAdjustment(ScrollableArea*); |
| 732 void performScrollAnchoringAdjustments(); |
731 | 733 |
732 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into | 734 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into |
733 // PaintInvalidator. | 735 // PaintInvalidator. |
734 void invalidatePaintIfNeeded(const PaintInvalidationState&); | 736 void invalidatePaintIfNeeded(const PaintInvalidationState&); |
735 | 737 |
736 // Only for SPv2. | 738 // Only for SPv2. |
737 std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags); | 739 std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags); |
738 | 740 |
739 protected: | 741 protected: |
740 // Scroll the content via the compositor. | 742 // Scroll the content via the compositor. |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 RefPtr<ClipPaintPropertyNode> m_contentClip; | 1071 RefPtr<ClipPaintPropertyNode> m_contentClip; |
1070 // The property tree state that should be used for painting contents. These | 1072 // The property tree state that should be used for painting contents. These |
1071 // properties are either created by this FrameView or are inherited from | 1073 // properties are either created by this FrameView or are inherited from |
1072 // an ancestor. | 1074 // an ancestor. |
1073 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; | 1075 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; |
1074 | 1076 |
1075 // This is set on the local root frame view only. | 1077 // This is set on the local root frame view only. |
1076 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 1078 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
1077 | 1079 |
1078 ScrollAnchor m_scrollAnchor; | 1080 ScrollAnchor m_scrollAnchor; |
| 1081 using AnchoringAdjustmentQueue = |
| 1082 HeapLinkedHashSet<WeakMember<ScrollableArea>>; |
| 1083 AnchoringAdjustmentQueue m_anchoringAdjustmentQueue; |
1079 | 1084 |
1080 // ScrollbarManager holds the Scrollbar instances. | 1085 // ScrollbarManager holds the Scrollbar instances. |
1081 ScrollbarManager m_scrollbarManager; | 1086 ScrollbarManager m_scrollbarManager; |
1082 | 1087 |
1083 bool m_needsScrollbarsUpdate; | 1088 bool m_needsScrollbarsUpdate; |
1084 bool m_suppressAdjustViewSize; | 1089 bool m_suppressAdjustViewSize; |
1085 bool m_allowsLayoutInvalidationAfterLayoutClean; | 1090 bool m_allowsLayoutInvalidationAfterLayoutClean; |
1086 | 1091 |
1087 // For testing. | 1092 // For testing. |
1088 struct ObjectPaintInvalidation { | 1093 struct ObjectPaintInvalidation { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 widget.isFrameView()); | 1133 widget.isFrameView()); |
1129 DEFINE_TYPE_CASTS(FrameView, | 1134 DEFINE_TYPE_CASTS(FrameView, |
1130 ScrollableArea, | 1135 ScrollableArea, |
1131 scrollableArea, | 1136 scrollableArea, |
1132 scrollableArea->isFrameView(), | 1137 scrollableArea->isFrameView(), |
1133 scrollableArea.isFrameView()); | 1138 scrollableArea.isFrameView()); |
1134 | 1139 |
1135 } // namespace blink | 1140 } // namespace blink |
1136 | 1141 |
1137 #endif // FrameView_h | 1142 #endif // FrameView_h |
OLD | NEW |