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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 class Node; | 71 class Node; |
72 class LayoutAnalyzer; | 72 class LayoutAnalyzer; |
73 class LayoutBox; | 73 class LayoutBox; |
74 class LayoutEmbeddedObject; | 74 class LayoutEmbeddedObject; |
75 class LayoutObject; | 75 class LayoutObject; |
76 class LayoutReplaced; | 76 class LayoutReplaced; |
77 class LayoutScrollbarPart; | 77 class LayoutScrollbarPart; |
78 class LayoutView; | 78 class LayoutView; |
79 class PaintInvalidationState; | 79 class PaintInvalidationState; |
80 class Page; | 80 class Page; |
| 81 class ScrollAndScaleEmulator; |
81 class ScrollingCoordinator; | 82 class ScrollingCoordinator; |
82 class TracedValue; | 83 class TracedValue; |
83 struct AnnotatedRegionValue; | 84 struct AnnotatedRegionValue; |
84 struct CompositedSelection; | 85 struct CompositedSelection; |
85 | 86 |
86 typedef unsigned long long DOMTimeStamp; | 87 typedef unsigned long long DOMTimeStamp; |
87 | 88 |
88 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab
leScrollableArea { | 89 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab
leScrollableArea { |
89 USING_GARBAGE_COLLECTED_MIXIN(FrameView); | 90 USING_GARBAGE_COLLECTED_MIXIN(FrameView); |
90 | 91 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 185 |
185 // Scale used to convert incoming input events. | 186 // Scale used to convert incoming input events. |
186 float inputEventsScaleFactor() const; | 187 float inputEventsScaleFactor() const; |
187 | 188 |
188 // Offset used to convert incoming input events while emulating device metic
s. | 189 // Offset used to convert incoming input events while emulating device metic
s. |
189 IntSize inputEventsOffsetForEmulation() const; | 190 IntSize inputEventsOffsetForEmulation() const; |
190 void setInputEventsTransformForEmulation(const IntSize&, float); | 191 void setInputEventsTransformForEmulation(const IntSize&, float); |
191 | 192 |
192 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; | 193 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; |
193 | 194 |
| 195 // Override the scroll position with values from the emulator. Passing |null
ptr| clears override. |
| 196 void setScrollAndScaleEmulator(ScrollAndScaleEmulator*); |
| 197 |
194 void didUpdateElasticOverscroll(); | 198 void didUpdateElasticOverscroll(); |
195 | 199 |
196 void viewportSizeChanged(bool widthChanged, bool heightChanged); | 200 void viewportSizeChanged(bool widthChanged, bool heightChanged); |
197 | 201 |
198 AtomicString mediaType() const; | 202 AtomicString mediaType() const; |
199 void setMediaType(const AtomicString&); | 203 void setMediaType(const AtomicString&); |
200 void adjustMediaTypeForPrinting(bool printing); | 204 void adjustMediaTypeForPrinting(bool printing); |
201 | 205 |
202 WebDisplayMode displayMode() { return m_displayMode; } | 206 WebDisplayMode displayMode() { return m_displayMode; } |
203 void setDisplayMode(WebDisplayMode); | 207 void setDisplayMode(WebDisplayMode); |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 void adjustScrollbarOpacity(); | 759 void adjustScrollbarOpacity(); |
756 void adjustScrollPositionFromUpdateScrollbars(); | 760 void adjustScrollPositionFromUpdateScrollbars(); |
757 bool visualViewportSuppliesScrollbars() const; | 761 bool visualViewportSuppliesScrollbars() const; |
758 | 762 |
759 IntRect rectToCopyOnScroll() const; | 763 IntRect rectToCopyOnScroll() const; |
760 | 764 |
761 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } | 765 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } |
762 | 766 |
763 ScrollingCoordinator* scrollingCoordinator() const; | 767 ScrollingCoordinator* scrollingCoordinator() const; |
764 | 768 |
| 769 // Calculate the physical minimum/maximum scroll positions without any overr
ides applied. |
| 770 IntPoint calculateMinimumScrollPosition() const; |
| 771 IntPoint calculateMaximumScrollPosition() const; |
| 772 |
765 void prepareLayoutAnalyzer(); | 773 void prepareLayoutAnalyzer(); |
766 std::unique_ptr<TracedValue> analyzerCounters(); | 774 std::unique_ptr<TracedValue> analyzerCounters(); |
767 | 775 |
768 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). | 776 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). |
769 LayoutObject* viewportLayoutObject() const; | 777 LayoutObject* viewportLayoutObject() const; |
770 | 778 |
771 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c
onst; | 779 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c
onst; |
772 | 780 |
773 template <typename Function> void forAllNonThrottledFrameViews(const Functio
n&); | 781 template <typename Function> void forAllNonThrottledFrameViews(const Functio
n&); |
774 | 782 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 | 880 |
873 bool m_horizontalScrollbarLock; | 881 bool m_horizontalScrollbarLock; |
874 bool m_verticalScrollbarLock; | 882 bool m_verticalScrollbarLock; |
875 | 883 |
876 ChildrenWidgetSet m_children; | 884 ChildrenWidgetSet m_children; |
877 | 885 |
878 DoubleSize m_pendingScrollDelta; | 886 DoubleSize m_pendingScrollDelta; |
879 DoublePoint m_scrollPosition; | 887 DoublePoint m_scrollPosition; |
880 IntSize m_contentsSize; | 888 IntSize m_contentsSize; |
881 | 889 |
| 890 Member<ScrollAndScaleEmulator> m_scrollAndScaleEmulator; |
| 891 |
882 int m_scrollbarsAvoidingResizer; | 892 int m_scrollbarsAvoidingResizer; |
883 bool m_scrollbarsSuppressed; | 893 bool m_scrollbarsSuppressed; |
884 | 894 |
885 bool m_inUpdateScrollbars; | 895 bool m_inUpdateScrollbars; |
886 | 896 |
887 std::unique_ptr<LayoutAnalyzer> m_analyzer; | 897 std::unique_ptr<LayoutAnalyzer> m_analyzer; |
888 | 898 |
889 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 899 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
890 // and the Frame Timing regions should be recalculated. | 900 // and the Frame Timing regions should be recalculated. |
891 bool m_frameTimingRequestsDirty; | 901 bool m_frameTimingRequestsDirty; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 973 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
964 setIsVisuallyNonEmpty(); | 974 setIsVisuallyNonEmpty(); |
965 } | 975 } |
966 | 976 |
967 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 977 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
968 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 978 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
969 | 979 |
970 } // namespace blink | 980 } // namespace blink |
971 | 981 |
972 #endif // FrameView_h | 982 #endif // FrameView_h |
OLD | NEW |