diff options
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_delegate_helper.cc | 2 | ||||
-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 | ||||
-rw-r--r-- | webkit/glue/webpreferences.h | 2 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 1 |
6 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index 8390d6e..6132743 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -165,6 +165,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically); web_prefs.uses_page_cache = command_line.HasSwitch(switches::kEnableFastback); + web_prefs.remote_fonts_enabled = + command_line.HasSwitch(switches::kEnableRemoteFonts); } web_prefs.uses_universal_detector = 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>"); 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. |