| 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 scroll(ScrollDirectionPhysical, ScrollGranularity, float delta = 1) ove
rride; | 62 ScrollResultOneDimensional scroll(ScrollDirectionPhysical, ScrollGranularity
, float delta = 1) override; |
| 63 // TODO(bokan): This method should be removed. It should be replaced by | 63 // TODO(bokan): This method should be removed. It should be replaced by |
| 64 // making EventHandler::handleWheelEvent unpack the WheelEvent and make a | 64 // making EventHandler::handleWheelEvent unpack the WheelEvent and make a |
| 65 // call to this class' scroll method. | 65 // call to this class' scroll method. |
| 66 ScrollResult handleWheel(const PlatformWheelEvent&) override; | 66 ScrollResult handleWheel(const PlatformWheelEvent&) override; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port); | 69 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port); |
| 70 | 70 |
| 71 DoublePoint scrollOffsetFromScrollAnimators() const; | 71 DoublePoint scrollOffsetFromScrollAnimators() const; |
| 72 | 72 |
| 73 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not | 73 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not |
| 74 // through this class), their updated offset will not be reflected in this c
lass' | 74 // through this class), their updated offset will not be reflected in this c
lass' |
| 75 // animator so use this method to pull updated values when necessary. | 75 // animator so use this method to pull updated values when necessary. |
| 76 void updateScrollAnimator(); | 76 void updateScrollAnimator(); |
| 77 | 77 |
| 78 ScrollableArea& visualViewport() const { return m_visualViewport; } | 78 ScrollableArea& visualViewport() const { return m_visualViewport; } |
| 79 ScrollableArea& layoutViewport() const { return m_layoutViewport; } | 79 ScrollableArea& layoutViewport() const { return m_layoutViewport; } |
| 80 | 80 |
| 81 ScrollableArea& m_visualViewport; | 81 ScrollableArea& m_visualViewport; |
| 82 ScrollableArea& m_layoutViewport; | 82 ScrollableArea& m_layoutViewport; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace blink | 85 } // namespace blink |
| 86 | 86 |
| 87 #endif // RootFrameViewport_h | 87 #endif // RootFrameViewport_h |
| OLD | NEW |