mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix Mac OS X compile errors due to Chromium 69409 update.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@153 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -927,9 +927,9 @@ void CefBrowserImpl::UIT_GetDocumentTextNotify(CefFrame* frame,
|
|||||||
WebKit::WebFrame* web_frame = GetWebFrame(frame);
|
WebKit::WebFrame* web_frame = GetWebFrame(frame);
|
||||||
if(web_frame) {
|
if(web_frame) {
|
||||||
// Retrieve the document string
|
// Retrieve the document string
|
||||||
std::wstring wstr = webkit_glue::DumpDocumentText(web_frame);
|
string16 wstr = webkit_glue::DumpDocumentText(web_frame);
|
||||||
std::string str;
|
std::string str;
|
||||||
WideToUTF8(wstr.c_str(), wstr.length(), &str);
|
UTF16ToUTF8(wstr.c_str(), wstr.length(), &str);
|
||||||
// Write the document string to the stream
|
// Write the document string to the stream
|
||||||
writer->Write(str.c_str(), str.size(), 1);
|
writer->Write(str.c_str(), str.size(), 1);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// be found in the LICENSE file.
|
// be found in the LICENSE file.
|
||||||
|
|
||||||
#include "../include/cef.h"
|
#include "../include/cef.h"
|
||||||
|
#include "base/utf_string_conversions.h"
|
||||||
#include "webkit/glue/webpreferences.h"
|
#include "webkit/glue/webpreferences.h"
|
||||||
|
|
||||||
void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web)
|
void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web)
|
||||||
@ -10,22 +11,22 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web)
|
|||||||
if (cef.standard_font_family.length > 0)
|
if (cef.standard_font_family.length > 0)
|
||||||
web.standard_font_family = CefString(&cef.standard_font_family);
|
web.standard_font_family = CefString(&cef.standard_font_family);
|
||||||
else
|
else
|
||||||
web.standard_font_family = L"Times";
|
web.standard_font_family = ASCIIToUTF16("Times");
|
||||||
|
|
||||||
if (cef.fixed_font_family.length > 0)
|
if (cef.fixed_font_family.length > 0)
|
||||||
web.fixed_font_family = CefString(&cef.fixed_font_family);
|
web.fixed_font_family = CefString(&cef.fixed_font_family);
|
||||||
else
|
else
|
||||||
web.fixed_font_family = L"Courier";
|
web.fixed_font_family = ASCIIToUTF16("Courier");
|
||||||
|
|
||||||
if (cef.serif_font_family.length > 0)
|
if (cef.serif_font_family.length > 0)
|
||||||
web.serif_font_family = CefString(&cef.serif_font_family);
|
web.serif_font_family = CefString(&cef.serif_font_family);
|
||||||
else
|
else
|
||||||
web.serif_font_family = L"Times";
|
web.serif_font_family = ASCIIToUTF16("Times");
|
||||||
|
|
||||||
if (cef.sans_serif_font_family.length > 0)
|
if (cef.sans_serif_font_family.length > 0)
|
||||||
web.sans_serif_font_family = CefString(&cef.sans_serif_font_family);
|
web.sans_serif_font_family = CefString(&cef.sans_serif_font_family);
|
||||||
else
|
else
|
||||||
web.sans_serif_font_family = L"Helvetica";
|
web.sans_serif_font_family = ASCIIToUTF16("Helvetica");
|
||||||
|
|
||||||
// These two fonts below are picked from the intersection of
|
// These two fonts below are picked from the intersection of
|
||||||
// Win XP font list and Vista font list :
|
// Win XP font list and Vista font list :
|
||||||
@ -42,9 +43,9 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web)
|
|||||||
web.cursive_font_family = CefString(&cef.cursive_font_family);
|
web.cursive_font_family = CefString(&cef.cursive_font_family);
|
||||||
} else {
|
} else {
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
web.cursive_font_family = L"Apple Chancery";
|
web.cursive_font_family = ASCIIToUTF16("Apple Chancery");
|
||||||
#else
|
#else
|
||||||
web.cursive_font_family = L"Comic Sans MS";
|
web.cursive_font_family = ASCIIToUTF16("Comic Sans MS");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,9 +53,9 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web)
|
|||||||
web.fantasy_font_family = CefString(&cef.fantasy_font_family);
|
web.fantasy_font_family = CefString(&cef.fantasy_font_family);
|
||||||
} else {
|
} else {
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
web.fantasy_font_family = L"Papyrus";
|
web.fantasy_font_family = ASCIIToUTF16("Papyrus");
|
||||||
#else
|
#else
|
||||||
web.fantasy_font_family = L"Impact";
|
web.fantasy_font_family = ASCIIToUTF16("Impact");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ void BrowserWebBlobRegistryImpl::registerBlobURL(
|
|||||||
FROM_HERE,
|
FROM_HERE,
|
||||||
NewRunnableMethod(
|
NewRunnableMethod(
|
||||||
this, &BrowserWebBlobRegistryImpl::DoRegisterBlobUrl, url,
|
this, &BrowserWebBlobRegistryImpl::DoRegisterBlobUrl, url,
|
||||||
blob_data.release())); // Released in DoRegisterBlobUrl.
|
blob_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWebBlobRegistryImpl::registerBlobURL(
|
void BrowserWebBlobRegistryImpl::registerBlobURL(
|
||||||
@ -76,7 +76,6 @@ void BrowserWebBlobRegistryImpl::DoRegisterBlobUrl(
|
|||||||
const GURL& url, webkit_blob::BlobData* blob_data) {
|
const GURL& url, webkit_blob::BlobData* blob_data) {
|
||||||
DCHECK(g_blob_storage_controller);
|
DCHECK(g_blob_storage_controller);
|
||||||
g_blob_storage_controller->RegisterBlobUrl(url, blob_data);
|
g_blob_storage_controller->RegisterBlobUrl(url, blob_data);
|
||||||
blob_data->Release();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWebBlobRegistryImpl::DoRegisterBlobUrlFrom(
|
void BrowserWebBlobRegistryImpl::DoRegisterBlobUrlFrom(
|
||||||
|
@ -249,4 +249,4 @@ TEST(StringTest, Map)
|
|||||||
ASSERT_EQ(cef_string_map_size(mapPtr), 0);
|
ASSERT_EQ(cef_string_map_size(mapPtr), 0);
|
||||||
|
|
||||||
cef_string_map_free(mapPtr);
|
cef_string_map_free(mapPtr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user