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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 Resource::didAddClient(c); | 112 Resource::didAddClient(c); |
113 if (!isLoading()) | 113 if (!isLoading()) |
114 static_cast<FontResourceClient*>(c)->fontLoaded(this); | 114 static_cast<FontResourceClient*>(c)->fontLoaded(this); |
115 } | 115 } |
116 | 116 |
117 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl) | 117 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl) |
118 { | 118 { |
119 if (m_state != LoadInitiated) { | 119 if (m_state != LoadInitiated) { |
120 m_state = LoadInitiated; | 120 m_state = LoadInitiated; |
121 Resource::load(dl, m_options); | 121 Resource::load(dl, m_options); |
122 m_fontLoadWaitLimitTimer.startOneShot(fontLoadWaitLimitSec, FROM_HERE); | 122 m_fontLoadWaitLimitTimer.startOneShot(fontLoadWaitLimitSec, BLINK_FROM_H
ERE); |
123 | 123 |
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()) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |