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 #include "web/ResizeViewportAnchor.h" | 5 #include "web/ResizeViewportAnchor.h" |
6 | 6 |
7 #include "core/frame/FrameHost.h" | 7 #include "core/frame/FrameHost.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/VisualViewport.h" | 9 #include "core/frame/VisualViewport.h" |
10 #include "core/page/Page.h" | 10 #include "core/page/Page.h" |
11 #include "platform/geometry/DoubleRect.h" | 11 #include "platform/geometry/DoubleRect.h" |
12 #include "platform/geometry/DoubleSize.h" | |
13 #include "platform/geometry/FloatSize.h" | 12 #include "platform/geometry/FloatSize.h" |
14 | 13 |
15 namespace blink { | 14 namespace blink { |
16 | 15 |
17 void ResizeViewportAnchor::resizeFrameView(IntSize size) | 16 void ResizeViewportAnchor::resizeFrameView(IntSize size) |
18 { | 17 { |
19 FrameView* frameView = rootFrameView(); | 18 FrameView* frameView = rootFrameView(); |
20 DCHECK(frameView); | 19 DCHECK(frameView); |
21 | 20 |
22 ScrollableArea* rootViewport = frameView->getScrollableArea(); | 21 ScrollableArea* rootViewport = frameView->getScrollableArea(); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 FrameView* ResizeViewportAnchor::rootFrameView() | 86 FrameView* ResizeViewportAnchor::rootFrameView() |
88 { | 87 { |
89 if (Frame* frame = m_page->mainFrame()) { | 88 if (Frame* frame = m_page->mainFrame()) { |
90 if (frame->isLocalFrame()) | 89 if (frame->isLocalFrame()) |
91 return toLocalFrame(frame)->view(); | 90 return toLocalFrame(frame)->view(); |
92 } | 91 } |
93 return nullptr; | 92 return nullptr; |
94 } | 93 } |
95 | 94 |
96 } // namespace blink | 95 } // namespace blink |
OLD | NEW |