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

Side by Side Diff: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp

Issue 2737703002: Remove FrameHost::browserControls() (Closed)
Patch Set: Rebase Created 3 years, 9 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/WebViewImpl.cpp ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/dom/ClientRect.h" 5 #include "core/dom/ClientRect.h"
6 #include "core/frame/BrowserControls.h" 6 #include "core/frame/BrowserControls.h"
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/RootFrameViewport.h" 9 #include "core/frame/RootFrameViewport.h"
10 #include "core/frame/VisualViewport.h" 10 #include "core/frame/VisualViewport.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 void executeScript(const WebString& code, WebLocalFrame& frame) { 93 void executeScript(const WebString& code, WebLocalFrame& frame) {
94 frame.executeScript(WebScriptSource(code)); 94 frame.executeScript(WebScriptSource(code));
95 frame.view()->updateAllLifecyclePhases(); 95 frame.view()->updateAllLifecyclePhases();
96 runPendingTasks(); 96 runPendingTasks();
97 } 97 }
98 98
99 WebViewImpl* webViewImpl() const { return m_helper.webView(); } 99 WebViewImpl* webViewImpl() const { return m_helper.webView(); }
100 100
101 FrameHost& frameHost() const { 101 Page& page() const { return *m_helper.webView()->page(); }
102 return m_helper.webView()->page()->frameHost(); 102
103 } 103 FrameHost& frameHost() const { return page().frameHost(); }
104 104
105 LocalFrame* mainFrame() const { 105 LocalFrame* mainFrame() const {
106 return webViewImpl()->mainFrameImpl()->frame(); 106 return webViewImpl()->mainFrameImpl()->frame();
107 } 107 }
108 108
109 WebLocalFrame* mainWebFrame() const { return webViewImpl()->mainFrameImpl(); } 109 WebLocalFrame* mainWebFrame() const { return webViewImpl()->mainFrameImpl(); }
110 110
111 FrameView* mainFrameView() const { 111 FrameView* mainFrameView() const {
112 return webViewImpl()->mainFrameImpl()->frame()->view(); 112 return webViewImpl()->mainFrameImpl()->frame()->view();
113 } 113 }
114 114
115 VisualViewport& visualViewport() const { 115 VisualViewport& visualViewport() const {
116 return frameHost().visualViewport(); 116 return frameHost().visualViewport();
117 } 117 }
118 118
119 BrowserControls& browserControls() const { 119 BrowserControls& browserControls() const { return page().browserControls(); }
120 return frameHost().browserControls();
121 }
122 120
123 Node* effectiveRootScroller(Document* doc) const { 121 Node* effectiveRootScroller(Document* doc) const {
124 return &doc->rootScrollerController().effectiveRootScroller(); 122 return &doc->rootScrollerController().effectiveRootScroller();
125 } 123 }
126 124
127 WebCoalescedInputEvent generateTouchGestureEvent(WebInputEvent::Type type, 125 WebCoalescedInputEvent generateTouchGestureEvent(WebInputEvent::Type type,
128 int deltaX = 0, 126 int deltaX = 0,
129 int deltaY = 0) { 127 int deltaY = 0) {
130 return generateGestureEvent(type, WebGestureDeviceTouchscreen, deltaX, 128 return generateGestureEvent(type, WebGestureDeviceTouchscreen, deltaX,
131 deltaY); 129 deltaY);
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 // FrameView without a layout. 1310 // FrameView without a layout.
1313 iframe->remove(); 1311 iframe->remove();
1314 1312
1315 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(), 1313 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(),
1316 &mainFrameView()->getRootFrameViewport()->layoutViewport()); 1314 &mainFrameView()->getRootFrameViewport()->layoutViewport());
1317 } 1315 }
1318 1316
1319 } // namespace 1317 } // namespace
1320 1318
1321 } // namespace blink 1319 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698