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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm

Issue 1987203002: Remove OwnPtr::release(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with trunk for landing. Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 bool syntheticItalic = ((traits & NSFontItalicTrait) && !(actualTraits & NSF ontItalicTrait)) || fontDescription.isSyntheticItalic(); 229 bool syntheticItalic = ((traits & NSFontItalicTrait) && !(actualTraits & NSF ontItalicTrait)) || fontDescription.isSyntheticItalic();
230 230
231 // FontPlatformData::typeface() is null in the case of Chromium out-of-proce ss font loading failing. 231 // FontPlatformData::typeface() is null in the case of Chromium out-of-proce ss font loading failing.
232 // Out-of-process loading occurs for registered fonts stored in non-system l ocations. 232 // Out-of-process loading occurs for registered fonts stored in non-system l ocations.
233 // When loading fails, we do not want to use the returned FontPlatformData s ince it will not have 233 // When loading fails, we do not want to use the returned FontPlatformData s ince it will not have
234 // a valid SkTypeface. 234 // a valid SkTypeface.
235 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo rmFont, size, syntheticBold, syntheticItalic, fontDescription.orientation())); 235 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo rmFont, size, syntheticBold, syntheticItalic, fontDescription.orientation()));
236 if (!platformData->typeface()) { 236 if (!platformData->typeface()) {
237 return nullptr; 237 return nullptr;
238 } 238 }
239 return platformData.release(); 239 return platformData;
240 } 240 }
241 241
242 } // namespace blink 242 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698