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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 | 715 |
716 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 716 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
717 IntRect computeVisibleArea(); | 717 IntRect computeVisibleArea(); |
718 | 718 |
719 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 719 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
720 FloatSize viewportSizeForViewportUnits() const; | 720 FloatSize viewportSizeForViewportUnits() const; |
721 | 721 |
722 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } | 722 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } |
723 void clearScrollAnchor(); | 723 void clearScrollAnchor(); |
724 bool shouldPerformScrollAnchoring() const override; | 724 bool shouldPerformScrollAnchoring() const override; |
| 725 void enqueueScrollAnchoringAdjustment(ScrollableArea*); |
| 726 void performScrollAnchoringAdjustments(); |
725 | 727 |
726 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into | 728 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into |
727 // PaintInvalidator. | 729 // PaintInvalidator. |
728 void invalidatePaintIfNeeded(const PaintInvalidationState&); | 730 void invalidatePaintIfNeeded(const PaintInvalidationState&); |
729 | 731 |
730 // Only for SPv2. | 732 // Only for SPv2. |
731 std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags); | 733 std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags); |
732 | 734 |
733 protected: | 735 protected: |
734 // Scroll the content via the compositor. | 736 // Scroll the content via the compositor. |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 RefPtr<ClipPaintPropertyNode> m_contentClip; | 1053 RefPtr<ClipPaintPropertyNode> m_contentClip; |
1052 // The property tree state that should be used for painting contents. These | 1054 // The property tree state that should be used for painting contents. These |
1053 // properties are either created by this FrameView or are inherited from | 1055 // properties are either created by this FrameView or are inherited from |
1054 // an ancestor. | 1056 // an ancestor. |
1055 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; | 1057 std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; |
1056 | 1058 |
1057 // This is set on the local root frame view only. | 1059 // This is set on the local root frame view only. |
1058 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 1060 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
1059 | 1061 |
1060 ScrollAnchor m_scrollAnchor; | 1062 ScrollAnchor m_scrollAnchor; |
| 1063 using AnchoringAdjustmentQueue = |
| 1064 HeapLinkedHashSet<WeakMember<ScrollableArea>>; |
| 1065 AnchoringAdjustmentQueue m_anchoringAdjustmentQueue; |
1061 | 1066 |
1062 bool m_needsScrollbarsUpdate; | 1067 bool m_needsScrollbarsUpdate; |
1063 bool m_suppressAdjustViewSize; | 1068 bool m_suppressAdjustViewSize; |
1064 bool m_allowsLayoutInvalidationAfterLayoutClean; | 1069 bool m_allowsLayoutInvalidationAfterLayoutClean; |
1065 | 1070 |
1066 // For testing. | 1071 // For testing. |
1067 struct ObjectPaintInvalidation { | 1072 struct ObjectPaintInvalidation { |
1068 String name; | 1073 String name; |
1069 PaintInvalidationReason reason; | 1074 PaintInvalidationReason reason; |
1070 }; | 1075 }; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 widget.isFrameView()); | 1112 widget.isFrameView()); |
1108 DEFINE_TYPE_CASTS(FrameView, | 1113 DEFINE_TYPE_CASTS(FrameView, |
1109 ScrollableArea, | 1114 ScrollableArea, |
1110 scrollableArea, | 1115 scrollableArea, |
1111 scrollableArea->isFrameView(), | 1116 scrollableArea->isFrameView(), |
1112 scrollableArea.isFrameView()); | 1117 scrollableArea.isFrameView()); |
1113 | 1118 |
1114 } // namespace blink | 1119 } // namespace blink |
1115 | 1120 |
1116 #endif // FrameView_h | 1121 #endif // FrameView_h |
OLD | NEW |