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

Unified Diff: Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm

Issue 10034005: Merge 113132 - [Chromium] Out-of-process font loading garbles text (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm
===================================================================
--- Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm (revision 113809)
+++ Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm (working copy)
@@ -190,8 +190,7 @@
// Parameters:
// * nsFont - The font we wish to load.
// * fontSize - point size of the font we wish to load.
-// * outNSFont - The font that was actually loaded, may be different from nsFont
-// if a fallback font was used.
+// * outNSFont - The font that was actually loaded or null if loading failed.
// * cgFont - on output this contains the CGFontRef corresponding to the NSFont
// that was picked in the end. The caller is responsible for calling
// CFRelease() on this parameter when done with it.
@@ -204,7 +203,7 @@
// Release old CGFontRef since it points at the LastResort font which we don't want.
CFRelease(cgFont);
cgFont = 0;
-
+
// Font loading was blocked by the Sandbox.
m_inMemoryFont = loadFontFromBrowserProcess(outNSFont);
if (m_inMemoryFont) {
@@ -214,10 +213,8 @@
// are consistent.
CFRetain(cgFont);
} else {
- // If we still can't load the font, then return Times,
- // rather than the LastResort font.
- outNSFont = [NSFont fontWithName:@"Times" size:fontSize];
- cgFont = CTFontCopyGraphicsFont(toCTFontRef(outNSFont), 0);
+ // If we still can't load the font, set |outNSFont| to null so that FontPlatformData won't be used.
+ outNSFont = 0;
}
}
}
« no previous file with comments | « no previous file | Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698