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 848f4e121489e3eb3daee48891475e134128abbc..9e0b170d82c0e4d5a6c01afed5ea7399df8b0a99 100644 |
| --- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp |
| +++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp |
| @@ -239,9 +239,10 @@ void DevToolsEmulator::disableDeviceEmulation() |
| disableMobileEmulation(); |
| m_webViewImpl->setCompositorDeviceScaleFactorOverride(0.f); |
| m_webViewImpl->setRootLayerTransform(WebSize(0.f, 0.f), 1.f); |
| - m_webViewImpl->setPageScaleFactor(1.f); |
| + m_webViewImpl->resetScaleStateImmediately(); |
| // mainFrameImpl() could be null during cleanup or remote <-> local swap. |
| if (m_webViewImpl->mainFrameImpl()) { |
| + m_webViewImpl->mainFrameImpl()->frameView()->layout(); |
| if (Document* document = m_webViewImpl->mainFrameImpl()->frame()->document()) |
| document->mediaQueryAffectingValueChanged(); |
| } |
| @@ -314,9 +315,6 @@ void DevToolsEmulator::disableMobileEmulation() |
| m_webViewImpl->setDefaultPageScaleLimits( |
| m_originalDefaultMinimumPageScaleFactor, |
| m_originalDefaultMaximumPageScaleFactor); |
| - // mainFrameImpl() could be null during cleanup or remote <-> local swap. |
| - if (m_webViewImpl->mainFrameImpl()) |
| - m_webViewImpl->mainFrameImpl()->frameView()->layout(); |
|
dgozman
2016/07/21 20:54:08
This is still needed when we toggle between mobile
Eric Seckler
2016/07/22 14:44:48
Right, thanks. I think it still makes sense to res
|
| } |
| void DevToolsEmulator::setTouchEventEmulationEnabled(bool enabled) |