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 /webkit | |
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 'webkit')
-rw-r--r-- | webkit/glue/webpreferences.h | 2 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index 2a4cc60..ab38077 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -39,6 +39,7 @@ struct WebPreferences { bool java_enabled; bool allow_scripts_to_close_windows; bool uses_page_cache; + bool remote_fonts_enabled; // TODO(tc): User style sheets will not work in chrome because it tries to // load the style sheet using a request without a frame. @@ -73,6 +74,7 @@ struct WebPreferences { java_enabled(true), allow_scripts_to_close_windows(false), uses_page_cache(false), + remote_fonts_enabled(false), user_style_sheet_enabled(false) { } }; diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 53d0511..0e13f6e 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -1466,6 +1466,7 @@ void WebViewImpl::SetPreferences(const WebPreferences& preferences) { settings->setUserStyleSheetLocation(KURL()); } settings->setUsesPageCache(preferences.uses_page_cache); + settings->setDownloadableBinaryFontsEnabled(preferences.remote_fonts_enabled); // This setting affects the behavior of links in an editable region: // clicking the link should select it rather than navigate to it. |