Index: android_webview/native/aw_contents.cc |
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc |
index 6b6752559922a5aab51d0eb4ec2d948ad38fec86..82100be08d15eba2b17a77a6708e7f76a1588fd7 100644 |
--- a/android_webview/native/aw_contents.cc |
+++ b/android_webview/native/aw_contents.cc |
@@ -147,8 +147,7 @@ AwContents::AwContents(scoped_ptr<WebContents> web_contents) |
if (autofill_manager_delegate) |
InitAutofillIfNecessary(autofill_manager_delegate->GetSaveFormData()); |
- web_contents_->GetMutableRendererPrefs()->tap_multiple_targets_strategy = |
- content::TAP_MULTIPLE_TARGETS_STRATEGY_NONE; |
+ SetAndroidWebViewRendererPrefs(); |
} |
void AwContents::SetJavaPeers(JNIEnv* env, |
@@ -214,6 +213,18 @@ void AwContents::InitAutofillIfNecessary(bool enabled) { |
AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); |
} |
+void AwContents::SetAndroidWebViewRendererPrefs() { |
+ content::RendererPreferences* prefs = |
+ web_contents_->GetMutableRendererPrefs(); |
+ prefs->hinting = content::RENDERER_PREFERENCES_HINTING_SLIGHT; |
+ prefs->tap_multiple_targets_strategy = |
+ content::TAP_MULTIPLE_TARGETS_STRATEGY_NONE; |
+ prefs->use_subpixel_positioning = true; |
+ content::RenderViewHost* host = web_contents_->GetRenderViewHost(); |
+ if (host) |
+ host->SyncRendererPrefs(); |
+} |
+ |
void AwContents::SetAwAutofillManagerDelegate(jobject delegate) { |
JNIEnv* env = AttachCurrentThread(); |
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |