Cherry-pick: Add a legacy quirk for 'user-scalable=no' case

Cherry-pick of Blink http://crrev.com/53053002

To reduce amount of changes, we are not adding a new quirk
setting here as in the upstream patch, instead we are reusing
supportTargetDensityDPI for legacy behavior.

Bug: 11337642

Original description:

[Android WebView] Add a legacy quirk for 'user-scalable=no' case

In legacy Android WebView implementation, having 'user-scalable=no'
in the viewport meta tag ignores scale set via 'initial-scale' and
also affects wide viewport quirk behavior.

BUG=312691

Change-Id: I8731a76781d46622fd3fb61fbdb4342db028fcd9
diff --git a/Source/core/page/PageScaleConstraintsSet.cpp b/Source/core/page/PageScaleConstraintsSet.cpp
index 1e1b1b6..111a1de 100644
--- a/Source/core/page/PageScaleConstraintsSet.cpp
+++ b/Source/core/page/PageScaleConstraintsSet.cpp
@@ -190,6 +190,16 @@
         }
     }
 
+    if (supportTargetDensityDPI && !arguments.userZoom) {
+        m_pageDefinedConstraints.initialScale = targetDensityDPIFactor;
+        m_pageDefinedConstraints.minimumScale = m_pageDefinedConstraints.initialScale;
+        m_pageDefinedConstraints.maximumScale = m_pageDefinedConstraints.initialScale;
+        if (arguments.width == -1 || arguments.width == ViewportArguments::ValueDeviceWidth) {
+            adjustedLayoutSizeWidth = viewSize.width() / targetDensityDPIFactor;
+            adjustedLayoutSizeHeight = computeHeightByAspectRatio(adjustedLayoutSizeWidth, viewSize);
+        }
+    }
+
     m_pageDefinedConstraints.layoutSize.setWidth(adjustedLayoutSizeWidth);
     m_pageDefinedConstraints.layoutSize.setHeight(adjustedLayoutSizeHeight);
 }