From 06ea8e899e48f1f2f396b70e63fae369f2f23232 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Mon, 28 Jun 2010 16:42:48 +0100 Subject: Merge WebKit at r61871: Initial merge by git. Change-Id: I6cff43abca9cc4782e088a469ad4f03f166a65d5 --- WebKit/chromium/src/ChromiumBridge.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'WebKit/chromium/src/ChromiumBridge.cpp') diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index 3b8e5fa..4963f78 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -49,6 +49,7 @@ #include "WebMimeRegistry.h" #include "WebPluginContainerImpl.h" #include "WebPluginListBuilderImpl.h" +#include "WebSandboxSupport.h" #include "WebScreenInfo.h" #include "WebString.h" #include "WebURL.h" @@ -59,12 +60,10 @@ #if OS(WINDOWS) #include "WebRect.h" -#include "WebSandboxSupport.h" #include "WebThemeEngine.h" #endif #if OS(LINUX) -#include "WebSandboxSupport.h" #include "WebFontInfo.h" #include "WebFontRenderStyle.h" #endif @@ -404,6 +403,22 @@ void ChromiumBridge::getRenderStyleForStrike(const char* font, int sizeAndStyle, } #endif +#if OS(DARWIN) +bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out) +{ + WebSandboxSupport* ss = webKitClient()->sandboxSupport(); + if (ss) + return ss->loadFont(srcFont, out); + + // This function should only be called in response to an error loading a + // font due to being blocked by the sandbox. + // This by definition shouldn't happen if there is no sandbox support. + ASSERT_NOT_REACHED(); + *out = 0; + return false; +} +#endif + // Geolocation ---------------------------------------------------------------- GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium) -- cgit v1.1