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