Index: Source/core/page/PageScaleConstraintsSet.cpp |
diff --git a/Source/core/page/PageScaleConstraintsSet.cpp b/Source/core/page/PageScaleConstraintsSet.cpp |
index e0d185b6542fa03e2a6d47f5e0a90ac81d340dab..e00d9578a7552fd9ec20ffe79ff0387ff247ca2a 100644 |
--- a/Source/core/page/PageScaleConstraintsSet.cpp |
+++ b/Source/core/page/PageScaleConstraintsSet.cpp |
@@ -49,9 +49,9 @@ PageScaleConstraints PageScaleConstraintsSet::defaultConstraints() const |
return PageScaleConstraints(-1, defaultMinimumScale, defaultMaximumScale); |
} |
-void PageScaleConstraintsSet::updatePageDefinedConstraints(const ViewportArguments& arguments, IntSize viewSize, int layoutFallbackWidth) |
+void PageScaleConstraintsSet::updatePageDefinedConstraints(const ViewportArguments& arguments, IntSize viewSize) |
{ |
- m_pageDefinedConstraints = arguments.resolve(viewSize, layoutFallbackWidth); |
+ m_pageDefinedConstraints = arguments.resolve(viewSize); |
m_constraintsDirty = true; |
} |
@@ -123,7 +123,7 @@ void PageScaleConstraintsSet::adjustPageDefinedConstraintsForAndroidWebView(cons |
{ |
float initialScale = m_pageDefinedConstraints.initialScale; |
if (arguments.zoom == -1 && !loadWithOverviewMode) { |
- if (arguments.width == -1 || (useWideViewport && arguments.width != ViewportArguments::ValueDeviceWidth)) |
+ if (arguments.maxWidth == -1 || (useWideViewport && arguments.maxWidth != ViewportArguments::ValueDeviceWidth)) |
m_pageDefinedConstraints.initialScale = 1.0f; |
} |
@@ -134,12 +134,12 @@ void PageScaleConstraintsSet::adjustPageDefinedConstraintsForAndroidWebView(cons |
m_pageDefinedConstraints.maximumScale *= targetDensityDPIFactor; |
float adjustedLayoutSizeWidth = m_pageDefinedConstraints.layoutSize.width(); |
- if (useWideViewport && arguments.width == -1 && arguments.zoom != 1.0f) |
+ if (useWideViewport && arguments.maxWidth == ViewportArguments::ValueExtendToZoom && arguments.zoom != 1.0f) |
adjustedLayoutSizeWidth = layoutFallbackWidth; |
else { |
if (!useWideViewport) |
adjustedLayoutSizeWidth = getLayoutWidthForNonWideViewport(viewSize, initialScale); |
- if (!useWideViewport || arguments.width == -1 || arguments.width == ViewportArguments::ValueDeviceWidth) |
+ if (!useWideViewport || arguments.maxWidth == ViewportArguments::ValueExtendToZoom || arguments.maxWidth == ViewportArguments::ValueDeviceWidth) |
adjustedLayoutSizeWidth /= targetDensityDPIFactor; |
} |