Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Side by Side Diff: third_party/WebKit/Source/web/ResizeViewportAnchor.cpp

Issue 2192373002: Have ResizeViewportAnchor derive from GarbageCollected<> only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/ResizeViewportAnchor.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ResizeViewportAnchor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698