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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 class Node; | 70 class Node; |
71 class LayoutAnalyzer; | 71 class LayoutAnalyzer; |
72 class LayoutBox; | 72 class LayoutBox; |
73 class LayoutEmbeddedObject; | 73 class LayoutEmbeddedObject; |
74 class LayoutObject; | 74 class LayoutObject; |
75 class LayoutReplaced; | 75 class LayoutReplaced; |
76 class LayoutScrollbarPart; | 76 class LayoutScrollbarPart; |
77 class LayoutView; | 77 class LayoutView; |
78 class PaintInvalidationState; | 78 class PaintInvalidationState; |
79 class Page; | 79 class Page; |
| 80 class ScrollAndScaleEmulator; |
80 class ScrollingCoordinator; | 81 class ScrollingCoordinator; |
81 class TracedValue; | 82 class TracedValue; |
82 struct AnnotatedRegionValue; | 83 struct AnnotatedRegionValue; |
83 struct CompositedSelection; | 84 struct CompositedSelection; |
84 | 85 |
85 typedef unsigned long long DOMTimeStamp; | 86 typedef unsigned long long DOMTimeStamp; |
86 | 87 |
87 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab
leScrollableArea { | 88 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab
leScrollableArea { |
88 USING_GARBAGE_COLLECTED_MIXIN(FrameView); | 89 USING_GARBAGE_COLLECTED_MIXIN(FrameView); |
89 | 90 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 184 |
184 // Scale used to convert incoming input events. | 185 // Scale used to convert incoming input events. |
185 float inputEventsScaleFactor() const; | 186 float inputEventsScaleFactor() const; |
186 | 187 |
187 // Offset used to convert incoming input events while emulating device metic
s. | 188 // Offset used to convert incoming input events while emulating device metic
s. |
188 IntSize inputEventsOffsetForEmulation() const; | 189 IntSize inputEventsOffsetForEmulation() const; |
189 void setInputEventsTransformForEmulation(const IntSize&, float); | 190 void setInputEventsTransformForEmulation(const IntSize&, float); |
190 | 191 |
191 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; | 192 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; |
192 | 193 |
| 194 // Override the scroll position with values from the emulator. Passing |null
ptr| clears override. |
| 195 void setScrollAndScaleEmulator(ScrollAndScaleEmulator*); |
| 196 |
193 void didUpdateElasticOverscroll(); | 197 void didUpdateElasticOverscroll(); |
194 | 198 |
195 void viewportSizeChanged(bool widthChanged, bool heightChanged); | 199 void viewportSizeChanged(bool widthChanged, bool heightChanged); |
196 | 200 |
197 AtomicString mediaType() const; | 201 AtomicString mediaType() const; |
198 void setMediaType(const AtomicString&); | 202 void setMediaType(const AtomicString&); |
199 void adjustMediaTypeForPrinting(bool printing); | 203 void adjustMediaTypeForPrinting(bool printing); |
200 | 204 |
201 WebDisplayMode displayMode() { return m_displayMode; } | 205 WebDisplayMode displayMode() { return m_displayMode; } |
202 void setDisplayMode(WebDisplayMode); | 206 void setDisplayMode(WebDisplayMode); |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 void adjustScrollbarOpacity(); | 746 void adjustScrollbarOpacity(); |
743 void adjustScrollPositionFromUpdateScrollbars(); | 747 void adjustScrollPositionFromUpdateScrollbars(); |
744 bool visualViewportSuppliesScrollbars() const; | 748 bool visualViewportSuppliesScrollbars() const; |
745 | 749 |
746 IntRect rectToCopyOnScroll() const; | 750 IntRect rectToCopyOnScroll() const; |
747 | 751 |
748 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } | 752 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } |
749 | 753 |
750 ScrollingCoordinator* scrollingCoordinator() const; | 754 ScrollingCoordinator* scrollingCoordinator() const; |
751 | 755 |
| 756 // Calculate the physical minimum/maximum scroll positions without any overr
ides applied. |
| 757 IntPoint calculateMinimumScrollPosition() const; |
| 758 IntPoint calculateMaximumScrollPosition() const; |
| 759 |
752 void prepareLayoutAnalyzer(); | 760 void prepareLayoutAnalyzer(); |
753 std::unique_ptr<TracedValue> analyzerCounters(); | 761 std::unique_ptr<TracedValue> analyzerCounters(); |
754 | 762 |
755 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). | 763 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). |
756 LayoutObject* viewportLayoutObject(); | 764 LayoutObject* viewportLayoutObject(); |
757 | 765 |
758 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c
onst; | 766 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c
onst; |
759 | 767 |
760 template <typename Function> void forAllNonThrottledFrameViews(const Functio
n&); | 768 template <typename Function> void forAllNonThrottledFrameViews(const Functio
n&); |
761 | 769 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 | 868 |
861 bool m_horizontalScrollbarLock; | 869 bool m_horizontalScrollbarLock; |
862 bool m_verticalScrollbarLock; | 870 bool m_verticalScrollbarLock; |
863 | 871 |
864 ChildrenWidgetSet m_children; | 872 ChildrenWidgetSet m_children; |
865 | 873 |
866 DoubleSize m_pendingScrollDelta; | 874 DoubleSize m_pendingScrollDelta; |
867 DoublePoint m_scrollPosition; | 875 DoublePoint m_scrollPosition; |
868 IntSize m_contentsSize; | 876 IntSize m_contentsSize; |
869 | 877 |
| 878 Member<ScrollAndScaleEmulator> m_scrollAndScaleEmulator; |
| 879 |
870 int m_scrollbarsAvoidingResizer; | 880 int m_scrollbarsAvoidingResizer; |
871 bool m_scrollbarsSuppressed; | 881 bool m_scrollbarsSuppressed; |
872 | 882 |
873 bool m_inUpdateScrollbars; | 883 bool m_inUpdateScrollbars; |
874 | 884 |
875 std::unique_ptr<LayoutAnalyzer> m_analyzer; | 885 std::unique_ptr<LayoutAnalyzer> m_analyzer; |
876 | 886 |
877 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 887 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
878 // and the Frame Timing regions should be recalculated. | 888 // and the Frame Timing regions should be recalculated. |
879 bool m_frameTimingRequestsDirty; | 889 bool m_frameTimingRequestsDirty; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 957 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
948 setIsVisuallyNonEmpty(); | 958 setIsVisuallyNonEmpty(); |
949 } | 959 } |
950 | 960 |
951 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 961 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
952 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 962 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
953 | 963 |
954 } // namespace blink | 964 } // namespace blink |
955 | 965 |
956 #endif // FrameView_h | 966 #endif // FrameView_h |
OLD | NEW |