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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 439 |
439 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb
arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } | 440 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb
arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } |
440 | 441 |
441 // The visible content rect has a location that is the scrolled offset of | 442 // The visible content rect has a location that is the scrolled offset of |
442 // the document. The width and height are the layout viewport width and | 443 // the document. The width and height are the layout viewport width and |
443 // height. By default the scrollbars themselves are excluded from this | 444 // height. By default the scrollbars themselves are excluded from this |
444 // rectangle, but an optional boolean argument allows them to be included. | 445 // rectangle, but an optional boolean argument allows them to be included. |
445 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t override; | 446 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t override; |
446 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t; | 447 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t; |
447 | 448 |
| 449 // Clips the provided rect to the visible content area. For this purpose, we |
| 450 // also query the chrome client for any active overrides to the visible area |
| 451 // (e.g. DevTool's viewport override). |
| 452 void clipPaintRect(FloatRect*) const; |
| 453 |
448 // Functions for getting/setting the size of the document contained inside t
he FrameView (as an IntSize or as individual width and height | 454 // Functions for getting/setting the size of the document contained inside t
he FrameView (as an IntSize or as individual width and height |
449 // values). | 455 // values). |
450 IntSize contentsSize() const override; // Always at least as big as the visi
bleWidth()/visibleHeight(). | 456 IntSize contentsSize() const override; // Always at least as big as the visi
bleWidth()/visibleHeight(). |
451 int contentsWidth() const { return contentsSize().width(); } | 457 int contentsWidth() const { return contentsSize().width(); } |
452 int contentsHeight() const { return contentsSize().height(); } | 458 int contentsHeight() const { return contentsSize().height(); } |
453 | 459 |
454 // Functions for querying the current scrolled position (both as a point, a
size, or as individual X and Y values). | 460 // Functions for querying the current scrolled position (both as a point, a
size, or as individual X and Y values). |
455 // Be careful in using the Double version scrollPositionDouble() and scrollO
ffsetDouble(). They are meant to be | 461 // Be careful in using the Double version scrollPositionDouble() and scrollO
ffsetDouble(). They are meant to be |
456 // used to communicate the fractional scroll position/offset with chromium c
ompositor which can do sub-pixel positioning. | 462 // used to communicate the fractional scroll position/offset with chromium c
ompositor which can do sub-pixel positioning. |
457 // Do not call these if the scroll position/offset is used in Blink for posi
tioning. Use the Int version instead. | 463 // Do not call these if the scroll position/offset is used in Blink for posi
tioning. Use the Int version instead. |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 983 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
978 setIsVisuallyNonEmpty(); | 984 setIsVisuallyNonEmpty(); |
979 } | 985 } |
980 | 986 |
981 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 987 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
982 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 988 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
983 | 989 |
984 } // namespace blink | 990 } // namespace blink |
985 | 991 |
986 #endif // FrameView_h | 992 #endif // FrameView_h |
OLD | NEW |