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);
|
||||
if(web_frame) {
|
||||
// Retrieve the document string
|
||||
std::wstring wstr = webkit_glue::DumpDocumentText(web_frame);
|
||||
string16 wstr = webkit_glue::DumpDocumentText(web_frame);
|
||||
std::string str;
|
||||
WideToUTF8(wstr.c_str(), wstr.length(), &str);
|
||||
UTF16ToUTF8(wstr.c_str(), wstr.length(), &str);
|
||||
// Write the document string to the stream
|
||||
writer->Write(str.c_str(), str.size(), 1);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#include "../include/cef.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
|
||||
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)
|
||||
web.standard_font_family = CefString(&cef.standard_font_family);
|
||||
else
|
||||
web.standard_font_family = L"Times";
|
||||
web.standard_font_family = ASCIIToUTF16("Times");
|
||||
|
||||
if (cef.fixed_font_family.length > 0)
|
||||
web.fixed_font_family = CefString(&cef.fixed_font_family);
|
||||
else
|
||||
web.fixed_font_family = L"Courier";
|
||||
web.fixed_font_family = ASCIIToUTF16("Courier");
|
||||
|
||||
if (cef.serif_font_family.length > 0)
|
||||
web.serif_font_family = CefString(&cef.serif_font_family);
|
||||
else
|
||||
web.serif_font_family = L"Times";
|
||||
web.serif_font_family = 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 = L"Helvetica";
|
||||
web.sans_serif_font_family = ASCIIToUTF16("Helvetica");
|
||||
|
||||
// These two fonts below are picked from the intersection of
|
||||
// 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);
|
||||
} else {
|
||||
#if defined(OS_MACOSX)
|
||||
web.cursive_font_family = L"Apple Chancery";
|
||||
web.cursive_font_family = ASCIIToUTF16("Apple Chancery");
|
||||
#else
|
||||
web.cursive_font_family = L"Comic Sans MS";
|
||||
web.cursive_font_family = ASCIIToUTF16("Comic Sans MS");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -52,9 +53,9 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web)
|
||||
web.fantasy_font_family = CefString(&cef.fantasy_font_family);
|
||||
} else {
|
||||
#if defined(OS_MACOSX)
|
||||
web.fantasy_font_family = L"Papyrus";
|
||||
web.fantasy_font_family = ASCIIToUTF16("Papyrus");
|
||||
#else
|
||||
web.fantasy_font_family = L"Impact";
|
||||
web.fantasy_font_family = ASCIIToUTF16("Impact");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ void BrowserWebBlobRegistryImpl::registerBlobURL(
|
||||
FROM_HERE,
|
||||
NewRunnableMethod(
|
||||
this, &BrowserWebBlobRegistryImpl::DoRegisterBlobUrl, url,
|
||||
blob_data.release())); // Released in DoRegisterBlobUrl.
|
||||
blob_data));
|
||||
}
|
||||
|
||||
void BrowserWebBlobRegistryImpl::registerBlobURL(
|
||||
@ -76,7 +76,6 @@ void BrowserWebBlobRegistryImpl::DoRegisterBlobUrl(
|
||||
const GURL& url, webkit_blob::BlobData* blob_data) {
|
||||
DCHECK(g_blob_storage_controller);
|
||||
g_blob_storage_controller->RegisterBlobUrl(url, blob_data);
|
||||
blob_data->Release();
|
||||
}
|
||||
|
||||
void BrowserWebBlobRegistryImpl::DoRegisterBlobUrlFrom(
|
||||
|
@ -249,4 +249,4 @@ TEST(StringTest, Map)
|
||||
ASSERT_EQ(cef_string_map_size(mapPtr), 0);
|
||||
|
||||
cef_string_map_free(mapPtr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user