summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 00:27:11 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 00:27:11 +0000
commit0681ba03bedbc2e316184bc8dd69db57dbc2a5d0 (patch)
tree7230c4e5ee1aa6f79f504e1ad6a71e226d7279ce /android_webview
parent1b634d0bd9c52db090669a7a86abcac00e92db68 (diff)
downloadchromium_src-0681ba03bedbc2e316184bc8dd69db57dbc2a5d0.zip
chromium_src-0681ba03bedbc2e316184bc8dd69db57dbc2a5d0.tar.gz
chromium_src-0681ba03bedbc2e316184bc8dd69db57dbc2a5d0.tar.bz2
Reland r285145: Remove RendererPreferences font-rendering enums.
This reverts r285292, but avoids modifying RendererPreference::subpixel_positioning's default value, as it appears to be used by layout tests on Android. BUG=285292 TBR=msw@chromium.org,boliu@chromium.org,jln@chromium.org,jochen@chromium.org Review URL: https://codereview.chromium.org/417953006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/native/aw_settings.cc45
1 files changed, 2 insertions, 43 deletions
diff --git a/android_webview/native/aw_settings.cc b/android_webview/native/aw_settings.cc
index 0a4f8d9..2a0a50b 100644
--- a/android_webview/native/aw_settings.cc
+++ b/android_webview/native/aw_settings.cc
@@ -30,46 +30,6 @@ namespace android_webview {
namespace {
-// TODO(boliu): Deduplicate with chrome/ code.
-content::RendererPreferencesHintingEnum GetRendererPreferencesHintingEnum(
- gfx::FontRenderParams::Hinting hinting) {
- switch (hinting) {
- case gfx::FontRenderParams::HINTING_NONE:
- return content::RENDERER_PREFERENCES_HINTING_NONE;
- case gfx::FontRenderParams::HINTING_SLIGHT:
- return content::RENDERER_PREFERENCES_HINTING_SLIGHT;
- case gfx::FontRenderParams::HINTING_MEDIUM:
- return content::RENDERER_PREFERENCES_HINTING_MEDIUM;
- case gfx::FontRenderParams::HINTING_FULL:
- return content::RENDERER_PREFERENCES_HINTING_FULL;
- default:
- NOTREACHED() << "Unhandled hinting style " << hinting;
- return content::RENDERER_PREFERENCES_HINTING_SYSTEM_DEFAULT;
- }
-}
-
-// TODO(boliu): Deduplicate with chrome/ code.
-content::RendererPreferencesSubpixelRenderingEnum
-GetRendererPreferencesSubpixelRenderingEnum(
- gfx::FontRenderParams::SubpixelRendering subpixel_rendering) {
- switch (subpixel_rendering) {
- case gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE:
- return content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_NONE;
- case gfx::FontRenderParams::SUBPIXEL_RENDERING_RGB:
- return content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_RGB;
- case gfx::FontRenderParams::SUBPIXEL_RENDERING_BGR:
- return content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_BGR;
- case gfx::FontRenderParams::SUBPIXEL_RENDERING_VRGB:
- return content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_VRGB;
- case gfx::FontRenderParams::SUBPIXEL_RENDERING_VBGR:
- return content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_VBGR;
- default:
- NOTREACHED() << "Unhandled subpixel rendering style "
- << subpixel_rendering;
- return content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_SYSTEM_DEFAULT;
- }
-}
-
void PopulateFixedRendererPreferences(RendererPreferences* prefs) {
prefs->tap_multiple_targets_strategy =
content::TAP_MULTIPLE_TARGETS_STRATEGY_NONE;
@@ -79,11 +39,10 @@ void PopulateFixedRendererPreferences(RendererPreferences* prefs) {
(gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(true), NULL)));
prefs->should_antialias_text = params.antialiasing;
prefs->use_subpixel_positioning = params.subpixel_positioning;
- prefs->hinting = GetRendererPreferencesHintingEnum(params.hinting);
+ prefs->hinting = params.hinting;
prefs->use_autohinter = params.autohinter;
prefs->use_bitmaps = params.use_bitmaps;
- prefs->subpixel_rendering =
- GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering);
+ prefs->subpixel_rendering = params.subpixel_rendering;
}
void PopulateFixedWebPreferences(WebPreferences* web_prefs) {