Index: webkit/api/src/ChromiumBridge.cpp |
diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp |
index a544baa0d5379a7bbefb5e63aa6afc10b41965dd..3fdef0abd2c6c238a68dbb605660e185953167fa 100644 |
--- a/webkit/api/src/ChromiumBridge.cpp |
+++ b/webkit/api/src/ChromiumBridge.cpp |
@@ -49,6 +49,11 @@ |
#include "WebThemeEngine.h" |
#endif |
+#if PLATFORM(LINUX) |
+#include "WebSandboxSupport.h" |
+#include "WebFontInfo.h" |
+#endif |
+ |
#include "BitmapImage.h" |
#include "GraphicsContext.h" |
#include "KURL.h" |
@@ -145,7 +150,7 @@ void ChromiumBridge::prefetchDNS(const String& hostname) |
// Font ----------------------------------------------------------------------- |
-#if defined(OS_WIN) |
+#if PLATFORM(WIN_OS) |
bool ChromiumBridge::ensureFontLoaded(HFONT font) |
{ |
WebSandboxSupport* ss = webKitClient()->sandboxSupport(); |
@@ -156,6 +161,16 @@ bool ChromiumBridge::ensureFontLoaded(HFONT font) |
} |
#endif |
+#if PLATFORM(LINUX) |
+String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters) |
+{ |
+ if (webKitClient()->sandboxSupport()) |
+ return webKitClient()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters); |
+ else |
+ return WebFontInfo::familyForChars(characters, numCharacters); |
+} |
+#endif |
+ |
// Language ------------------------------------------------------------------- |
String ChromiumBridge::computedDefaultLanguage() |