diff options
author | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-16 23:44:12 +0000 |
---|---|---|
committer | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-16 23:44:12 +0000 |
commit | 11fb71de48a0801bfdbd6f8e9ac456e641000bc4 (patch) | |
tree | 302565ce25038d6ae497a0cb5ec0bb7634749321 /chrome/common | |
parent | 2c164cd4280e27070d64b403a4c5687c8d6ff9e5 (diff) | |
download | chromium_src-11fb71de48a0801bfdbd6f8e9ac456e641000bc4.zip chromium_src-11fb71de48a0801bfdbd6f8e9ac456e641000bc4.tar.gz chromium_src-11fb71de48a0801bfdbd6f8e9ac456e641000bc4.tar.bz2 |
Chrome-part of disabling web fonts by default while still alowing SVG fonts
(The webkit part is http://codereview.chromium.org/67209/show and
http://bugs.webkit.org/show_bug.cgi?id=25239 )
1. Adds '--enable-remote-fonts' command line switch
2. Adds a field ('enable_remote_fonts) to WebPreference
3. Pass the value of enable_remote_fonts to the corresponding field in WebCore::Settings (m_downloadableBinaryFontsEnabled)
BUG=9633
TEST: 1. Run Chrome with and without '--enable-remote-font' command line flag and go to http://www.alistapart.com/d/cssatten/heid.html. Without the flag, the page should be rendered with 'dull-looking ordinary' fonts. With the flag, the page should be rendered with 'decorative' remote fonts.
2. Even without the above flag, Chrome should should get 100/100, with no boxes in the upper right corner (still has the Linktest Failed error).
Review URL: http://codereview.chromium.org/67210
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16247 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 233259e..f9df29f 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -347,6 +347,10 @@ const wchar_t kDisablePlugins[] = L"disable-plugins"; // Prevent images from loading. const wchar_t kDisableImages[] = L"disable-images"; +// Enable remote web font support. SVG font should always work whether +// this option is specified or not. +const wchar_t kEnableRemoteFonts[] = L"enable-remote-fonts"; + // Use the low fragmentation heap for the CRT. const wchar_t kUseLowFragHeapCrt[] = L"use-lf-heap"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index f242ec9..539df1c 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -121,6 +121,7 @@ extern const wchar_t kDisableJava[]; extern const wchar_t kDisablePlugins[]; extern const wchar_t kDisableImages[]; extern const wchar_t kDisableWebSecurity[]; +extern const wchar_t kEnableRemoteFonts[]; extern const wchar_t kUseLowFragHeapCrt[]; diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 768cd85..2908480 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1522,6 +1522,7 @@ struct ParamTraits<WebPreferences> { WriteParam(m, p.user_style_sheet_enabled); WriteParam(m, p.user_style_sheet_location); WriteParam(m, p.uses_page_cache); + WriteParam(m, p.remote_fonts_enabled); } static bool Read(const Message* m, void** iter, param_type* p) { return @@ -1549,7 +1550,8 @@ struct ParamTraits<WebPreferences> { ReadParam(m, iter, &p->java_enabled) && ReadParam(m, iter, &p->user_style_sheet_enabled) && ReadParam(m, iter, &p->user_style_sheet_location) && - ReadParam(m, iter, &p->uses_page_cache); + ReadParam(m, iter, &p->uses_page_cache) && + ReadParam(m, iter, &p->remote_fonts_enabled); } static void Log(const param_type& p, std::wstring* l) { l->append(L"<WebPreferences>"); |