mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision ad468e8b (#292352).
- Building Chromium using SVN is no longer supported. - Remove CefDOMEvent and CefDOMEventListener (issue #933). - Remove CefRenderHandler::OnScrollOffsetChanged (http://crbug.com/404656). - Remove UR_FLAG_REPORT_LOAD_TIMING (https://codereview.chromium.org/451623002/). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1816 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -6,15 +6,15 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "include/internal/cef_types_wrappers.h"
|
||||
#include "libcef/common/cef_switches.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "include/internal/cef_types_wrappers.h"
|
||||
#include "webkit/common/webpreferences.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
|
||||
// Set default preferences based on CEF command-line flags. Chromium command-
|
||||
// line flags should not exist for these preferences.
|
||||
void SetDefaults(WebPreferences& web) {
|
||||
void SetDefaults(content::WebPreferences& web) {
|
||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||
|
||||
if (command_line.HasSwitch(switches::kDefaultEncoding)) {
|
||||
@ -55,31 +55,32 @@ void SetDefaults(WebPreferences& web) {
|
||||
// Use the preferences from WebContentsImpl::GetWebkitPrefs and the
|
||||
// WebPreferences constructor by default. Only override features that are
|
||||
// explicitly enabled or disabled.
|
||||
void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
|
||||
void BrowserToWebSettings(const CefBrowserSettings& cef,
|
||||
content::WebPreferences& web) {
|
||||
SetDefaults(web);
|
||||
|
||||
if (cef.standard_font_family.length > 0) {
|
||||
web.standard_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.standard_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.standard_font_family);
|
||||
}
|
||||
if (cef.fixed_font_family.length > 0) {
|
||||
web.fixed_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.fixed_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.fixed_font_family);
|
||||
}
|
||||
if (cef.serif_font_family.length > 0) {
|
||||
web.serif_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.serif_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.serif_font_family);
|
||||
}
|
||||
if (cef.sans_serif_font_family.length > 0) {
|
||||
web.sans_serif_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.sans_serif_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.sans_serif_font_family);
|
||||
}
|
||||
if (cef.cursive_font_family.length > 0) {
|
||||
web.cursive_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.cursive_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.cursive_font_family);
|
||||
}
|
||||
if (cef.fantasy_font_family.length > 0) {
|
||||
web.fantasy_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.fantasy_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.fantasy_font_family);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user