Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 40423003: Experimental viewport meta tag support for desktop, Blink-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index d15aa469cd43a4e08d67c344d7b8ce0997657ee2..73e0f0661983de41cf1d72c66bf053857f96fbdb 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1696,7 +1696,9 @@ void WebViewImpl::resize(const WebSize& newSize)
m_size = newSize;
- bool shouldAnchorAndRescaleViewport = settings()->viewportEnabled() && oldSize.width && oldContentsWidth && newSize.width != oldSize.width;
+ bool shouldAnchorAndRescaleViewport = settings()->mainFrameResizesAreOrientationChanges()
+ && oldSize.width && oldContentsWidth && newSize.width != oldSize.width;
+
ViewportAnchor viewportAnchor(&mainFrameImpl()->frame()->eventHandler());
if (shouldAnchorAndRescaleViewport) {
viewportAnchor.setAnchor(view->visibleContentRect(),

Powered by Google App Engine
This is Rietveld 408576698