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 7be5f1006676c7800988794aeae343f3fe494fa6..1cc400e66b4c5ae75a95c91ad45cce6e516e14bc 100644 |
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| @@ -1902,13 +1902,12 @@ TopControls& WebViewImpl::topControls() |
| void WebViewImpl::resizeViewWhileAnchored(FrameView* view) |
| { |
| - // FIXME: TextAutosizer does not yet support out-of-process frames. |
| - if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) { |
| + ASSERT(mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()); |
| + |
| + { |
| // Avoids unnecessary invalidations while various bits of state in TextAutosizer are updated. |
| TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); |
| performResize(); |
| - } else { |
| - performResize(); |
| } |
| m_fullscreenController->updateSize(); |
| @@ -1923,6 +1922,17 @@ void WebViewImpl::resize(const WebSize& newSize) |
| if (m_shouldAutoResize || m_size == newSize) |
| return; |
| + if (page()->mainFrame() && !page()->mainFrame()->isLocalFrame()) { |
| + // Viewport resize for a remote main frame does not require any |
| + // particular action, but the state needs to reflect the correct size |
| + // so that it can be used for initalization if the main frame gets |
| + // swapped to a LocalFrame at a later time. |
| + m_size = newSize; |
| + pageScaleConstraintsSet().didChangeViewSize(m_size); |
|
bokan
2016/01/11 18:18:58
Is this call to didChangeViewSize actually needed
kenrb
2016/01/11 20:50:26
The original test case on https://crbug.com/526211
bokan
2016/01/11 20:52:53
Ok, sgtm
|
| + page()->frameHost().visualViewport().setSize(m_size); |
| + return; |
| + } |
| + |
| WebLocalFrameImpl* mainFrame = mainFrameImpl(); |
| if (!mainFrame) |
| return; |