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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 23742003: Use css-device-adapt constraining for legacy viewport tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review issue: one assignent per line/statement Created 7 years, 3 months 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
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 9bd957fbb5846666462c07d06ce250cb41c72465..e9f12ef2afc68797d156a0c86935e8c47ff05453 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2991,9 +2991,13 @@ void WebViewImpl::updatePageDefinedPageScaleConstraints(const ViewportArguments&
return;
ViewportArguments adjustedArguments = arguments;
- if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedArguments.type == ViewportArguments::ViewportMeta)
- adjustedArguments.type = ViewportArguments::ViewportMetaLayoutSizeQuirk;
- m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedArguments, m_size, page()->settings().layoutFallbackWidth());
+ if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedArguments.type == ViewportArguments::ViewportMeta) {
+ if (adjustedArguments.maxWidth.type() == ExtendToZoom)
+ adjustedArguments.maxWidth = Length(); // auto
+ adjustedArguments.minWidth = adjustedArguments.maxWidth;
+ adjustedArguments.minHeight = adjustedArguments.maxHeight;
+ }
+ m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedArguments, m_size);
if (settingsImpl()->supportDeprecatedTargetDensityDPI())
m_pageScaleConstraintsSet.adjustPageDefinedConstraintsForAndroidWebView(adjustedArguments, m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), page()->settings().useWideViewport(), page()->settings().loadWithOverviewMode());
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698