| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 void scrollControlWasSetNeedsPaintInvalidation() override; | 61 void scrollControlWasSetNeedsPaintInvalidation() override; |
| 62 GraphicsLayer* layerForContainer() const override; | 62 GraphicsLayer* layerForContainer() const override; |
| 63 GraphicsLayer* layerForScrolling() const override; | 63 GraphicsLayer* layerForScrolling() const override; |
| 64 GraphicsLayer* layerForHorizontalScrollbar() const override; | 64 GraphicsLayer* layerForHorizontalScrollbar() const override; |
| 65 GraphicsLayer* layerForVerticalScrollbar() const override; | 65 GraphicsLayer* layerForVerticalScrollbar() const override; |
| 66 ScrollResultOneDimensional userScroll(ScrollDirectionPhysical, ScrollGranula
rity, float delta = 1) override; | 66 ScrollResultOneDimensional userScroll(ScrollDirectionPhysical, ScrollGranula
rity, float delta = 1) override; |
| 67 bool scrollAnimatorEnabled() const override; | 67 bool scrollAnimatorEnabled() const override; |
| 68 HostWindow* hostWindow() const override; | 68 HostWindow* hostWindow() const override; |
| 69 void serviceScrollAnimations(double) override; | 69 void serviceScrollAnimations(double) override; |
| 70 void updateCompositorScrollAnimations() override; | 70 void updateCompositorScrollAnimations() override; |
| 71 void cancelProgrammaticScrollAnimation() override; |
| 71 ScrollBehavior scrollBehaviorStyle() const override; | 72 ScrollBehavior scrollBehaviorStyle() const override; |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port, bool invertScrollOrder); | 75 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port, bool invertScrollOrder); |
| 75 | 76 |
| 76 DoublePoint scrollOffsetFromScrollAnimators() const; | 77 DoublePoint scrollOffsetFromScrollAnimators() const; |
| 77 | 78 |
| 78 void distributeScrollBetweenViewports(const DoublePoint&, ScrollType, Scroll
Behavior); | 79 void distributeScrollBetweenViewports(const DoublePoint&, ScrollType, Scroll
Behavior); |
| 79 | 80 |
| 80 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not | 81 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not |
| 81 // through this class), their updated offset will not be reflected in this c
lass' | 82 // through this class), their updated offset will not be reflected in this c
lass' |
| 82 // animator so use this method to pull updated values when necessary. | 83 // animator so use this method to pull updated values when necessary. |
| 83 void updateScrollAnimator(); | 84 void updateScrollAnimator(); |
| 84 | 85 |
| 85 ScrollableArea& visualViewport() const { ASSERT(m_visualViewport); return *m
_visualViewport; } | 86 ScrollableArea& visualViewport() const { ASSERT(m_visualViewport); return *m
_visualViewport; } |
| 86 ScrollableArea& layoutViewport() const { ASSERT(m_layoutViewport); return *m
_layoutViewport; } | 87 ScrollableArea& layoutViewport() const { ASSERT(m_layoutViewport); return *m
_layoutViewport; } |
| 87 | 88 |
| 88 RawPtrWillBeMember<ScrollableArea> m_visualViewport; | 89 RawPtrWillBeMember<ScrollableArea> m_visualViewport; |
| 89 RawPtrWillBeMember<ScrollableArea> m_layoutViewport; | 90 RawPtrWillBeMember<ScrollableArea> m_layoutViewport; |
| 90 | 91 |
| 91 // Experimental flag. If the experiment is enabled, scroll the visual viewpo
rt first, | 92 // Experimental flag. If the experiment is enabled, scroll the visual viewpo
rt first, |
| 92 // the bubble scrolls to the layout viewport. | 93 // the bubble scrolls to the layout viewport. |
| 93 bool m_invertScrollOrder; | 94 bool m_invertScrollOrder; |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 } // namespace blink | 97 } // namespace blink |
| 97 | 98 |
| 98 #endif // RootFrameViewport_h | 99 #endif // RootFrameViewport_h |
| OLD | NEW |