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; | |
| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 877 ScrollbarMode m_verticalScrollbarMode; | 883 ScrollbarMode m_verticalScrollbarMode; |
| 878 | 884 |
| 879 bool m_horizontalScrollbarLock; | 885 bool m_horizontalScrollbarLock; |
| 880 bool m_verticalScrollbarLock; | 886 bool m_verticalScrollbarLock; |
| 881 | 887 |
| 882 ChildrenWidgetSet m_children; | 888 ChildrenWidgetSet m_children; |
| 883 | 889 |
| 884 DoubleSize m_pendingScrollDelta; | 890 DoubleSize m_pendingScrollDelta; |
| 885 DoublePoint m_scrollPosition; | 891 DoublePoint m_scrollPosition; |
| 886 IntSize m_contentsSize; | 892 IntSize m_contentsSize; |
| 893 WTF::Optional<IntRect> m_visibleContentRectForPainting; | |
|
dgozman
2016/08/29 20:45:36
Unused.
Eric Seckler
2016/09/12 13:58:00
Done.
| |
| 887 | 894 |
| 888 int m_scrollbarsAvoidingResizer; | 895 int m_scrollbarsAvoidingResizer; |
| 889 bool m_scrollbarsSuppressed; | 896 bool m_scrollbarsSuppressed; |
| 890 | 897 |
| 891 bool m_inUpdateScrollbars; | 898 bool m_inUpdateScrollbars; |
| 892 | 899 |
| 893 std::unique_ptr<LayoutAnalyzer> m_analyzer; | 900 std::unique_ptr<LayoutAnalyzer> m_analyzer; |
| 894 | 901 |
| 895 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 902 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
| 896 // and the Frame Timing regions should be recalculated. | 903 // and the Frame Timing regions should be recalculated. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 969 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 976 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 970 setIsVisuallyNonEmpty(); | 977 setIsVisuallyNonEmpty(); |
| 971 } | 978 } |
| 972 | 979 |
| 973 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); | 980 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); |
| 974 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); | 981 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); |
| 975 | 982 |
| 976 } // namespace blink | 983 } // namespace blink |
| 977 | 984 |
| 978 #endif // FrameView_h | 985 #endif // FrameView_h |
| OLD | NEW |