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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2391613002: [Android WebView] make spellcheck off by default and opt-in using spellcheck="true" attribute. (Closed)
Patch Set: move inside the #ifdef os_android block Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « content/public/common/web_preferences.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 // Force preload=none and disable autoplay on older or low end Android 1146 // Force preload=none and disable autoplay on older or low end Android
1147 // platforms because their media pipelines are not stable enough to handle 1147 // platforms because their media pipelines are not stable enough to handle
1148 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826. 1148 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826.
1149 const bool is_low_end_device = 1149 const bool is_low_end_device =
1150 base::android::BuildInfo::GetInstance()->sdk_int() <= 1150 base::android::BuildInfo::GetInstance()->sdk_int() <=
1151 base::android::SDK_VERSION_JELLY_BEAN_MR2 || 1151 base::android::SDK_VERSION_JELLY_BEAN_MR2 ||
1152 base::SysInfo::IsLowEndDevice(); 1152 base::SysInfo::IsLowEndDevice();
1153 settings->setForcePreloadNoneForMediaElements(is_low_end_device); 1153 settings->setForcePreloadNoneForMediaElements(is_low_end_device);
1154 WebRuntimeFeatures::enableAutoplayMutedVideos( 1154 WebRuntimeFeatures::enableAutoplayMutedVideos(
1155 prefs.autoplay_muted_videos_enabled && !is_low_end_device); 1155 prefs.autoplay_muted_videos_enabled && !is_low_end_device);
1156 settings->setSpellCheckEnabledByDefault(prefs.spellcheck_enabled_by_default);
1156 #endif 1157 #endif
1157 1158
1158 settings->setAutoplayExperimentMode( 1159 settings->setAutoplayExperimentMode(
1159 blink::WebString::fromUTF8(prefs.autoplay_experiment_mode)); 1160 blink::WebString::fromUTF8(prefs.autoplay_experiment_mode));
1160 1161
1161 settings->setViewportEnabled(prefs.viewport_enabled); 1162 settings->setViewportEnabled(prefs.viewport_enabled);
1162 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); 1163 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled);
1163 settings->setShrinksViewportContentToFit( 1164 settings->setShrinksViewportContentToFit(
1164 prefs.shrinks_viewport_contents_to_fit); 1165 prefs.shrinks_viewport_contents_to_fit);
1165 settings->setViewportStyle( 1166 settings->setViewportStyle(
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 if (IsUseZoomForDSFEnabled()) { 3019 if (IsUseZoomForDSFEnabled()) {
3019 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3020 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3020 } else { 3021 } else {
3021 webview()->setDeviceScaleFactor(device_scale_factor_); 3022 webview()->setDeviceScaleFactor(device_scale_factor_);
3022 } 3023 }
3023 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3024 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3024 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3025 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3025 } 3026 }
3026 3027
3027 } // namespace content 3028 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/web_preferences.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698