Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| index dbce5b06b65f7e4ff4ef9e4783670e765bcfada8..baa9a6e3bbf3368cce2ab5009bf8c0870838083c 100644 |
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| @@ -138,6 +138,7 @@ |
| #include "public/web/WebElement.h" |
| #include "public/web/WebFrame.h" |
| #include "public/web/WebFrameClient.h" |
| +#include "public/web/WebFrameWidget.h" |
| #include "public/web/WebHitTestResult.h" |
| #include "public/web/WebInputElement.h" |
| #include "public/web/WebMeaningfulLayout.h" |
| @@ -4426,18 +4427,18 @@ void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
| bool WebViewImpl::requestPointerLock() |
| { |
| - return m_client && m_client->requestPointerLock(); |
| + return mainFrameImpl()->frameWidget() && mainFrameImpl()->frameWidget()->client() && mainFrameImpl()->frameWidget()->client()->requestPointerLock(); |
|
scheib
2016/05/19 00:38:58
These && chains are too long.. let's do:
if (widg
lfg
2016/05/19 23:54:06
Done.
|
| } |
| void WebViewImpl::requestPointerUnlock() |
| { |
| - if (m_client) |
| - m_client->requestPointerUnlock(); |
| + if (mainFrameImpl()->frameWidget() && mainFrameImpl()->frameWidget()->client()) |
| + mainFrameImpl()->frameWidget()->client()->requestPointerUnlock(); |
| } |
| bool WebViewImpl::isPointerLocked() |
| { |
| - return m_client && m_client->isPointerLocked(); |
| + return mainFrameImpl()->frameWidget() && mainFrameImpl()->frameWidget()->client() && mainFrameImpl()->frameWidget()->client()->isPointerLocked(); |
| } |
| void WebViewImpl::pointerLockMouseEvent(const WebInputEvent& event) |