Enable web layout quirks for apps with targetSdkVersion < K

BUG=10183494

Change-Id: I29fea271a88a475ba112132d8849884e62c629db
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromium.java b/chromium/java/com/android/webview/chromium/WebViewChromium.java
index 83ba919..7eff33b 100644
--- a/chromium/java/com/android/webview/chromium/WebViewChromium.java
+++ b/chromium/java/com/android/webview/chromium/WebViewChromium.java
@@ -54,6 +54,7 @@
 
 import org.chromium.android_webview.AwBrowserContext;
 import org.chromium.android_webview.AwContents;
+import org.chromium.android_webview.AwLayoutSizer;
 import org.chromium.base.ThreadUtils;
 import org.chromium.content.browser.LoadUrlParams;
 import org.chromium.net.NetworkChangeNotifier;
@@ -123,13 +124,15 @@
         // BUG=6790250 |javaScriptInterfaces| was only ever used by the obsolete DumpRenderTree
         // so is ignored. TODO: remove it from WebViewProvider.
         final boolean isAccessFromFileURLsGrantedByDefault =
-                 mAppTargetSdkVersion < Build.VERSION_CODES.JELLY_BEAN;
+                mAppTargetSdkVersion < Build.VERSION_CODES.JELLY_BEAN;
+        final boolean areLegacyQuirksEnabled =
+                mAppTargetSdkVersion < Build.VERSION_CODES.KITKAT;
         mContentsClientAdapter = new WebViewContentsClientAdapter(mWebView);
         mAwContents = new AwContents(mBrowserContext, mWebView, new InternalAccessAdapter(),
-                mContentsClientAdapter, isAccessFromFileURLsGrantedByDefault);
+                mContentsClientAdapter, isAccessFromFileURLsGrantedByDefault,
+                new AwLayoutSizer(), areLegacyQuirksEnabled);
         mWebSettings = new ContentSettingsAdapter(mAwContents.getSettings());
 
-
         if (privateBrowsing) {
             final String msg = "Private browsing is not supported in WebView.";
             if (mAppTargetSdkVersion >= Build.VERSION_CODES.KITKAT) {