summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
Diffstat (limited to 'content/common')
-rw-r--r--content/common/DEPS2
-rw-r--r--content/common/child_process_sandbox_support_impl_linux.cc22
-rw-r--r--content/common/child_process_sandbox_support_impl_linux.h6
-rw-r--r--content/common/sandbox_linux/sandbox_linux.h2
4 files changed, 19 insertions, 13 deletions
diff --git a/content/common/DEPS b/content/common/DEPS
index 7d2d0e7..388e1db 100644
--- a/content/common/DEPS
+++ b/content/common/DEPS
@@ -31,8 +31,8 @@ include_rules = [
"+third_party/WebKit/public/platform/WebServiceWorkerState.h",
"+third_party/WebKit/public/platform/WebStorageArea.h",
"+third_party/WebKit/public/platform/WebString.h",
- "+third_party/WebKit/public/platform/linux/WebFontFamily.h",
"+third_party/WebKit/public/platform/linux/WebFontRenderStyle.h",
+ "+third_party/WebKit/public/platform/linux/WebFallbackFont.h",
"+third_party/WebKit/public/web/mac/WebScrollbarTheme.h",
"+third_party/WebKit/public/web/WebAXEnums.h",
"+third_party/WebKit/public/web/WebCompositionUnderline.h",
diff --git a/content/common/child_process_sandbox_support_impl_linux.cc b/content/common/child_process_sandbox_support_impl_linux.cc
index c0edcfc..8c3c259 100644
--- a/content/common/child_process_sandbox_support_impl_linux.cc
+++ b/content/common/child_process_sandbox_support_impl_linux.cc
@@ -15,18 +15,18 @@
#include "base/sys_byteorder.h"
#include "content/common/sandbox_linux/sandbox_linux.h"
#include "content/common/zygote_commands_linux.h"
-#include "third_party/WebKit/public/platform/linux/WebFontFamily.h"
+#include "third_party/WebKit/public/platform/linux/WebFallbackFont.h"
#include "third_party/WebKit/public/platform/linux/WebFontRenderStyle.h"
namespace content {
-void GetFontFamilyForCharacter(int32_t character,
- const char* preferred_locale,
- blink::WebFontFamily* family) {
+void GetFallbackFontForCharacter(int32_t character,
+ const char* preferred_locale,
+ blink::WebFallbackFont* fallbackFont) {
TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter");
Pickle request;
- request.WriteInt(LinuxSandbox::METHOD_GET_FONT_FAMILY_FOR_CHAR);
+ request.WriteInt(LinuxSandbox::METHOD_GET_FALLBACK_FONT_FOR_CHAR);
request.WriteInt(character);
request.WriteString(preferred_locale);
@@ -35,17 +35,23 @@ void GetFontFamilyForCharacter(int32_t character,
sizeof(buf), NULL, request);
std::string family_name;
+ std::string filename;
+ int ttcIndex = 0;
bool isBold = false;
bool isItalic = false;
if (n != -1) {
Pickle reply(reinterpret_cast<char*>(buf), n);
PickleIterator pickle_iter(reply);
if (reply.ReadString(&pickle_iter, &family_name) &&
+ reply.ReadString(&pickle_iter, &filename) &&
+ reply.ReadInt(&pickle_iter, &ttcIndex) &&
reply.ReadBool(&pickle_iter, &isBold) &&
reply.ReadBool(&pickle_iter, &isItalic)) {
- family->name = family_name;
- family->isBold = isBold;
- family->isItalic = isItalic;
+ fallbackFont->name = family_name;
+ fallbackFont->filename = filename;
+ fallbackFont->ttcIndex = ttcIndex;
+ fallbackFont->isBold = isBold;
+ fallbackFont->isItalic = isItalic;
}
}
}
diff --git a/content/common/child_process_sandbox_support_impl_linux.h b/content/common/child_process_sandbox_support_impl_linux.h
index 556652f..2bbf76e 100644
--- a/content/common/child_process_sandbox_support_impl_linux.h
+++ b/content/common/child_process_sandbox_support_impl_linux.h
@@ -10,7 +10,7 @@
#include "content/public/common/content_descriptors.h"
namespace blink {
-struct WebFontFamily;
+struct WebFallbackFont;
struct WebFontRenderStyle;
}
@@ -23,9 +23,9 @@ namespace content {
//
// Returns: a font family instance.
// The instance has an empty font name if the request could not be satisfied.
-void GetFontFamilyForCharacter(const int32_t character,
+void GetFallbackFontForCharacter(const int32_t character,
const char* preferred_locale,
- blink::WebFontFamily* family);
+ blink::WebFallbackFont* family);
void GetRenderStyleForStrike(const char* family, int sizeAndStyle,
blink::WebFontRenderStyle* out);
diff --git a/content/common/sandbox_linux/sandbox_linux.h b/content/common/sandbox_linux/sandbox_linux.h
index d42fde3..6e4f8b3 100644
--- a/content/common/sandbox_linux/sandbox_linux.h
+++ b/content/common/sandbox_linux/sandbox_linux.h
@@ -33,7 +33,7 @@ class LinuxSandbox {
// This isn't the full list, values < 32 are reserved for methods called from
// Skia.
enum LinuxSandboxIPCMethods {
- METHOD_GET_FONT_FAMILY_FOR_CHAR = 32,
+ METHOD_GET_FALLBACK_FONT_FOR_CHAR = 32,
METHOD_LOCALTIME = 33,
DEPRECATED_METHOD_GET_CHILD_WITH_INODE = 34,
METHOD_GET_STYLE_FOR_STRIKE = 35,