Index: content/browser/renderer_host/sandbox_ipc_linux.cc |
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.cc b/content/browser/renderer_host/sandbox_ipc_linux.cc |
index fbf875940d9de3ae908e06526aa9ec8a57a078aa..8d6f6df9b3873f2a80ea7573df1f4d8366a08c39 100644 |
--- a/content/browser/renderer_host/sandbox_ipc_linux.cc |
+++ b/content/browser/renderer_host/sandbox_ipc_linux.cc |
@@ -219,8 +219,8 @@ void SandboxIPCHandler::HandleRequestFromRenderer(int fd) { |
HandleFontMatchRequest(fd, pickle, iter, fds.get()); |
} else if (kind == FontConfigIPC::METHOD_OPEN) { |
HandleFontOpenRequest(fd, pickle, iter, fds.get()); |
- } else if (kind == LinuxSandbox::METHOD_GET_FONT_FAMILY_FOR_CHAR) { |
- HandleGetFontFamilyForChar(fd, pickle, iter, fds.get()); |
+ } else if (kind == LinuxSandbox::METHOD_GET_FALLBACK_FONT_FOR_CHAR) { |
+ HandleGetFallbackFontForChar(fd, pickle, iter, fds.get()); |
} else if (kind == LinuxSandbox::METHOD_LOCALTIME) { |
HandleLocaltime(fd, pickle, iter, fds.get()); |
} else if (kind == LinuxSandbox::METHOD_GET_STYLE_FOR_STRIKE) { |
@@ -311,7 +311,7 @@ void SandboxIPCHandler::HandleFontOpenRequest( |
} |
} |
-void SandboxIPCHandler::HandleGetFontFamilyForChar( |
+void SandboxIPCHandler::HandleGetFallbackFontForChar( |
int fd, |
const Pickle& pickle, |
PickleIterator iter, |
@@ -328,17 +328,24 @@ void SandboxIPCHandler::HandleGetFontFamilyForChar( |
if (!pickle.ReadString(&iter, &preferred_locale)) |
return; |
- blink::WebFontFamily family; |
- WebFontInfo::familyForChar(c, preferred_locale.c_str(), &family); |
+ blink::WebFallbackFont fallbackFont; |
+ WebFontInfo::fallbackFontForChar(c, preferred_locale.c_str(), &fallbackFont); |
jln (very slow on Chromium)
2014/06/10 01:52:34
Is it clear on the Blink side of this that this is
Dominik Röttsches
2014/06/10 07:44:52
Yes - that is clear and unfortunately required whe
|
Pickle reply; |
- if (family.name.data()) { |
- reply.WriteString(family.name.data()); |
+ if (fallbackFont.name.data()) { |
+ reply.WriteString(fallbackFont.name.data()); |
} else { |
reply.WriteString(std::string()); |
} |
- reply.WriteBool(family.isBold); |
- reply.WriteBool(family.isItalic); |
+ if (fallbackFont.filename.data()) { |
+ reply.WriteString(fallbackFont.filename.data()); |
+ } |
+ else { |
piman
2014/06/10 01:30:09
nit: } else {
|
+ reply.WriteString(std::string()); |
+ } |
+ reply.WriteInt(fallbackFont.ttcIndex); |
+ reply.WriteBool(fallbackFont.isBold); |
+ reply.WriteBool(fallbackFont.isItalic); |
SendRendererReply(fds, reply, -1); |
} |