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()); |