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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 1924043002: Switch the inheritance of WebViewClient from WebWidgetClient to protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix new test Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/web/PageOverlayTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index 8760f9cd761d4e48f23ccc93e167ebbd93251d49..60767e262a74ca723843e41659448c4a34f9bb61 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -565,13 +565,8 @@ IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport, const
DCHECK(widget->isFrameView());
const FrameView* view = toFrameView(widget);
LocalFrame* frame = view->frame().localFrameRoot();
- WebWidgetClient* client = nullptr;
- // TODO(kenrb): Consolidate this to a single case when WebViewFrameWidget refactor is complete.
- if (WebLocalFrameImpl::fromFrame(frame) && WebLocalFrameImpl::fromFrame(frame)->frameWidget() && WebLocalFrameImpl::fromFrame(frame)->frameWidget()->forSubframe())
- client = toWebFrameWidgetImpl(WebLocalFrameImpl::fromFrame(frame)->frameWidget())->client();
- else
- client = m_webView->client();
+ WebWidgetClient* client = WebLocalFrameImpl::fromFrame(frame)->frameWidget()->client();
if (client) {
dcheng 2016/04/28 17:30:21 Out of curiosity, does anyone actually pass a null
lfg 2016/04/28 17:43:57 I haven't checked, but this should never happen, s
client->convertViewportToWindow(&screenRect);
@@ -579,6 +574,7 @@ IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport, const
screenRect.x += windowRect.x;
screenRect.y += windowRect.y;
}
+
return screenRect;
}
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/web/PageOverlayTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698