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

Unified Diff: Source/WebCore/platform/graphics/mac/FontCacheMac.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 | « Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/mac/FontCacheMac.mm
===================================================================
--- Source/WebCore/platform/graphics/mac/FontCacheMac.mm (revision 113809)
+++ Source/WebCore/platform/graphics/mac/FontCacheMac.mm (working copy)
@@ -230,7 +230,12 @@
bool syntheticBold = isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(actualWeight);
bool syntheticOblique = (traits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait);
- return new FontPlatformData(platformFont, size, syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.textOrientation(), fontDescription.widthVariant());
+ // FontPlatformData::font() can be null for the case of Chromium out-of-process font loading.
+ // In that case, we don't want to use the platformData.
+ OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platformFont, size, syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.textOrientation(), fontDescription.widthVariant()));
+ if (!platformData->font())
+ return 0;
+ return platformData.leakPtr();
}
} // namespace WebCore
« no previous file with comments | « Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698