mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Update to Chromium revision 138235.
- Move to the new DOM storage backend. Persistent localStorage support will need to be re-implemented (issue #603). - Add CefV8Value::CreateUInt method and indicate that integer types are 32bit via usage of int32 and uint32 types (issue #331). - Add CefV8Context::Eval method for synchronous JavaScript execution that returns a value or exception (issue #444). - Move exception handling from an ExecuteFunction argument to a CefV8Value attribute (issue #546). - Make user data an attribute for all CefV8Value object types and not just CreateObject (issue #547). - Un-fork SQLitePersistentCookieStore by adding stub implementations for sqlite_diagnostics and browser_thread. - Update tools/cef_parser.py to match the CEF3 version. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@644 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -7,26 +7,40 @@
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
|
||||
using webkit_glue::WebPreferences;
|
||||
|
||||
void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
|
||||
if (cef.standard_font_family.length > 0)
|
||||
web.standard_font_family = CefString(&cef.standard_font_family);
|
||||
else
|
||||
web.standard_font_family = ASCIIToUTF16("Times");
|
||||
if (cef.standard_font_family.length > 0) {
|
||||
web.standard_font_family_map[WebPreferences::kCommonScript] =
|
||||
CefString(&cef.standard_font_family);
|
||||
} else {
|
||||
web.standard_font_family_map[WebPreferences::kCommonScript] =
|
||||
ASCIIToUTF16("Times");
|
||||
}
|
||||
|
||||
if (cef.fixed_font_family.length > 0)
|
||||
web.fixed_font_family = CefString(&cef.fixed_font_family);
|
||||
else
|
||||
web.fixed_font_family = ASCIIToUTF16("Courier");
|
||||
if (cef.fixed_font_family.length > 0) {
|
||||
web.fixed_font_family_map[WebPreferences::kCommonScript] =
|
||||
CefString(&cef.fixed_font_family);
|
||||
} else {
|
||||
web.fixed_font_family_map[WebPreferences::kCommonScript] =
|
||||
ASCIIToUTF16("Courier");
|
||||
}
|
||||
|
||||
if (cef.serif_font_family.length > 0)
|
||||
web.serif_font_family = CefString(&cef.serif_font_family);
|
||||
else
|
||||
web.serif_font_family = ASCIIToUTF16("Times");
|
||||
if (cef.serif_font_family.length > 0) {
|
||||
web.serif_font_family_map[WebPreferences::kCommonScript] =
|
||||
CefString(&cef.serif_font_family);
|
||||
} else {
|
||||
web.serif_font_family_map[WebPreferences::kCommonScript] =
|
||||
ASCIIToUTF16("Times");
|
||||
}
|
||||
|
||||
if (cef.sans_serif_font_family.length > 0)
|
||||
web.sans_serif_font_family = CefString(&cef.sans_serif_font_family);
|
||||
else
|
||||
web.sans_serif_font_family = ASCIIToUTF16("Helvetica");
|
||||
if (cef.sans_serif_font_family.length > 0) {
|
||||
web.sans_serif_font_family_map[WebPreferences::kCommonScript] =
|
||||
CefString(&cef.sans_serif_font_family);
|
||||
} else {
|
||||
web.sans_serif_font_family_map[WebPreferences::kCommonScript] =
|
||||
ASCIIToUTF16("Helvetica");
|
||||
}
|
||||
|
||||
// These two fonts below are picked from the intersection of
|
||||
// Win XP font list and Vista font list :
|
||||
@@ -40,22 +54,26 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
|
||||
// as long as they're available.
|
||||
|
||||
if (cef.cursive_font_family.length > 0) {
|
||||
web.cursive_font_family = CefString(&cef.cursive_font_family);
|
||||
web.cursive_font_family_map[WebPreferences::kCommonScript] =
|
||||
CefString(&cef.cursive_font_family);
|
||||
} else {
|
||||
web.cursive_font_family_map[WebPreferences::kCommonScript] =
|
||||
#if defined(OS_MACOSX)
|
||||
web.cursive_font_family = ASCIIToUTF16("Apple Chancery");
|
||||
ASCIIToUTF16("Apple Chancery");
|
||||
#else
|
||||
web.cursive_font_family = ASCIIToUTF16("Comic Sans MS");
|
||||
ASCIIToUTF16("Comic Sans MS");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (cef.fantasy_font_family.length > 0) {
|
||||
web.fantasy_font_family = CefString(&cef.fantasy_font_family);
|
||||
web.fantasy_font_family_map[WebPreferences::kCommonScript] =
|
||||
CefString(&cef.fantasy_font_family);
|
||||
} else {
|
||||
web.fantasy_font_family_map[WebPreferences::kCommonScript] =
|
||||
#if defined(OS_MACOSX)
|
||||
web.fantasy_font_family = ASCIIToUTF16("Papyrus");
|
||||
ASCIIToUTF16("Papyrus");
|
||||
#else
|
||||
web.fantasy_font_family = ASCIIToUTF16("Impact");
|
||||
ASCIIToUTF16("Impact");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user