Index: Source/core/page/PageScaleConstraintsSet.cpp |
diff --git a/Source/core/page/PageScaleConstraintsSet.cpp b/Source/core/page/PageScaleConstraintsSet.cpp |
index ec1a4ec9c2e4749954706e0f3ac2c4ebaa6144d1..02fdf302c0cc0f7f761379d129e44bc019e77fbd 100644 |
--- a/Source/core/page/PageScaleConstraintsSet.cpp |
+++ b/Source/core/page/PageScaleConstraintsSet.cpp |
@@ -136,12 +136,12 @@ void PageScaleConstraintsSet::adjustPageDefinedConstraintsForAndroidWebView(cons |
m_pageDefinedConstraints.maximumScale *= targetDensityDPIFactor; |
float adjustedLayoutSizeWidth = m_pageDefinedConstraints.layoutSize.width(); |
- if (useWideViewport && arguments.maxWidth.type() == ExtendToZoom && arguments.zoom != 1.0f) |
+ if (useWideViewport && (arguments.maxWidth.isAuto() || arguments.maxWidth.type() == ExtendToZoom) && arguments.zoom != 1.0f) |
adjustedLayoutSizeWidth = layoutFallbackWidth; |
else { |
if (!useWideViewport) |
adjustedLayoutSizeWidth = getLayoutWidthForNonWideViewport(viewSize, initialScale); |
- if (!useWideViewport || arguments.maxWidth.type() == ExtendToZoom || arguments.maxWidth.isViewportPercentage()) |
+ if (!useWideViewport || (arguments.maxWidth.isAuto() || arguments.maxWidth.type() == ExtendToZoom) || arguments.maxWidth.isViewportPercentage()) |
adjustedLayoutSizeWidth /= targetDensityDPIFactor; |
} |