| 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; | |
| 72 int scrollSize(ScrollbarOrientation) const override; | 67 int scrollSize(ScrollbarOrientation) const override; |
| 73 bool isScrollCornerVisible() const override; | 68 bool isScrollCornerVisible() const override; |
| 74 IntRect scrollCornerRect() const override; | 69 IntRect scrollCornerRect() const override; |
| 75 void updateScrollOffset(const ScrollOffset&, ScrollType) override; | 70 void updateScrollOffset(const ScrollOffset&, ScrollType) override; |
| 76 IntSize scrollOffsetInt() const override; | 71 IntSize scrollOffsetInt() const override; |
| 77 ScrollOffset scrollOffset() const override; | 72 ScrollOffset scrollOffset() const override; |
| 78 IntSize minimumScrollOffsetInt() const override; | 73 IntSize minimumScrollOffsetInt() const override; |
| 79 IntSize maximumScrollOffsetInt() const override; | 74 IntSize maximumScrollOffsetInt() const override; |
| 80 ScrollOffset maximumScrollOffset() const override; | 75 ScrollOffset maximumScrollOffset() const override; |
| 81 IntSize contentsSize() const override; | 76 IntSize contentsSize() const override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 100 void updateCompositorScrollAnimations() override; | 95 void updateCompositorScrollAnimations() override; |
| 101 void cancelProgrammaticScrollAnimation() override; | 96 void cancelProgrammaticScrollAnimation() override; |
| 102 ScrollBehavior scrollBehaviorStyle() const override; | 97 ScrollBehavior scrollBehaviorStyle() const override; |
| 103 Widget* getWidget() override; | 98 Widget* getWidget() override; |
| 104 void clearScrollableArea() override; | 99 void clearScrollableArea() override; |
| 105 LayoutBox* layoutBox() const override; | 100 LayoutBox* layoutBox() const override; |
| 106 FloatQuad localToVisibleContentQuad(const FloatQuad&, | 101 FloatQuad localToVisibleContentQuad(const FloatQuad&, |
| 107 const LayoutObject*, | 102 const LayoutObject*, |
| 108 unsigned = 0) const final; | 103 unsigned = 0) const final; |
| 109 | 104 |
| 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 |
| 110 private: | 133 private: |
| 111 RootFrameViewport(ScrollableArea& visualViewport, | 134 RootFrameViewport(ScrollableArea& visualViewport, |
| 112 ScrollableArea& layoutViewport); | 135 ScrollableArea& layoutViewport); |
| 113 | 136 |
| 114 enum ViewportToScrollFirst { VisualViewport, LayoutViewport }; | 137 enum ViewportToScrollFirst { VisualViewport, LayoutViewport }; |
| 115 | 138 |
| 116 ScrollOffset scrollOffsetFromScrollAnimators() const; | 139 ScrollOffset scrollOffsetFromScrollAnimators() const; |
| 117 | 140 |
| 118 void distributeScrollBetweenViewports(const ScrollOffset&, | 141 void distributeScrollBetweenViewports(const ScrollOffset&, |
| 119 ScrollType, | 142 ScrollType, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 136 | 159 |
| 137 DEFINE_TYPE_CASTS(RootFrameViewport, | 160 DEFINE_TYPE_CASTS(RootFrameViewport, |
| 138 ScrollableArea, | 161 ScrollableArea, |
| 139 scrollableArea, | 162 scrollableArea, |
| 140 scrollableArea->isRootFrameViewport(), | 163 scrollableArea->isRootFrameViewport(), |
| 141 scrollableArea.isRootFrameViewport()); | 164 scrollableArea.isRootFrameViewport()); |
| 142 | 165 |
| 143 } // namespace blink | 166 } // namespace blink |
| 144 | 167 |
| 145 #endif // RootFrameViewport_h | 168 #endif // RootFrameViewport_h |
| OLD | NEW |