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

Unified Diff: Source/core/dom/ViewportArguments.cpp

Issue 23691017: [Android WebView] Treat zero values in viewport arguments specially (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
Index: Source/core/dom/ViewportArguments.cpp
diff --git a/Source/core/dom/ViewportArguments.cpp b/Source/core/dom/ViewportArguments.cpp
index 0a2708dd1f07b1b02f760d61f5acb4d501683393..9228ffca680a997140e986c8ad730cc9713c566c 100644
--- a/Source/core/dom/ViewportArguments.cpp
+++ b/Source/core/dom/ViewportArguments.cpp
@@ -166,6 +166,20 @@ PageScaleConstraints ViewportArguments::resolve(const FloatSize& initialViewport
return result;
}
+ if (type == ViewportArguments::ViewportMetaLayoutSizeAndZeroValuesQuirk) {
+ if (!static_cast<int>(resultWidth)) {
+ resultWidth = ViewportArguments::ValueDeviceWidth;
+ if (!static_cast<int>(resultZoom))
+ resultZoom = 1.0;
+ }
+ if (!static_cast<int>(resultHeight))
+ resultHeight = ViewportArguments::ValueDeviceHeight;
+ if (!static_cast<int>(resultMinZoom))
+ resultMinZoom = ViewportArguments::ValueAuto;
+ if (!static_cast<int>(resultMaxZoom))
+ resultMaxZoom = ViewportArguments::ValueAuto;
+ }
+
switch (static_cast<int>(resultWidth)) {
case ViewportArguments::ValueDeviceWidth:
resultWidth = initialViewportSize.width();

Powered by Google App Engine
This is Rietveld 408576698