Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 8850f2841003095d8eb022e720cc164e89e74e5e..5fc70546600f534409912c3a177ba41c5b7f11a1 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -2987,9 +2987,9 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription |
adjustedDescription.maxWidth = Length(); // auto |
const int legacyWidthSnappingMagicNumber = 320; |
if (adjustedDescription.maxWidth.isFixed() && adjustedDescription.maxWidth.value() <= legacyWidthSnappingMagicNumber) |
- adjustedDescription.maxWidth = Length(100, ViewportPercentageWidth); |
+ adjustedDescription.maxWidth = Length(-1, Percent); |
if (adjustedDescription.maxHeight.isFixed() && adjustedDescription.maxWidth.value() <= m_size.height) |
- adjustedDescription.maxHeight = Length(100, ViewportPercentageHeight); |
+ adjustedDescription.maxHeight = Length(-2, Percent); |
esprehn
2013/12/04 06:02:28
This makes me nervous... why the magic lengths?
|
adjustedDescription.minWidth = adjustedDescription.maxWidth; |
adjustedDescription.minHeight = adjustedDescription.maxHeight; |
} |
@@ -2999,7 +2999,7 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription |
if (settingsImpl()->clobberUserAgentInitialScaleQuirk() |
&& m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1 |
&& m_pageScaleConstraintsSet.userAgentConstraints().initialScale * deviceScaleFactor() <= 1) { |
- if (description.maxWidth == Length(100, ViewportPercentageWidth) |
+ if (description.maxWidth == Length(-1, Percent) |
|| (description.maxWidth.type() == ExtendToZoom && m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale == 1.0f)) |
setInitialPageScaleOverride(-1); |
} |