Chromium Code Reviews| 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; |
| } |