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 1c2e7784d2bde4cddf3a0c06d41c1d99231a2e2a..96ef4d97c61e5688d2a04231e9c31f1019a87b61 100644 |
| --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| @@ -185,13 +185,16 @@ void ChromeClientImpl::chromeDestroyed() |
| // Our lifetime is bound to the WebViewImpl. |
| } |
| -void ChromeClientImpl::setWindowRect(const IntRect& r) |
| +void ChromeClientImpl::setWindowRect(const IntRect& r, LocalFrame* frame) |
| { |
| - if (m_webView->client()) |
| - m_webView->client()->setWindowRect(r); |
| + DCHECK(frame == m_webView->mainFrameImpl()->frame()); |
|
dcheng
2016/08/15 18:22:44
Nit: DCHECK_EQ
lfg
2016/08/16 21:02:13
Done.
|
| + WebWidgetClient* client = WebLocalFrameImpl::fromFrame(frame)->frameWidget()->client(); |
| + |
| + if (client) |
|
dcheng
2016/08/15 18:22:44
Do we need to nullcheck this? It looks like the ca
lfg
2016/08/16 21:02:13
It's been a while, so I don't remember exactly, bu
|
| + client->setWindowRect(r); |
| } |
| -IntRect ChromeClientImpl::windowRect() |
| +IntRect ChromeClientImpl::rootWindowRect() |
| { |
| WebRect rect; |
| if (m_webView->client()) { |
| @@ -211,7 +214,7 @@ IntRect ChromeClientImpl::pageRect() |
| // We hide the details of the window's border thickness from the web page by |
| // simple re-using the window position here. So, from the point-of-view of |
| // the web page, the window has no border. |
| - return windowRect(); |
| + return rootWindowRect(); |
| } |
| void ChromeClientImpl::focus() |