Chromium Code Reviews| Index: third_party/WebKit/Source/web/DevToolsEmulator.cpp |
| diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp |
| index 44ed45095d8384e64a4090c0bc2d08b0f127f028..ac941acb27f029b8cb6383f19c5ad9aee03af2be 100644 |
| --- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp |
| +++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp |
| @@ -316,7 +316,14 @@ void DevToolsEmulator::setTouchEventEmulationEnabled(bool enabled) |
| m_webViewImpl->page()->settings().setMaxTouchPoints(enabled ? 1 : m_originalMaxTouchPoints); |
| } |
| m_touchEventEmulationEnabled = enabled; |
| - m_webViewImpl->mainFrameImpl()->frameView()->layout(); |
| + // TODO(dgozman): mainFrameImpl() check in this class should be unnecessary. |
| + // It is only needed when we reattach and restore InspectorEmulationAgent, |
| + // which happens before everything has been setup correctly, and therefore |
| + // fails during remote -> local main frame transition. |
| + // We should instead route emulation through the WebViewImpl which has |
| + // local main frame, and remove InspectorEmulationAgent entirely. |
|
nasko
2016/01/26 19:43:07
WebViewImpl is not guaranteed to have local main f
dgozman
2016/01/27 17:54:44
Ah, right. But if we send the page-level IPC from
nasko
2016/01/27 17:55:57
Page-level IPCs in general should go to all proces
|
| + if (m_webViewImpl->mainFrameImpl()) |
| + m_webViewImpl->mainFrameImpl()->frameView()->layout(); |
| } |
| void DevToolsEmulator::setScriptExecutionDisabled(bool scriptExecutionDisabled) |