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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 | 441 |
442 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } | 442 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } |
443 | 443 |
444 // The visible content rect has a location that is the scrolled offset of | 444 // The visible content rect has a location that is the scrolled offset of |
445 // the document. The width and height are the layout viewport width and | 445 // the document. The width and height are the layout viewport width and |
446 // height. By default the scrollbars themselves are excluded from this | 446 // height. By default the scrollbars themselves are excluded from this |
447 // rectangle, but an optional boolean argument allows them to be included. | 447 // rectangle, but an optional boolean argument allows them to be included. |
448 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t override; | 448 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t override; |
449 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons t; | 449 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons t; |
450 | 450 |
451 // Set a custom recording area. Used for composited area overrides to ensure | |
Sami
2016/08/11 10:09:07
I still think we should call this painting instead
Eric Seckler
2016/08/11 11:34:45
Alright :)
| |
452 // that the content inside the area is recorded. If not set, the recording | |
453 // area defaults to visibleContentRect(). | |
454 void setVisibleContentRectForRecording(const IntRect&); | |
455 void resetVisibleContentRectForRecording(); | |
456 IntRect visibleContentRectForRecording() const; | |
457 IntSize visibleContentSizeForRecording() const; | |
Sami
2016/08/11 10:09:07
Unused?
Eric Seckler
2016/08/11 11:34:45
True, don't need it ATM.
| |
458 | |
451 // 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 |
452 // values). | 460 // values). |
453 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(). |
454 int contentsWidth() const { return contentsSize().width(); } | 462 int contentsWidth() const { return contentsSize().width(); } |
455 int contentsHeight() const { return contentsSize().height(); } | 463 int contentsHeight() const { return contentsSize().height(); } |
456 | 464 |
457 // 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). |
458 // 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 |
459 // 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. |
460 // 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
867 ScrollbarMode m_verticalScrollbarMode; | 875 ScrollbarMode m_verticalScrollbarMode; |
868 | 876 |
869 bool m_horizontalScrollbarLock; | 877 bool m_horizontalScrollbarLock; |
870 bool m_verticalScrollbarLock; | 878 bool m_verticalScrollbarLock; |
871 | 879 |
872 ChildrenWidgetSet m_children; | 880 ChildrenWidgetSet m_children; |
873 | 881 |
874 DoubleSize m_pendingScrollDelta; | 882 DoubleSize m_pendingScrollDelta; |
875 DoublePoint m_scrollPosition; | 883 DoublePoint m_scrollPosition; |
876 IntSize m_contentsSize; | 884 IntSize m_contentsSize; |
885 std::unique_ptr<IntRect> m_visibleContentRectForRecording; | |
877 | 886 |
878 int m_scrollbarsAvoidingResizer; | 887 int m_scrollbarsAvoidingResizer; |
879 bool m_scrollbarsSuppressed; | 888 bool m_scrollbarsSuppressed; |
880 | 889 |
881 bool m_inUpdateScrollbars; | 890 bool m_inUpdateScrollbars; |
882 | 891 |
883 std::unique_ptr<LayoutAnalyzer> m_analyzer; | 892 std::unique_ptr<LayoutAnalyzer> m_analyzer; |
884 | 893 |
885 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 894 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
886 // and the Frame Timing regions should be recalculated. | 895 // and the Frame Timing regions should be recalculated. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
958 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 967 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
959 setIsVisuallyNonEmpty(); | 968 setIsVisuallyNonEmpty(); |
960 } | 969 } |
961 | 970 |
962 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); | 971 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); |
963 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); | 972 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); |
964 | 973 |
965 } // namespace blink | 974 } // namespace blink |
966 | 975 |
967 #endif // FrameView_h | 976 #endif // FrameView_h |
OLD | NEW |