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

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: Rebase patch Created 5 years, 6 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
« no previous file with comments | « Source/core/fetch/FontResource.h ('k') | Source/platform/fonts/FontCustomPlatformData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ResourceClientWalker<FontResourceClient> walker(m_clients); 124 ResourceClientWalker<FontResourceClient> walker(m_clients);
125 while (FontResourceClient* client = walker.next()) 125 while (FontResourceClient* client = walker.next())
126 client->didStartFontLoad(this); 126 client->didStartFontLoad(this);
127 } 127 }
128 } 128 }
129 129
130 bool FontResource::ensureCustomFontData() 130 bool FontResource::ensureCustomFontData()
131 { 131 {
132 if (!m_fontData && !errorOccurred() && !isLoading()) { 132 if (!m_fontData && !errorOccurred() && !isLoading()) {
133 if (m_data) 133 if (m_data)
134 m_fontData = FontCustomPlatformData::create(m_data.get()); 134 m_fontData = FontCustomPlatformData::create(m_data.get(), m_otsParsi ngMessage);
135 135
136 if (m_fontData) { 136 if (m_fontData) {
137 recordPackageFormatHistogram(packageFormatOf(m_data.get())); 137 recordPackageFormatHistogram(packageFormatOf(m_data.get()));
138 } else { 138 } else {
139 setStatus(DecodeError); 139 setStatus(DecodeError);
140 recordPackageFormatHistogram(PackageFormatUnknown); 140 recordPackageFormatHistogram(PackageFormatUnknown);
141 } 141 }
142 } 142 }
143 return m_fontData; 143 return m_fontData;
144 } 144 }
(...skipping 27 matching lines...) Expand all
172 172
173 void FontResource::checkNotify() 173 void FontResource::checkNotify()
174 { 174 {
175 m_fontLoadWaitLimitTimer.stop(); 175 m_fontLoadWaitLimitTimer.stop();
176 ResourceClientWalker<FontResourceClient> w(m_clients); 176 ResourceClientWalker<FontResourceClient> w(m_clients);
177 while (FontResourceClient* c = w.next()) 177 while (FontResourceClient* c = w.next())
178 c->fontLoaded(this); 178 c->fontLoaded(this);
179 } 179 }
180 180
181 } 181 }
OLDNEW
« no previous file with comments | « Source/core/fetch/FontResource.h ('k') | Source/platform/fonts/FontCustomPlatformData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698