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 reserv
ed. | 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
8 | 8 |
9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "core/layout/ScrollAnchor.h" | 33 #include "core/layout/ScrollAnchor.h" |
34 #include "core/paint/FirstMeaningfulPaintDetector.h" | 34 #include "core/paint/FirstMeaningfulPaintDetector.h" |
35 #include "core/paint/ObjectPaintProperties.h" | 35 #include "core/paint/ObjectPaintProperties.h" |
36 #include "core/paint/PaintInvalidationCapableScrollableArea.h" | 36 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
37 #include "core/paint/PaintPhase.h" | 37 #include "core/paint/PaintPhase.h" |
38 #include "platform/RuntimeEnabledFeatures.h" | 38 #include "platform/RuntimeEnabledFeatures.h" |
39 #include "platform/Widget.h" | 39 #include "platform/Widget.h" |
40 #include "platform/geometry/IntRect.h" | 40 #include "platform/geometry/IntRect.h" |
41 #include "platform/geometry/LayoutRect.h" | 41 #include "platform/geometry/LayoutRect.h" |
42 #include "platform/graphics/Color.h" | 42 #include "platform/graphics/Color.h" |
| 43 #include "platform/graphics/GraphicsLayerClient.h" |
43 #include "platform/scroll/ScrollTypes.h" | 44 #include "platform/scroll/ScrollTypes.h" |
44 #include "platform/scroll/Scrollbar.h" | 45 #include "platform/scroll/Scrollbar.h" |
45 #include "public/platform/WebDisplayMode.h" | 46 #include "public/platform/WebDisplayMode.h" |
46 #include "public/platform/WebRect.h" | 47 #include "public/platform/WebRect.h" |
47 #include "wtf/Allocator.h" | 48 #include "wtf/Allocator.h" |
48 #include "wtf/AutoReset.h" | 49 #include "wtf/AutoReset.h" |
49 #include "wtf/Forward.h" | 50 #include "wtf/Forward.h" |
50 #include "wtf/HashSet.h" | 51 #include "wtf/HashSet.h" |
51 #include "wtf/ListHashSet.h" | 52 #include "wtf/ListHashSet.h" |
52 #include "wtf/text/WTFString.h" | 53 #include "wtf/text/WTFString.h" |
53 #include <memory> | 54 #include <memory> |
54 | 55 |
55 namespace blink { | 56 namespace blink { |
56 | 57 |
57 class AXObjectCache; | 58 class AXObjectCache; |
58 class CancellableTaskFactory; | 59 class CancellableTaskFactory; |
59 class ComputedStyle; | 60 class ComputedStyle; |
60 class DocumentLifecycle; | 61 class DocumentLifecycle; |
61 class Cursor; | 62 class Cursor; |
62 class Element; | 63 class Element; |
63 class FloatSize; | 64 class FloatSize; |
64 class HTMLFrameOwnerElement; | 65 class HTMLFrameOwnerElement; |
65 class JSONArray; | 66 class JSONArray; |
| 67 class JSONObject; |
66 class LayoutViewItem; | 68 class LayoutViewItem; |
67 class LayoutPart; | 69 class LayoutPart; |
68 class LocalFrame; | 70 class LocalFrame; |
69 class KURL; | 71 class KURL; |
70 class Node; | 72 class Node; |
71 class LayoutAnalyzer; | 73 class LayoutAnalyzer; |
72 class LayoutBox; | 74 class LayoutBox; |
73 class LayoutEmbeddedObject; | 75 class LayoutEmbeddedObject; |
74 class LayoutObject; | 76 class LayoutObject; |
75 class LayoutReplaced; | 77 class LayoutReplaced; |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 714 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
713 FloatSize viewportSizeForViewportUnits() const; | 715 FloatSize viewportSizeForViewportUnits() const; |
714 | 716 |
715 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } | 717 ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; } |
716 void clearScrollAnchor(); | 718 void clearScrollAnchor(); |
717 bool shouldPerformScrollAnchoring() const override; | 719 bool shouldPerformScrollAnchoring() const override; |
718 | 720 |
719 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into PaintInvalid
ator. | 721 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into PaintInvalid
ator. |
720 void invalidatePaintIfNeeded(const PaintInvalidationState&); | 722 void invalidatePaintIfNeeded(const PaintInvalidationState&); |
721 | 723 |
| 724 // Only for SPv2. |
| 725 std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags); |
| 726 |
722 protected: | 727 protected: |
723 // Scroll the content via the compositor. | 728 // Scroll the content via the compositor. |
724 bool scrollContentsFastPath(const IntSize& scrollDelta); | 729 bool scrollContentsFastPath(const IntSize& scrollDelta); |
725 | 730 |
726 // Scroll the content by invalidating everything. | 731 // Scroll the content by invalidating everything. |
727 void scrollContentsSlowPath(); | 732 void scrollContentsSlowPath(); |
728 | 733 |
729 // These functions are used to create/destroy scrollbars. | 734 // These functions are used to create/destroy scrollbars. |
730 void setHasHorizontalScrollbar(bool); | 735 void setHasHorizontalScrollbar(bool); |
731 void setHasVerticalScrollbar(bool); | 736 void setHasVerticalScrollbar(bool); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 widget.isFrameView()); | 1092 widget.isFrameView()); |
1088 DEFINE_TYPE_CASTS(FrameView, | 1093 DEFINE_TYPE_CASTS(FrameView, |
1089 ScrollableArea, | 1094 ScrollableArea, |
1090 scrollableArea, | 1095 scrollableArea, |
1091 scrollableArea->isFrameView(), | 1096 scrollableArea->isFrameView(), |
1092 scrollableArea.isFrameView()); | 1097 scrollableArea.isFrameView()); |
1093 | 1098 |
1094 } // namespace blink | 1099 } // namespace blink |
1095 | 1100 |
1096 #endif // FrameView_h | 1101 #endif // FrameView_h |
OLD | NEW |