| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 bool scrollbarsCanBeActive() const override; | 52 bool scrollbarsCanBeActive() const override; |
| 53 IntRect scrollableAreaBoundingBox() const override; | 53 IntRect scrollableAreaBoundingBox() const override; |
| 54 bool userInputScrollable(ScrollbarOrientation) const override; | 54 bool userInputScrollable(ScrollbarOrientation) const override; |
| 55 bool shouldPlaceVerticalScrollbarOnLeft() const override; | 55 bool shouldPlaceVerticalScrollbarOnLeft() const override; |
| 56 void invalidateScrollbarRect(Scrollbar*, const IntRect&) override; | 56 void invalidateScrollbarRect(Scrollbar*, const IntRect&) override; |
| 57 void invalidateScrollCornerRect(const IntRect&) override; | 57 void invalidateScrollCornerRect(const IntRect&) override; |
| 58 GraphicsLayer* layerForContainer() const override; | 58 GraphicsLayer* layerForContainer() const override; |
| 59 GraphicsLayer* layerForScrolling() const override; | 59 GraphicsLayer* layerForScrolling() const override; |
| 60 GraphicsLayer* layerForHorizontalScrollbar() const override; | 60 GraphicsLayer* layerForHorizontalScrollbar() const override; |
| 61 GraphicsLayer* layerForVerticalScrollbar() const override; | 61 GraphicsLayer* layerForVerticalScrollbar() const override; |
| 62 bool userScroll(ScrollDirectionPhysical, ScrollGranularity, float delta = 1)
override; | 62 ScrollResultOneDimensional userScroll(ScrollDirectionPhysical, ScrollGranula
rity, float delta = 1) override; |
| 63 bool scrollAnimatorEnabled() const override; | 63 bool scrollAnimatorEnabled() const override; |
| 64 HostWindow* hostWindow() const override; | 64 HostWindow* hostWindow() const override; |
| 65 void serviceScrollAnimations(double) override; | 65 void serviceScrollAnimations(double) override; |
| 66 void updateCompositorScrollAnimations() override; | 66 void updateCompositorScrollAnimations() override; |
| 67 // TODO(bokan): This method should be removed. It should be replaced by | 67 // TODO(bokan): This method should be removed. It should be replaced by |
| 68 // making EventHandler::handleWheelEvent unpack the WheelEvent and make a | 68 // making EventHandler::handleWheelEvent unpack the WheelEvent and make a |
| 69 // call to this class' scroll method. | 69 // call to this class' scroll method. |
| 70 ScrollResult handleWheel(const PlatformWheelEvent&) override; | 70 ScrollResult handleWheel(const PlatformWheelEvent&) override; |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port); | 73 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port); |
| 74 | 74 |
| 75 DoublePoint scrollOffsetFromScrollAnimators() const; | 75 DoublePoint scrollOffsetFromScrollAnimators() const; |
| 76 | 76 |
| 77 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not | 77 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not |
| 78 // through this class), their updated offset will not be reflected in this c
lass' | 78 // through this class), their updated offset will not be reflected in this c
lass' |
| 79 // animator so use this method to pull updated values when necessary. | 79 // animator so use this method to pull updated values when necessary. |
| 80 void updateScrollAnimator(); | 80 void updateScrollAnimator(); |
| 81 | 81 |
| 82 ScrollableArea& visualViewport() const { return m_visualViewport; } | 82 ScrollableArea& visualViewport() const { return m_visualViewport; } |
| 83 ScrollableArea& layoutViewport() const { return m_layoutViewport; } | 83 ScrollableArea& layoutViewport() const { return m_layoutViewport; } |
| 84 | 84 |
| 85 ScrollableArea& m_visualViewport; | 85 ScrollableArea& m_visualViewport; |
| 86 ScrollableArea& m_layoutViewport; | 86 ScrollableArea& m_layoutViewport; |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 } // namespace blink | 89 } // namespace blink |
| 90 | 90 |
| 91 #endif // RootFrameViewport_h | 91 #endif // RootFrameViewport_h |
| OLD | NEW |