OLD | NEW |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 { | 179 { |
180 if (!isLoading()) | 180 if (!isLoading()) |
181 return; | 181 return; |
182 ASSERT(m_state == ShortLimitExceeded); | 182 ASSERT(m_state == ShortLimitExceeded); |
183 m_state = LongLimitExceeded; | 183 m_state = LongLimitExceeded; |
184 ResourceClientWalker<FontResourceClient> walker(m_clients); | 184 ResourceClientWalker<FontResourceClient> walker(m_clients); |
185 while (FontResourceClient* client = walker.next()) | 185 while (FontResourceClient* client = walker.next()) |
186 client->fontLoadLongLimitExceeded(this); | 186 client->fontLoadLongLimitExceeded(this); |
187 } | 187 } |
188 | 188 |
189 void FontResource::allClientsRemoved() | 189 void FontResource::allClientsAndObserversRemoved() |
190 { | 190 { |
191 m_fontData.clear(); | 191 m_fontData.clear(); |
192 Resource::allClientsRemoved(); | 192 Resource::allClientsAndObserversRemoved(); |
193 } | 193 } |
194 | 194 |
195 void FontResource::checkNotify() | 195 void FontResource::checkNotify() |
196 { | 196 { |
197 m_fontLoadShortLimitTimer.stop(); | 197 m_fontLoadShortLimitTimer.stop(); |
198 m_fontLoadLongLimitTimer.stop(); | 198 m_fontLoadLongLimitTimer.stop(); |
199 ResourceClientWalker<FontResourceClient> w(m_clients); | 199 ResourceClientWalker<FontResourceClient> w(m_clients); |
200 while (FontResourceClient* c = w.next()) | 200 while (FontResourceClient* c = w.next()) |
201 c->fontLoaded(this); | 201 c->fontLoaded(this); |
202 } | 202 } |
203 | 203 |
204 } // namespace blink | 204 } // namespace blink |
OLD | NEW |