Chromium Code Reviews| 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 // Clips the provided rect to the visible content area. For this purpose, we | |
| 455 // also query the chrome client for any active overrides to the visible area | |
| 456 // (e.g. DevTool's viewport override). | |
| 457 void clipPaintRect(FloatRect*) const; | |
|
chrishtr
2016/08/22 22:00:42
Why provide a clipPaintRect method instead of just
Eric Seckler
2016/08/23 09:32:18
Actually, because I was thinking we could move the
| |
| 458 | |
| 453 // Functions for getting/setting the size of the document contained inside t he FrameView (as an IntSize or as individual width and height | 459 // 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). | 460 // values). |
| 455 IntSize contentsSize() const override; // Always at least as big as the visi bleWidth()/visibleHeight(). | 461 IntSize contentsSize() const override; // Always at least as big as the visi bleWidth()/visibleHeight(). |
| 456 int contentsWidth() const { return contentsSize().width(); } | 462 int contentsWidth() const { return contentsSize().width(); } |
| 457 int contentsHeight() const { return contentsSize().height(); } | 463 int contentsHeight() const { return contentsSize().height(); } |
| 458 | 464 |
| 459 // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values). | 465 // 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 | 466 // 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. | 467 // 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. | 468 // 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; | 877 ScrollbarMode m_verticalScrollbarMode; |
| 872 | 878 |
| 873 bool m_horizontalScrollbarLock; | 879 bool m_horizontalScrollbarLock; |
| 874 bool m_verticalScrollbarLock; | 880 bool m_verticalScrollbarLock; |
| 875 | 881 |
| 876 ChildrenWidgetSet m_children; | 882 ChildrenWidgetSet m_children; |
| 877 | 883 |
| 878 DoubleSize m_pendingScrollDelta; | 884 DoubleSize m_pendingScrollDelta; |
| 879 DoublePoint m_scrollPosition; | 885 DoublePoint m_scrollPosition; |
| 880 IntSize m_contentsSize; | 886 IntSize m_contentsSize; |
| 887 WTF::Optional<IntRect> m_visibleContentRectForPainting; | |
| 881 | 888 |
| 882 int m_scrollbarsAvoidingResizer; | 889 int m_scrollbarsAvoidingResizer; |
| 883 bool m_scrollbarsSuppressed; | 890 bool m_scrollbarsSuppressed; |
| 884 | 891 |
| 885 bool m_inUpdateScrollbars; | 892 bool m_inUpdateScrollbars; |
| 886 | 893 |
| 887 std::unique_ptr<LayoutAnalyzer> m_analyzer; | 894 std::unique_ptr<LayoutAnalyzer> m_analyzer; |
| 888 | 895 |
| 889 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 896 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
| 890 // and the Frame Timing regions should be recalculated. | 897 // 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) | 970 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 964 setIsVisuallyNonEmpty(); | 971 setIsVisuallyNonEmpty(); |
| 965 } | 972 } |
| 966 | 973 |
| 967 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); | 974 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); |
| 968 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); | 975 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); |
| 969 | 976 |
| 970 } // namespace blink | 977 } // namespace blink |
| 971 | 978 |
| 972 #endif // FrameView_h | 979 #endif // FrameView_h |
| OLD | NEW |