| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 Resource::didAddClient(c); | 71 Resource::didAddClient(c); |
| 72 if (!isLoading()) | 72 if (!isLoading()) |
| 73 static_cast<FontResourceClient*>(c)->fontLoaded(this); | 73 static_cast<FontResourceClient*>(c)->fontLoaded(this); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl) | 76 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl) |
| 77 { | 77 { |
| 78 if (!m_loadInitiated) { | 78 if (!m_loadInitiated) { |
| 79 m_loadInitiated = true; | 79 m_loadInitiated = true; |
| 80 Resource::load(dl, m_options); | 80 Resource::load(dl, m_options); |
| 81 m_fontLoadWaitLimitTimer.startOneShot(fontLoadWaitLimitSec); | 81 m_fontLoadWaitLimitTimer.startOneShot(fontLoadWaitLimitSec, FROM_HERE); |
| 82 | 82 |
| 83 ResourceClientWalker<FontResourceClient> walker(m_clients); | 83 ResourceClientWalker<FontResourceClient> walker(m_clients); |
| 84 while (FontResourceClient* client = walker.next()) | 84 while (FontResourceClient* client = walker.next()) |
| 85 client->didStartFontLoad(this); | 85 client->didStartFontLoad(this); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool FontResource::ensureCustomFontData() | 89 bool FontResource::ensureCustomFontData() |
| 90 { | 90 { |
| 91 if (!m_fontData && !errorOccurred() && !isLoading()) { | 91 if (!m_fontData && !errorOccurred() && !isLoading()) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 void FontResource::checkNotify() | 179 void FontResource::checkNotify() |
| 180 { | 180 { |
| 181 m_fontLoadWaitLimitTimer.stop(); | 181 m_fontLoadWaitLimitTimer.stop(); |
| 182 ResourceClientWalker<FontResourceClient> w(m_clients); | 182 ResourceClientWalker<FontResourceClient> w(m_clients); |
| 183 while (FontResourceClient* c = w.next()) | 183 while (FontResourceClient* c = w.next()) |
| 184 c->fontLoaded(this); | 184 c->fontLoaded(this); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } | 187 } |
| OLD | NEW |