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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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) 2007 Apple Computer, Inc. 2 * Copyright (C) 2007 Apple Computer, Inc.
3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved. 3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved.
4 * Copyright (C) 2010 Company 100, Inc. 4 * Copyright (C) 2010 Company 100, Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 std::unique_ptr<FontCustomPlatformData> FontCustomPlatformData::create( 63 std::unique_ptr<FontCustomPlatformData> FontCustomPlatformData::create(
64 SharedBuffer* buffer, 64 SharedBuffer* buffer,
65 String& otsParseMessage) { 65 String& otsParseMessage) {
66 DCHECK(buffer); 66 DCHECK(buffer);
67 WebFontDecoder decoder; 67 WebFontDecoder decoder;
68 sk_sp<SkTypeface> typeface = decoder.decode(buffer); 68 sk_sp<SkTypeface> typeface = decoder.decode(buffer);
69 if (!typeface) { 69 if (!typeface) {
70 otsParseMessage = decoder.getErrorString(); 70 otsParseMessage = decoder.getErrorString();
71 return nullptr; 71 return nullptr;
72 } 72 }
73 return wrapUnique( 73 return WTF::wrapUnique(
74 new FontCustomPlatformData(std::move(typeface), decoder.decodedSize())); 74 new FontCustomPlatformData(std::move(typeface), decoder.decodedSize()));
75 } 75 }
76 76
77 bool FontCustomPlatformData::supportsFormat(const String& format) { 77 bool FontCustomPlatformData::supportsFormat(const String& format) {
78 return equalIgnoringCase(format, "truetype") || 78 return equalIgnoringCase(format, "truetype") ||
79 equalIgnoringCase(format, "opentype") || 79 equalIgnoringCase(format, "opentype") ||
80 WebFontDecoder::supportsFormat(format); 80 WebFontDecoder::supportsFormat(format);
81 } 81 }
82 82
83 } // namespace blink 83 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontCache.cpp ('k') | third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698