Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: chrome/browser/renderer_host/render_sandbox_host_linux.cc

Issue 147005: Linux: fix fake italics for font's without italic variants. (Closed)
Patch Set: ... Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | skia/ext/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" 5 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 #include <sys/uio.h> 9 #include <sys/uio.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (!pickle.ReadBool(&iter, &is_bold) || 126 if (!pickle.ReadBool(&iter, &is_bold) ||
127 !pickle.ReadBool(&iter, &is_italic) || 127 !pickle.ReadBool(&iter, &is_italic) ||
128 !pickle.ReadString(&iter, &family)) { 128 !pickle.ReadString(&iter, &family)) {
129 return; 129 return;
130 } 130 }
131 131
132 std::string result_family; 132 std::string result_family;
133 unsigned result_fileid; 133 unsigned result_fileid;
134 134
135 const bool r = font_config_->Match( 135 const bool r = font_config_->Match(
136 &result_family, &result_fileid, fileid_valid, fileid, family, is_bold, 136 &result_family, &result_fileid, fileid_valid, fileid, family, &is_bold,
137 is_italic); 137 &is_italic);
138 138
139 Pickle reply; 139 Pickle reply;
140 if (!r) { 140 if (!r) {
141 reply.WriteBool(false); 141 reply.WriteBool(false);
142 } else { 142 } else {
143 reply.WriteBool(true); 143 reply.WriteBool(true);
144 reply.WriteUInt32(result_fileid); 144 reply.WriteUInt32(result_fileid);
145 reply.WriteString(result_family); 145 reply.WriteString(result_family);
146 reply.WriteBool(is_bold);
147 reply.WriteBool(is_italic);
146 } 148 }
147 SendRendererReply(fds, reply, -1); 149 SendRendererReply(fds, reply, -1);
148 } 150 }
149 151
150 void HandleFontOpenRequest(int fd, Pickle& pickle, void* iter, 152 void HandleFontOpenRequest(int fd, Pickle& pickle, void* iter,
151 std::vector<int>& fds) { 153 std::vector<int>& fds) {
152 uint32_t fileid; 154 uint32_t fileid;
153 if (!pickle.ReadUInt32(&iter, &fileid)) 155 if (!pickle.ReadUInt32(&iter, &fileid))
154 return; 156 return;
155 const int result_fd = font_config_->Open(fileid); 157 const int result_fd = font_config_->Open(fileid);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 SandboxIPCProcess handler(child_lifeline_fd, browser_socket); 219 SandboxIPCProcess handler(child_lifeline_fd, browser_socket);
218 handler.Run(); 220 handler.Run();
219 _exit(0); 221 _exit(0);
220 } 222 }
221 } 223 }
222 224
223 RenderSandboxHostLinux::~RenderSandboxHostLinux() { 225 RenderSandboxHostLinux::~RenderSandboxHostLinux() {
224 HANDLE_EINTR(close(renderer_socket_)); 226 HANDLE_EINTR(close(renderer_socket_));
225 HANDLE_EINTR(close(childs_lifeline_fd_)); 227 HANDLE_EINTR(close(childs_lifeline_fd_));
226 } 228 }
OLDNEW
« no previous file with comments | « no previous file | skia/ext/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698