| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RootFrameViewport_h | 5 #ifndef RootFrameViewport_h |
| 6 #define RootFrameViewport_h | 6 #define RootFrameViewport_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/scroll/ScrollableArea.h" | 9 #include "platform/scroll/ScrollableArea.h" |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void setScrollOffset(const ScrollOffset&, | 57 void setScrollOffset(const ScrollOffset&, |
| 58 ScrollType, | 58 ScrollType, |
| 59 ScrollBehavior = ScrollBehaviorInstant) override; | 59 ScrollBehavior = ScrollBehaviorInstant) override; |
| 60 LayoutRect scrollIntoView(const LayoutRect& rectInContent, | 60 LayoutRect scrollIntoView(const LayoutRect& rectInContent, |
| 61 const ScrollAlignment& alignX, | 61 const ScrollAlignment& alignX, |
| 62 const ScrollAlignment& alignY, | 62 const ScrollAlignment& alignY, |
| 63 ScrollType = ProgrammaticScroll) override; | 63 ScrollType = ProgrammaticScroll) override; |
| 64 IntRect visibleContentRect( | 64 IntRect visibleContentRect( |
| 65 IncludeScrollbarsInRect = ExcludeScrollbars) const override; | 65 IncludeScrollbarsInRect = ExcludeScrollbars) const override; |
| 66 bool shouldUseIntegerScrollOffset() const override; | 66 bool shouldUseIntegerScrollOffset() const override; |
| 67 LayoutRect visualRectForScrollbarParts() const override { |
| 68 ASSERT_NOT_REACHED(); |
| 69 return LayoutRect(); |
| 70 } |
| 71 bool isActive() const override; |
| 67 int scrollSize(ScrollbarOrientation) const override; | 72 int scrollSize(ScrollbarOrientation) const override; |
| 68 bool isScrollCornerVisible() const override; | 73 bool isScrollCornerVisible() const override; |
| 69 IntRect scrollCornerRect() const override; | 74 IntRect scrollCornerRect() const override; |
| 70 void updateScrollOffset(const ScrollOffset&, ScrollType) override; | 75 void updateScrollOffset(const ScrollOffset&, ScrollType) override; |
| 71 IntSize scrollOffsetInt() const override; | 76 IntSize scrollOffsetInt() const override; |
| 72 ScrollOffset scrollOffset() const override; | 77 ScrollOffset scrollOffset() const override; |
| 73 IntSize minimumScrollOffsetInt() const override; | 78 IntSize minimumScrollOffsetInt() const override; |
| 74 IntSize maximumScrollOffsetInt() const override; | 79 IntSize maximumScrollOffsetInt() const override; |
| 75 ScrollOffset maximumScrollOffset() const override; | 80 ScrollOffset maximumScrollOffset() const override; |
| 76 IntSize contentsSize() const override; | 81 IntSize contentsSize() const override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 95 void updateCompositorScrollAnimations() override; | 100 void updateCompositorScrollAnimations() override; |
| 96 void cancelProgrammaticScrollAnimation() override; | 101 void cancelProgrammaticScrollAnimation() override; |
| 97 ScrollBehavior scrollBehaviorStyle() const override; | 102 ScrollBehavior scrollBehaviorStyle() const override; |
| 98 Widget* getWidget() override; | 103 Widget* getWidget() override; |
| 99 void clearScrollableArea() override; | 104 void clearScrollableArea() override; |
| 100 LayoutBox* layoutBox() const override; | 105 LayoutBox* layoutBox() const override; |
| 101 FloatQuad localToVisibleContentQuad(const FloatQuad&, | 106 FloatQuad localToVisibleContentQuad(const FloatQuad&, |
| 102 const LayoutObject*, | 107 const LayoutObject*, |
| 103 unsigned = 0) const final; | 108 unsigned = 0) const final; |
| 104 | 109 |
| 105 // Scrollbar related | |
| 106 // TODO(crbug.com/661236): Seperate the scrollbar related logic from | |
| 107 // ScrollableArea. | |
| 108 Scrollbar* horizontalScrollbar() const override; | |
| 109 Scrollbar* verticalScrollbar() const override; | |
| 110 bool isActive() const override; | |
| 111 bool hasOverlayScrollbars() const override; | |
| 112 void setScrollbarNeedsPaintInvalidation(ScrollbarOrientation) override; | |
| 113 LayoutRect visualRectForScrollbarParts() const override; | |
| 114 ScrollbarOverlayColorTheme getScrollbarOverlayColorTheme() const override; | |
| 115 void getTickmarks(Vector<IntRect>& rects) const override; | |
| 116 void mouseEnteredScrollbar(Scrollbar&) override; | |
| 117 void mouseExitedScrollbar(Scrollbar&) override; | |
| 118 void scrollbarVisibilityChanged() override; | |
| 119 bool scrollbarsHidden() const override; | |
| 120 IntRect convertFromScrollbarToContainingWidget(const Scrollbar&, | |
| 121 const IntRect&) const override; | |
| 122 IntRect convertFromContainingWidgetToScrollbar(const Scrollbar&, | |
| 123 const IntRect&) const override; | |
| 124 IntPoint convertFromScrollbarToContainingWidget( | |
| 125 const Scrollbar&, | |
| 126 const IntPoint&) const override; | |
| 127 IntPoint convertFromContainingWidgetToScrollbar( | |
| 128 const Scrollbar&, | |
| 129 const IntPoint&) const override; | |
| 130 ScrollOffset scrollAnimatorDesiredTargetOffset() const override; | |
| 131 void setScrollCornerNeedsPaintInvalidation() override; | |
| 132 | |
| 133 private: | 110 private: |
| 134 RootFrameViewport(ScrollableArea& visualViewport, | 111 RootFrameViewport(ScrollableArea& visualViewport, |
| 135 ScrollableArea& layoutViewport); | 112 ScrollableArea& layoutViewport); |
| 136 | 113 |
| 137 enum ViewportToScrollFirst { VisualViewport, LayoutViewport }; | 114 enum ViewportToScrollFirst { VisualViewport, LayoutViewport }; |
| 138 | 115 |
| 139 ScrollOffset scrollOffsetFromScrollAnimators() const; | 116 ScrollOffset scrollOffsetFromScrollAnimators() const; |
| 140 | 117 |
| 141 void distributeScrollBetweenViewports(const ScrollOffset&, | 118 void distributeScrollBetweenViewports(const ScrollOffset&, |
| 142 ScrollType, | 119 ScrollType, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 159 | 136 |
| 160 DEFINE_TYPE_CASTS(RootFrameViewport, | 137 DEFINE_TYPE_CASTS(RootFrameViewport, |
| 161 ScrollableArea, | 138 ScrollableArea, |
| 162 scrollableArea, | 139 scrollableArea, |
| 163 scrollableArea->isRootFrameViewport(), | 140 scrollableArea->isRootFrameViewport(), |
| 164 scrollableArea.isRootFrameViewport()); | 141 scrollableArea.isRootFrameViewport()); |
| 165 | 142 |
| 166 } // namespace blink | 143 } // namespace blink |
| 167 | 144 |
| 168 #endif // RootFrameViewport_h | 145 #endif // RootFrameViewport_h |
| OLD | NEW |