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 15 matching lines...) Expand all Loading... |
26 public: | 26 public: |
27 static RootFrameViewport* create(ScrollableArea& visualViewport, ScrollableA
rea& layoutViewport) | 27 static RootFrameViewport* create(ScrollableArea& visualViewport, ScrollableA
rea& layoutViewport) |
28 { | 28 { |
29 return new RootFrameViewport(visualViewport, layoutViewport); | 29 return new RootFrameViewport(visualViewport, layoutViewport); |
30 } | 30 } |
31 | 31 |
32 DECLARE_VIRTUAL_TRACE(); | 32 DECLARE_VIRTUAL_TRACE(); |
33 | 33 |
34 void setLayoutViewport(ScrollableArea&); | 34 void setLayoutViewport(ScrollableArea&); |
35 | 35 |
| 36 void restoreToAnchor(const DoublePoint&); |
| 37 |
36 // ScrollableArea Implementation | 38 // ScrollableArea Implementation |
37 bool isRootFrameViewport() const override { return true; } | 39 bool isRootFrameViewport() const override { return true; } |
38 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; | 40 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro
llBehaviorInstant) override; |
39 LayoutRect scrollIntoView( | 41 LayoutRect scrollIntoView( |
40 const LayoutRect& rectInContent, | 42 const LayoutRect& rectInContent, |
41 const ScrollAlignment& alignX, | 43 const ScrollAlignment& alignX, |
42 const ScrollAlignment& alignY, | 44 const ScrollAlignment& alignY, |
43 ScrollType = ProgrammaticScroll) override; | 45 ScrollType = ProgrammaticScroll) override; |
44 DoubleRect visibleContentRectDouble(IncludeScrollbarsInRect = ExcludeScrollb
ars) const override; | 46 DoubleRect visibleContentRectDouble(IncludeScrollbarsInRect = ExcludeScrollb
ars) const override; |
45 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t override; | 47 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t override; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 100 |
99 Member<ScrollableArea> m_visualViewport; | 101 Member<ScrollableArea> m_visualViewport; |
100 Member<ScrollableArea> m_layoutViewport; | 102 Member<ScrollableArea> m_layoutViewport; |
101 }; | 103 }; |
102 | 104 |
103 DEFINE_TYPE_CASTS(RootFrameViewport, ScrollableArea, scrollableArea, scrollableA
rea->isRootFrameViewport(), scrollableArea.isRootFrameViewport()); | 105 DEFINE_TYPE_CASTS(RootFrameViewport, ScrollableArea, scrollableArea, scrollableA
rea->isRootFrameViewport(), scrollableArea.isRootFrameViewport()); |
104 | 106 |
105 } // namespace blink | 107 } // namespace blink |
106 | 108 |
107 #endif // RootFrameViewport_h | 109 #endif // RootFrameViewport_h |
OLD | NEW |