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

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

Issue 983973004: Provide user friendly messages for OTS parsing of fonts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment fixes Created 5 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 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 ResourceClientWalker<FontResourceClient> walker(m_clients); 115 ResourceClientWalker<FontResourceClient> walker(m_clients);
116 while (FontResourceClient* client = walker.next()) 116 while (FontResourceClient* client = walker.next())
117 client->didStartFontLoad(this); 117 client->didStartFontLoad(this);
118 } 118 }
119 } 119 }
120 120
121 bool FontResource::ensureCustomFontData() 121 bool FontResource::ensureCustomFontData()
122 { 122 {
123 if (!m_fontData && !errorOccurred() && !isLoading()) { 123 if (!m_fontData && !errorOccurred() && !isLoading()) {
124 if (m_data) 124 if (m_data)
125 m_fontData = FontCustomPlatformData::create(m_data.get()); 125 m_fontData = FontCustomPlatformData::create(m_data.get(), m_otsParsi ngMessage);
126 126
127 if (m_fontData) { 127 if (m_fontData) {
128 recordPackageFormatHistogram(packageFormatOf(m_data.get())); 128 recordPackageFormatHistogram(packageFormatOf(m_data.get()));
129 } else { 129 } else {
130 setStatus(DecodeError); 130 setStatus(DecodeError);
131 recordPackageFormatHistogram(PackageFormatUnknown); 131 recordPackageFormatHistogram(PackageFormatUnknown);
132 } 132 }
133 } 133 }
134 return m_fontData; 134 return m_fontData;
135 } 135 }
(...skipping 27 matching lines...) Expand all
163 163
164 void FontResource::checkNotify() 164 void FontResource::checkNotify()
165 { 165 {
166 m_fontLoadWaitLimitTimer.stop(); 166 m_fontLoadWaitLimitTimer.stop();
167 ResourceClientWalker<FontResourceClient> w(m_clients); 167 ResourceClientWalker<FontResourceClient> w(m_clients);
168 while (FontResourceClient* c = w.next()) 168 while (FontResourceClient* c = w.next())
169 c->fontLoaded(this); 169 c->fontLoaded(this);
170 } 170 }
171 171
172 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698