| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 { | 97 { |
| 98 if (m_state == LoadScheduled) | 98 if (m_state == LoadScheduled) |
| 99 m_state = Unloaded; | 99 m_state = Unloaded; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void FontResource::load(ResourceFetcher*, const ResourceLoaderOptions& options) | 102 void FontResource::load(ResourceFetcher*, const ResourceLoaderOptions& options) |
| 103 { | 103 { |
| 104 // Don't load the file yet. Wait for an access before triggering the load. | 104 // Don't load the file yet. Wait for an access before triggering the load. |
| 105 setLoading(true); | 105 setLoading(true); |
| 106 m_options = options; | 106 m_options = options; |
| 107 if (!m_revalidatingRequest.isNull()) |
| 108 m_state = Unloaded; |
| 107 } | 109 } |
| 108 | 110 |
| 109 void FontResource::didAddClient(ResourceClient* c) | 111 void FontResource::didAddClient(ResourceClient* c) |
| 110 { | 112 { |
| 111 ASSERT(c->resourceClientType() == FontResourceClient::expectedType()); | 113 ASSERT(c->resourceClientType() == FontResourceClient::expectedType()); |
| 112 Resource::didAddClient(c); | 114 Resource::didAddClient(c); |
| 113 if (!isLoading()) | 115 if (!isLoading()) |
| 114 static_cast<FontResourceClient*>(c)->fontLoaded(this); | 116 static_cast<FontResourceClient*>(c)->fontLoaded(this); |
| 115 } | 117 } |
| 116 | 118 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 174 |
| 173 void FontResource::checkNotify() | 175 void FontResource::checkNotify() |
| 174 { | 176 { |
| 175 m_fontLoadWaitLimitTimer.stop(); | 177 m_fontLoadWaitLimitTimer.stop(); |
| 176 ResourceClientWalker<FontResourceClient> w(m_clients); | 178 ResourceClientWalker<FontResourceClient> w(m_clients); |
| 177 while (FontResourceClient* c = w.next()) | 179 while (FontResourceClient* c = w.next()) |
| 178 c->fontLoaded(this); | 180 c->fontLoaded(this); |
| 179 } | 181 } |
| 180 | 182 |
| 181 } | 183 } |
| OLD | NEW |