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

Side by Side Diff: third_party/WebKit/Source/core/fetch/FontResource.cpp

Issue 1878253003: Allow explicit conversion operators and implement WTF::OwnPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 if (m_data) 140 if (m_data)
141 m_fontData = FontCustomPlatformData::create(m_data.get(), m_otsParsi ngMessage); 141 m_fontData = FontCustomPlatformData::create(m_data.get(), m_otsParsi ngMessage);
142 142
143 if (m_fontData) { 143 if (m_fontData) {
144 recordPackageFormatHistogram(packageFormatOf(m_data.get())); 144 recordPackageFormatHistogram(packageFormatOf(m_data.get()));
145 } else { 145 } else {
146 setStatus(DecodeError); 146 setStatus(DecodeError);
147 recordPackageFormatHistogram(PackageFormatUnknown); 147 recordPackageFormatHistogram(PackageFormatUnknown);
148 } 148 }
149 } 149 }
150 return m_fontData; 150 return m_fontData.get();
151 } 151 }
152 152
153 FontPlatformData FontResource::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation) 153 FontPlatformData FontResource::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation)
154 { 154 {
155 ASSERT(m_fontData); 155 ASSERT(m_fontData);
156 return m_fontData->fontPlatformData(size, bold, italic, orientation); 156 return m_fontData->fontPlatformData(size, bold, italic, orientation);
157 } 157 }
158 158
159 bool FontResource::isSafeToUnlock() const 159 bool FontResource::isSafeToUnlock() const
160 { 160 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void FontResource::checkNotify() 192 void FontResource::checkNotify()
193 { 193 {
194 m_fontLoadShortLimitTimer.stop(); 194 m_fontLoadShortLimitTimer.stop();
195 m_fontLoadLongLimitTimer.stop(); 195 m_fontLoadLongLimitTimer.stop();
196 ResourceClientWalker<FontResourceClient> w(m_clients); 196 ResourceClientWalker<FontResourceClient> w(m_clients);
197 while (FontResourceClient* c = w.next()) 197 while (FontResourceClient* c = w.next())
198 c->fontLoaded(this); 198 c->fontLoaded(this);
199 } 199 }
200 200
201 } // namespace blink 201 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698