Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1154)

Unified Diff: Source/core/page/PageScaleConstraintsSet.cpp

Issue 23459006: [Android WebView] Fix WideViewport use case after r157293 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a test for useWideViewport=false + <meta name='viewport' content='height=1000'> Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698