Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp |
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
| index 1a4e1347d9ad6369c6192253ed2a42b385cbc654..c551a775909e8bfbb1cc34e2e609bc598c7627f8 100644 |
| --- a/Source/web/WebViewImpl.cpp |
| +++ b/Source/web/WebViewImpl.cpp |
| @@ -1594,8 +1594,9 @@ void WebViewImpl::resize(const WebSize& newSize) |
| m_size = newSize; |
| + bool isFullscreen = m_fullscreenController->isFullscreen(); |
| bool shouldAnchorAndRescaleViewport = settings()->mainFrameResizesAreOrientationChanges() |
| - && oldSize.width && oldContentsWidth && newSize.width != oldSize.width; |
| + && oldSize.width && oldContentsWidth && newSize.width != oldSize.width && !isFullscreen; |
| ViewportAnchor viewportAnchor(&mainFrameImpl()->frame()->eventHandler()); |
| if (shouldAnchorAndRescaleViewport) { |
| @@ -1625,7 +1626,9 @@ void WebViewImpl::resize(const WebSize& newSize) |
| page()->frameHost().pinchViewport().setSize(m_size); |
| } |
| - if (settings()->viewportEnabled() && !m_fixedLayoutSizeLock) { |
| + if (isFullscreen) { |
| + setPageScaleFactor(1.0f, IntPoint()); |
|
aelias_OOO_until_Jul13
2014/05/28 23:45:55
Why is this line needed?
trchen
2014/05/29 00:02:13
Maybe not. Just tried without this line. No advers
|
| + } else if (settings()->viewportEnabled() && !m_fixedLayoutSizeLock) { |
| // Relayout immediately to recalculate the minimum scale limit. |
| if (view->needsLayout()) |
| view->layout(); |