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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 // be the RootFrameViewport, which adds pinch-zoom semantics to scrolling. | 565 // be the RootFrameViewport, which adds pinch-zoom semantics to scrolling. |
566 // For non-root frames, this will be the the ScrollableArea used by the | 566 // For non-root frames, this will be the the ScrollableArea used by the |
567 // FrameView, depending on whether root-layer-scrolls is enabled. | 567 // FrameView, depending on whether root-layer-scrolls is enabled. |
568 ScrollableArea* getScrollableArea(); | 568 ScrollableArea* getScrollableArea(); |
569 | 569 |
570 // Used to get at the underlying layoutViewport in the rare instances where | 570 // Used to get at the underlying layoutViewport in the rare instances where |
571 // we actually want to scroll *just* the layout viewport (e.g. when sending | 571 // we actually want to scroll *just* the layout viewport (e.g. when sending |
572 // deltas from CC). For typical scrolling cases, use getScrollableArea(). | 572 // deltas from CC). For typical scrolling cases, use getScrollableArea(). |
573 ScrollableArea* layoutViewportScrollableArea(); | 573 ScrollableArea* layoutViewportScrollableArea(); |
574 | 574 |
| 575 // If this is the main frame, this will return the RootFrameViewport used |
| 576 // to scroll the main frame. Otherwise returns nullptr. Unless you need a |
| 577 // unique method on RootFrameViewport, you should probably use |
| 578 // getScrollableArea. |
| 579 RootFrameViewport* getRootFrameViewport(); |
| 580 |
575 int viewportWidth() const; | 581 int viewportWidth() const; |
576 | 582 |
577 LayoutAnalyzer* layoutAnalyzer() { return m_analyzer.get(); } | 583 LayoutAnalyzer* layoutAnalyzer() { return m_analyzer.get(); } |
578 | 584 |
579 // Returns true if this frame should not render or schedule visual updates. | 585 // Returns true if this frame should not render or schedule visual updates. |
580 bool shouldThrottleRendering() const; | 586 bool shouldThrottleRendering() const; |
581 | 587 |
582 // Returns true if this frame could potentially skip rendering and avoid | 588 // Returns true if this frame could potentially skip rendering and avoid |
583 // scheduling visual updates. | 589 // scheduling visual updates. |
584 bool canThrottleRendering() const; | 590 bool canThrottleRendering() const; |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 | 888 |
883 std::unique_ptr<LayoutAnalyzer> m_analyzer; | 889 std::unique_ptr<LayoutAnalyzer> m_analyzer; |
884 | 890 |
885 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 891 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
886 // and the Frame Timing regions should be recalculated. | 892 // and the Frame Timing regions should be recalculated. |
887 bool m_frameTimingRequestsDirty; | 893 bool m_frameTimingRequestsDirty; |
888 | 894 |
889 // Exists only on root frame. | 895 // Exists only on root frame. |
890 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the | 896 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the |
891 // main frame. | 897 // main frame. |
892 Member<ScrollableArea> m_viewportScrollableArea; | 898 Member<RootFrameViewport> m_viewportScrollableArea; |
893 | 899 |
894 // This frame's bounds in the root frame's content coordinates, clipped | 900 // This frame's bounds in the root frame's content coordinates, clipped |
895 // recursively through every ancestor view. | 901 // recursively through every ancestor view. |
896 IntRect m_viewportIntersection; | 902 IntRect m_viewportIntersection; |
897 bool m_viewportIntersectionValid; | 903 bool m_viewportIntersectionValid; |
898 | 904 |
899 // The following members control rendering pipeline throttling for this | 905 // The following members control rendering pipeline throttling for this |
900 // frame. They are only updated in response to intersection observer | 906 // frame. They are only updated in response to intersection observer |
901 // notifications, i.e., not in the middle of the lifecycle. | 907 // notifications, i.e., not in the middle of the lifecycle. |
902 bool m_hiddenForThrottling; | 908 bool m_hiddenForThrottling; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 964 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
959 setIsVisuallyNonEmpty(); | 965 setIsVisuallyNonEmpty(); |
960 } | 966 } |
961 | 967 |
962 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 968 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
963 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 969 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
964 | 970 |
965 } // namespace blink | 971 } // namespace blink |
966 | 972 |
967 #endif // FrameView_h | 973 #endif // FrameView_h |
OLD | NEW |