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 17424826a5900d818fc4cb0ba8fa7a196d27cb93..0193aed219630e0291ae57305b3d54955c9f3d01 100644 |
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
@@ -1837,14 +1837,7 @@ |
void WebViewImpl::performResize() |
{ |
- // We'll keep the initial containing block size from changing when the top |
- // controls hide so that the ICB will always be the same size as the |
- // viewport with the top controls shown. |
- IntSize ICBSize = m_size; |
- if (!topControls().shrinkViewport()) |
- ICBSize.expand(0, -topControls().height()); |
- |
- pageScaleConstraintsSet().didChangeInitialContainingBlockSize(ICBSize); |
+ pageScaleConstraintsSet().didChangeViewSize(m_size); |
updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document()->viewportDescription()); |
updateMainFrameLayoutSize(); |
@@ -1925,7 +1918,7 @@ |
// 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().didChangeInitialContainingBlockSize(m_size); |
+ pageScaleConstraintsSet().didChangeViewSize(m_size); |
page()->frameHost().visualViewport().setSize(m_size); |
return; |
} |
@@ -3304,11 +3297,7 @@ |
IntSize WebViewImpl::mainFrameSize() |
{ |
- // The frame size should match the viewport size at minimum scale, since the |
- // viewport must always be contained by the frame. |
- FloatSize frameSize(m_size); |
- frameSize.scale(1 / minimumPageScaleFactor()); |
- return expandedIntSize(frameSize); |
+ return pageScaleConstraintsSet().mainFrameSize(); |
} |
PageScaleConstraintsSet& WebViewImpl::pageScaleConstraintsSet() const |
@@ -4111,7 +4100,7 @@ |
m_size = frameSize; |
page()->frameHost().visualViewport().setSize(m_size); |
- pageScaleConstraintsSet().didChangeInitialContainingBlockSize(m_size); |
+ pageScaleConstraintsSet().didChangeViewSize(m_size); |
m_client->didAutoResize(m_size); |
sendResizeEventAndRepaint(); |