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

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

Issue 23038013: [Android WebView] Avoid expanding layout width to match the old WebView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 e0d185b6542fa03e2a6d47f5e0a90ac81d340dab..347af42be0f040e581fed34631187efb139e8c84 100644
--- a/Source/core/page/PageScaleConstraintsSet.cpp
+++ b/Source/core/page/PageScaleConstraintsSet.cpp
@@ -136,9 +136,13 @@ void PageScaleConstraintsSet::adjustPageDefinedConstraintsForAndroidWebView(cons
float adjustedLayoutSizeWidth = m_pageDefinedConstraints.layoutSize.width();
if (useWideViewport && arguments.width == -1 && arguments.zoom != 1.0f)
adjustedLayoutSizeWidth = layoutFallbackWidth;
+ else if (useWideViewport && arguments.width != -1 && arguments.width != ViewportArguments::ValueDeviceWidth)
+ adjustedLayoutSizeWidth = arguments.width;
aelias_OOO_until_Jul13 2013/08/21 20:23:54 This ends up bypassing every other width computati
mnaganov (inactive) 2013/08/22 08:51:55 Thanks for the suggestion, Alexandre! I didn't con
else {
if (!useWideViewport)
adjustedLayoutSizeWidth = getLayoutWidthForNonWideViewport(viewSize, initialScale);
+ else if (arguments.width == ViewportArguments::ValueDeviceWidth || (arguments.width == -1 && arguments.zoom == 1.0f))
+ adjustedLayoutSizeWidth = viewSize.width();
if (!useWideViewport || arguments.width == -1 || arguments.width == ViewportArguments::ValueDeviceWidth)
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