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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 void adjustViewSizeAndLayout(); | 184 void adjustViewSizeAndLayout(); |
185 | 185 |
186 // Scale used to convert incoming input events. | 186 // Scale used to convert incoming input events. |
187 float inputEventsScaleFactor() const; | 187 float inputEventsScaleFactor() const; |
188 | 188 |
189 // 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. |
190 IntSize inputEventsOffsetForEmulation() const; | 190 IntSize inputEventsOffsetForEmulation() const; |
191 void setInputEventsTransformForEmulation(const IntSize&, float); | 191 void setInputEventsTransformForEmulation(const IntSize&, float); |
192 | 192 |
193 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; | 193 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; |
| 194 void didChangeScrollOffset(); |
194 | 195 |
195 void didUpdateElasticOverscroll(); | 196 void didUpdateElasticOverscroll(); |
196 | 197 |
197 void viewportSizeChanged(bool widthChanged, bool heightChanged); | 198 void viewportSizeChanged(bool widthChanged, bool heightChanged); |
198 | 199 |
199 AtomicString mediaType() const; | 200 AtomicString mediaType() const; |
200 void setMediaType(const AtomicString&); | 201 void setMediaType(const AtomicString&); |
201 void adjustMediaTypeForPrinting(bool printing); | 202 void adjustMediaTypeForPrinting(bool printing); |
202 | 203 |
203 WebDisplayMode displayMode() { return m_displayMode; } | 204 WebDisplayMode displayMode() { return m_displayMode; } |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 444 |
444 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb
arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } | 445 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb
arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } |
445 | 446 |
446 // The visible content rect has a location that is the scrolled offset of | 447 // The visible content rect has a location that is the scrolled offset of |
447 // the document. The width and height are the layout viewport width and | 448 // the document. The width and height are the layout viewport width and |
448 // height. By default the scrollbars themselves are excluded from this | 449 // height. By default the scrollbars themselves are excluded from this |
449 // rectangle, but an optional boolean argument allows them to be included. | 450 // rectangle, but an optional boolean argument allows them to be included. |
450 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t override; | 451 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t override; |
451 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t; | 452 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t; |
452 | 453 |
| 454 // Set a custom painting area. This is and should only be used for DevTools' |
| 455 // visual transform overrides to ensure that the content inside the |
| 456 // overridden visible area is painted. If not set, the painting area |
| 457 // defaults to visibleContentRect(). |
| 458 void setVisibleContentRectForPainting(const IntRect&); |
| 459 void resetVisibleContentRectForPainting(); |
| 460 IntRect visibleContentRectForPainting() const; |
| 461 |
453 // Functions for getting/setting the size of the document contained inside t
he FrameView (as an IntSize or as individual width and height | 462 // Functions for getting/setting the size of the document contained inside t
he FrameView (as an IntSize or as individual width and height |
454 // values). | 463 // values). |
455 IntSize contentsSize() const override; // Always at least as big as the visi
bleWidth()/visibleHeight(). | 464 IntSize contentsSize() const override; // Always at least as big as the visi
bleWidth()/visibleHeight(). |
456 int contentsWidth() const { return contentsSize().width(); } | 465 int contentsWidth() const { return contentsSize().width(); } |
457 int contentsHeight() const { return contentsSize().height(); } | 466 int contentsHeight() const { return contentsSize().height(); } |
458 | 467 |
459 // Functions for querying the current scrolled position (both as a point, a
size, or as individual X and Y values). | 468 // Functions for querying the current scrolled position (both as a point, a
size, or as individual X and Y values). |
460 // Be careful in using the Double version scrollPositionDouble() and scrollO
ffsetDouble(). They are meant to be | 469 // Be careful in using the Double version scrollPositionDouble() and scrollO
ffsetDouble(). They are meant to be |
461 // used to communicate the fractional scroll position/offset with chromium c
ompositor which can do sub-pixel positioning. | 470 // used to communicate the fractional scroll position/offset with chromium c
ompositor which can do sub-pixel positioning. |
462 // Do not call these if the scroll position/offset is used in Blink for posi
tioning. Use the Int version instead. | 471 // Do not call these if the scroll position/offset is used in Blink for posi
tioning. Use the Int version instead. |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 ScrollbarMode m_verticalScrollbarMode; | 880 ScrollbarMode m_verticalScrollbarMode; |
872 | 881 |
873 bool m_horizontalScrollbarLock; | 882 bool m_horizontalScrollbarLock; |
874 bool m_verticalScrollbarLock; | 883 bool m_verticalScrollbarLock; |
875 | 884 |
876 ChildrenWidgetSet m_children; | 885 ChildrenWidgetSet m_children; |
877 | 886 |
878 DoubleSize m_pendingScrollDelta; | 887 DoubleSize m_pendingScrollDelta; |
879 DoublePoint m_scrollPosition; | 888 DoublePoint m_scrollPosition; |
880 IntSize m_contentsSize; | 889 IntSize m_contentsSize; |
| 890 WTF::Optional<IntRect> m_visibleContentRectForPainting; |
881 | 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. |
(...skipping 72 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 |