| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 { | 437 { |
| 438 WebSandboxSupport* ss = webKitClient()->sandboxSupport(); | 438 WebSandboxSupport* ss = webKitClient()->sandboxSupport(); |
| 439 | 439 |
| 440 // if there is no sandbox, then we can assume the font | 440 // if there is no sandbox, then we can assume the font |
| 441 // was able to be loaded successfully already | 441 // was able to be loaded successfully already |
| 442 return ss ? ss->ensureFontLoaded(font) : true; | 442 return ss ? ss->ensureFontLoaded(font) : true; |
| 443 } | 443 } |
| 444 #endif | 444 #endif |
| 445 | 445 |
| 446 #if OS(DARWIN) | 446 #if OS(DARWIN) |
| 447 bool PlatformBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out) | 447 bool PlatformBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* container, u
int32_t* fontID) |
| 448 { | 448 { |
| 449 WebSandboxSupport* ss = webKitClient()->sandboxSupport(); | 449 WebSandboxSupport* ss = webKitClient()->sandboxSupport(); |
| 450 if (ss) | 450 if (ss) |
| 451 return ss->loadFont(srcFont, out); | 451 return ss->loadFont(srcFont, container, fontID); |
| 452 | 452 |
| 453 // This function should only be called in response to an error loading a | 453 // This function should only be called in response to an error loading a |
| 454 // font due to being blocked by the sandbox. | 454 // font due to being blocked by the sandbox. |
| 455 // This by definition shouldn't happen if there is no sandbox support. | 455 // This by definition shouldn't happen if there is no sandbox support. |
| 456 ASSERT_NOT_REACHED(); | 456 ASSERT_NOT_REACHED(); |
| 457 *out = 0; | 457 *container = 0; |
| 458 *fontID = 0; |
| 458 return false; | 459 return false; |
| 459 } | 460 } |
| 460 #elif OS(UNIX) | 461 #elif OS(UNIX) |
| 461 String PlatformBridge::getFontFamilyForCharacters(const UChar* characters, size_
t numCharacters, const char* preferredLocale) | 462 String PlatformBridge::getFontFamilyForCharacters(const UChar* characters, size_
t numCharacters, const char* preferredLocale) |
| 462 { | 463 { |
| 463 if (webKitClient()->sandboxSupport()) | 464 if (webKitClient()->sandboxSupport()) |
| 464 return webKitClient()->sandboxSupport()->getFontFamilyForCharacters(char
acters, numCharacters, preferredLocale); | 465 return webKitClient()->sandboxSupport()->getFontFamilyForCharacters(char
acters, numCharacters, preferredLocale); |
| 465 | 466 |
| 466 WebCString family = WebFontInfo::familyForChars(characters, numCharacters, p
referredLocale); | 467 WebCString family = WebFontInfo::familyForChars(characters, numCharacters, p
referredLocale); |
| 467 if (family.data()) | 468 if (family.data()) |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 } | 1057 } |
| 1057 | 1058 |
| 1058 #if ENABLE(WORKERS) | 1059 #if ENABLE(WORKERS) |
| 1059 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) | 1060 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) |
| 1060 { | 1061 { |
| 1061 return WebWorkerClientImpl::createWorkerContextProxy(worker); | 1062 return WebWorkerClientImpl::createWorkerContextProxy(worker); |
| 1062 } | 1063 } |
| 1063 #endif | 1064 #endif |
| 1064 | 1065 |
| 1065 } // namespace WebCore | 1066 } // namespace WebCore |
| OLD | NEW |