Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index bcfa7c3158c8ce8494405d14230a87912344b255..88c74b1cf20c4301ab0e243559783eba182dd26a 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -3015,9 +3015,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 == ViewportArguments::ValueExtendToZoom) |
+ adjustedArguments.maxWidth = ViewportArguments::ValueAuto; |
+ 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()); |
@@ -4129,7 +4133,7 @@ void WebViewImpl::pointerLockMouseEvent(const WebInputEvent& event) |
bool WebViewImpl::shouldDisableDesktopWorkarounds() |
{ |
ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewportArguments(); |
- return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.userZoom |
+ return arguments.maxWidth == ViewportArguments::ValueDeviceWidth || !arguments.userZoom |
|| (arguments.minZoom == arguments.maxZoom && arguments.minZoom != ViewportArguments::ValueAuto); |
} |