| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 class LayoutObject; | 81 class LayoutObject; |
| 81 class LayoutReplaced; | 82 class LayoutReplaced; |
| 82 class LayoutScrollbarPart; | 83 class LayoutScrollbarPart; |
| 83 class LayoutView; | 84 class LayoutView; |
| 84 class PaintArtifactCompositor; | 85 class PaintArtifactCompositor; |
| 85 class PaintController; | 86 class PaintController; |
| 86 class PaintInvalidationState; | 87 class PaintInvalidationState; |
| 87 class Page; | 88 class Page; |
| 88 class ScrollingCoordinator; | 89 class ScrollingCoordinator; |
| 89 class TracedValue; | 90 class TracedValue; |
| 91 class TransformState; |
| 90 struct AnnotatedRegionValue; | 92 struct AnnotatedRegionValue; |
| 91 struct CompositedSelection; | 93 struct CompositedSelection; |
| 92 | 94 |
| 93 typedef unsigned long long DOMTimeStamp; | 95 typedef unsigned long long DOMTimeStamp; |
| 94 | 96 |
| 95 class CORE_EXPORT FrameView final | 97 class CORE_EXPORT FrameView final |
| 96 : public Widget, | 98 : public Widget, |
| 97 public PaintInvalidationCapableScrollableArea { | 99 public PaintInvalidationCapableScrollableArea { |
| 98 USING_GARBAGE_COLLECTED_MIXIN(FrameView); | 100 USING_GARBAGE_COLLECTED_MIXIN(FrameView); |
| 99 | 101 |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 MainThreadScrollingReasons mainThreadScrollingReasons() const; | 798 MainThreadScrollingReasons mainThreadScrollingReasons() const; |
| 797 // Main thread scrolling reasons for this object only. For all reasons, | 799 // Main thread scrolling reasons for this object only. For all reasons, |
| 798 // see: mainThreadScrollingReasons(). | 800 // see: mainThreadScrollingReasons(). |
| 799 MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame() const; | 801 MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame() const; |
| 800 void adjustStyleRelatedMainThreadScrollingReasons(const uint32_t reason, | 802 void adjustStyleRelatedMainThreadScrollingReasons(const uint32_t reason, |
| 801 bool increase); | 803 bool increase); |
| 802 MainThreadScrollingReasons getStyleRelatedMainThreadScrollingReasons() const; | 804 MainThreadScrollingReasons getStyleRelatedMainThreadScrollingReasons() const; |
| 803 | 805 |
| 804 bool hasVisibleSlowRepaintViewportConstrainedObjects() const; | 806 bool hasVisibleSlowRepaintViewportConstrainedObjects() const; |
| 805 | 807 |
| 808 // Called on a view for a LocalFrame with a RemoteFrame parent. This makes |
| 809 // viewport intersection available that accounts for remote ancestor frames |
| 810 // and their respective scroll positions, clips, etc. |
| 811 void setViewportIntersectionFromParent(const IntRect&); |
| 812 IntRect remoteViewportIntersection(); |
| 813 |
| 814 // This method uses localToAncestorQuad to map a rect into an ancestor's |
| 815 // coordinate space, while guaranteeing that the top-level scroll offset |
| 816 // is accounted for. This is needed because LayoutView::mapLocalToAncestor() |
| 817 // implicitly includes the ancestor frame's scroll offset when there is |
| 818 // a remote frame in the ancestor chain, but does not include it when |
| 819 // there are only local frames in the frame tree. |
| 820 void mapQuadToAncestorFrameIncludingScrollOffset( |
| 821 LayoutRect&, |
| 822 const LayoutObject* descendant, |
| 823 const LayoutView* ancestor, |
| 824 MapCoordinatesFlags mode); |
| 825 |
| 826 bool mapToVisualRectInTopFrameSpace(LayoutRect&); |
| 827 |
| 828 void applyTransformForTopFrameSpace(TransformState&); |
| 829 |
| 806 protected: | 830 protected: |
| 807 // Scroll the content via the compositor. | 831 // Scroll the content via the compositor. |
| 808 bool scrollContentsFastPath(const IntSize& scrollDelta); | 832 bool scrollContentsFastPath(const IntSize& scrollDelta); |
| 809 | 833 |
| 810 // Scroll the content by invalidating everything. | 834 // Scroll the content by invalidating everything. |
| 811 void scrollContentsSlowPath(); | 835 void scrollContentsSlowPath(); |
| 812 | 836 |
| 813 ScrollBehavior scrollBehaviorStyle() const override; | 837 ScrollBehavior scrollBehaviorStyle() const override; |
| 814 | 838 |
| 815 void scrollContentsIfNeeded(); | 839 void scrollContentsIfNeeded(); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 | 1173 |
| 1150 // ScrollbarManager holds the Scrollbar instances. | 1174 // ScrollbarManager holds the Scrollbar instances. |
| 1151 ScrollbarManager m_scrollbarManager; | 1175 ScrollbarManager m_scrollbarManager; |
| 1152 | 1176 |
| 1153 bool m_needsScrollbarsUpdate; | 1177 bool m_needsScrollbarsUpdate; |
| 1154 bool m_suppressAdjustViewSize; | 1178 bool m_suppressAdjustViewSize; |
| 1155 bool m_allowsLayoutInvalidationAfterLayoutClean; | 1179 bool m_allowsLayoutInvalidationAfterLayoutClean; |
| 1156 | 1180 |
| 1157 Member<ElementVisibilityObserver> m_visibilityObserver; | 1181 Member<ElementVisibilityObserver> m_visibilityObserver; |
| 1158 | 1182 |
| 1183 IntRect m_remoteViewportIntersection; |
| 1184 |
| 1159 // For testing. | 1185 // For testing. |
| 1160 struct ObjectPaintInvalidation { | 1186 struct ObjectPaintInvalidation { |
| 1161 String name; | 1187 String name; |
| 1162 PaintInvalidationReason reason; | 1188 PaintInvalidationReason reason; |
| 1163 }; | 1189 }; |
| 1164 std::unique_ptr<Vector<ObjectPaintInvalidation>> | 1190 std::unique_ptr<Vector<ObjectPaintInvalidation>> |
| 1165 m_trackedObjectPaintInvalidations; | 1191 m_trackedObjectPaintInvalidations; |
| 1166 | 1192 |
| 1167 // For Slimming Paint v2 only. | 1193 // For Slimming Paint v2 only. |
| 1168 std::unique_ptr<PaintController> m_paintController; | 1194 std::unique_ptr<PaintController> m_paintController; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 widget.isFrameView()); | 1234 widget.isFrameView()); |
| 1209 DEFINE_TYPE_CASTS(FrameView, | 1235 DEFINE_TYPE_CASTS(FrameView, |
| 1210 ScrollableArea, | 1236 ScrollableArea, |
| 1211 scrollableArea, | 1237 scrollableArea, |
| 1212 scrollableArea->isFrameView(), | 1238 scrollableArea->isFrameView(), |
| 1213 scrollableArea.isFrameView()); | 1239 scrollableArea.isFrameView()); |
| 1214 | 1240 |
| 1215 } // namespace blink | 1241 } // namespace blink |
| 1216 | 1242 |
| 1217 #endif // FrameView_h | 1243 #endif // FrameView_h |
| OLD | NEW |