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 13 matching lines...) Expand all Loading... | |
24 */ | 24 */ |
25 | 25 |
26 #ifndef FrameView_h | 26 #ifndef FrameView_h |
27 #define FrameView_h | 27 #define FrameView_h |
28 | 28 |
29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
30 #include "core/dom/DocumentLifecycle.h" | 30 #include "core/dom/DocumentLifecycle.h" |
31 #include "core/frame/FrameViewAutoSizeInfo.h" | 31 #include "core/frame/FrameViewAutoSizeInfo.h" |
32 #include "core/frame/LayoutSubtreeRootList.h" | 32 #include "core/frame/LayoutSubtreeRootList.h" |
33 #include "core/frame/RootFrameViewport.h" | 33 #include "core/frame/RootFrameViewport.h" |
34 #include "core/layout/MapCoordinatesFlags.h" | |
34 #include "core/layout/ScrollAnchor.h" | 35 #include "core/layout/ScrollAnchor.h" |
35 #include "core/paint/FirstMeaningfulPaintDetector.h" | 36 #include "core/paint/FirstMeaningfulPaintDetector.h" |
36 #include "core/paint/ObjectPaintProperties.h" | 37 #include "core/paint/ObjectPaintProperties.h" |
37 #include "core/paint/PaintInvalidationCapableScrollableArea.h" | 38 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
38 #include "core/paint/PaintPhase.h" | 39 #include "core/paint/PaintPhase.h" |
39 #include "core/paint/ScrollbarManager.h" | 40 #include "core/paint/ScrollbarManager.h" |
40 #include "platform/RuntimeEnabledFeatures.h" | 41 #include "platform/RuntimeEnabledFeatures.h" |
41 #include "platform/Widget.h" | 42 #include "platform/Widget.h" |
42 #include "platform/geometry/IntRect.h" | 43 #include "platform/geometry/IntRect.h" |
43 #include "platform/geometry/LayoutRect.h" | 44 #include "platform/geometry/LayoutRect.h" |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
796 MainThreadScrollingReasons mainThreadScrollingReasons() const; | 797 MainThreadScrollingReasons mainThreadScrollingReasons() const; |
797 // Main thread scrolling reasons for this object only. For all reasons, | 798 // Main thread scrolling reasons for this object only. For all reasons, |
798 // see: mainThreadScrollingReasons(). | 799 // see: mainThreadScrollingReasons(). |
799 MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame() const; | 800 MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame() const; |
800 void adjustStyleRelatedMainThreadScrollingReasons(const uint32_t reason, | 801 void adjustStyleRelatedMainThreadScrollingReasons(const uint32_t reason, |
801 bool increase); | 802 bool increase); |
802 MainThreadScrollingReasons getStyleRelatedMainThreadScrollingReasons() const; | 803 MainThreadScrollingReasons getStyleRelatedMainThreadScrollingReasons() const; |
803 | 804 |
804 bool hasVisibleSlowRepaintViewportConstrainedObjects() const; | 805 bool hasVisibleSlowRepaintViewportConstrainedObjects() const; |
805 | 806 |
807 // Called on a view for a LocalFrame with a RemoteFrame parent. This makes | |
808 // viewport intersection available that accounts for remote ancestor frames | |
809 // and their respective scroll positions, clips, etc. | |
810 void setViewportIntersectionFromParent(const IntRect&); | |
811 IntRect remoteViewportIntersection(); | |
812 | |
813 // This method uses localToAncestorQuad to map a rect into an ancestor's | |
814 // coordinate space, while guaranteeing that the top-level scroll offset | |
815 // is accounted for. This is needed because LayoutView::mapLocalToAncestor() | |
816 // implicitly includes the ancestor frame's scroll offset when there is | |
817 // a remote frame in the ancestor chain, but does not include it when | |
818 // there are only local frames in the frame tree. | |
819 void mapQuadToAncestorFrameIncludingScrollOffset( | |
dcheng
2017/01/05 07:10:19
Can we inline this directly, since it's only used
szager1
2017/01/05 20:25:22
This is a generally useful method, I expect it to
| |
820 LayoutRect&, | |
821 const LayoutObject* descendant, | |
822 const LayoutView* ancestor, | |
823 MapCoordinatesFlags mode); | |
824 | |
806 protected: | 825 protected: |
807 // Scroll the content via the compositor. | 826 // Scroll the content via the compositor. |
808 bool scrollContentsFastPath(const IntSize& scrollDelta); | 827 bool scrollContentsFastPath(const IntSize& scrollDelta); |
809 | 828 |
810 // Scroll the content by invalidating everything. | 829 // Scroll the content by invalidating everything. |
811 void scrollContentsSlowPath(); | 830 void scrollContentsSlowPath(); |
812 | 831 |
813 ScrollBehavior scrollBehaviorStyle() const override; | 832 ScrollBehavior scrollBehaviorStyle() const override; |
814 | 833 |
815 void scrollContentsIfNeeded(); | 834 void scrollContentsIfNeeded(); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1149 | 1168 |
1150 // ScrollbarManager holds the Scrollbar instances. | 1169 // ScrollbarManager holds the Scrollbar instances. |
1151 ScrollbarManager m_scrollbarManager; | 1170 ScrollbarManager m_scrollbarManager; |
1152 | 1171 |
1153 bool m_needsScrollbarsUpdate; | 1172 bool m_needsScrollbarsUpdate; |
1154 bool m_suppressAdjustViewSize; | 1173 bool m_suppressAdjustViewSize; |
1155 bool m_allowsLayoutInvalidationAfterLayoutClean; | 1174 bool m_allowsLayoutInvalidationAfterLayoutClean; |
1156 | 1175 |
1157 Member<ElementVisibilityObserver> m_visibilityObserver; | 1176 Member<ElementVisibilityObserver> m_visibilityObserver; |
1158 | 1177 |
1178 IntRect m_remoteViewportIntersection; | |
1179 | |
1159 // For testing. | 1180 // For testing. |
1160 struct ObjectPaintInvalidation { | 1181 struct ObjectPaintInvalidation { |
1161 String name; | 1182 String name; |
1162 PaintInvalidationReason reason; | 1183 PaintInvalidationReason reason; |
1163 }; | 1184 }; |
1164 std::unique_ptr<Vector<ObjectPaintInvalidation>> | 1185 std::unique_ptr<Vector<ObjectPaintInvalidation>> |
1165 m_trackedObjectPaintInvalidations; | 1186 m_trackedObjectPaintInvalidations; |
1166 | 1187 |
1167 // For Slimming Paint v2 only. | 1188 // For Slimming Paint v2 only. |
1168 std::unique_ptr<PaintController> m_paintController; | 1189 std::unique_ptr<PaintController> m_paintController; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1208 widget.isFrameView()); | 1229 widget.isFrameView()); |
1209 DEFINE_TYPE_CASTS(FrameView, | 1230 DEFINE_TYPE_CASTS(FrameView, |
1210 ScrollableArea, | 1231 ScrollableArea, |
1211 scrollableArea, | 1232 scrollableArea, |
1212 scrollableArea->isFrameView(), | 1233 scrollableArea->isFrameView(), |
1213 scrollableArea.isFrameView()); | 1234 scrollableArea.isFrameView()); |
1214 | 1235 |
1215 } // namespace blink | 1236 } // namespace blink |
1216 | 1237 |
1217 #endif // FrameView_h | 1238 #endif // FrameView_h |
OLD | NEW |