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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 { | 106 { |
107 // Don't load the file yet. Wait for an access before triggering the load. | 107 // Don't load the file yet. Wait for an access before triggering the load. |
108 setLoading(true); | 108 setLoading(true); |
109 m_options = options; | 109 m_options = options; |
110 if (!m_revalidatingRequest.isNull()) | 110 if (!m_revalidatingRequest.isNull()) |
111 m_state = Unloaded; | 111 m_state = Unloaded; |
112 } | 112 } |
113 | 113 |
114 void FontResource::didAddClient(ResourceClient* c) | 114 void FontResource::didAddClient(ResourceClient* c) |
115 { | 115 { |
116 ASSERT(c->resourceClientType() == FontResourceClient::expectedType()); | 116 ASSERT(c->getResourceClientType() == FontResourceClient::expectedType()); |
117 Resource::didAddClient(c); | 117 Resource::didAddClient(c); |
118 if (!isLoading()) | 118 if (!isLoading()) |
119 static_cast<FontResourceClient*>(c)->fontLoaded(this); | 119 static_cast<FontResourceClient*>(c)->fontLoaded(this); |
120 if (m_state == ShortLimitExceeded || m_state == LongLimitExceeded) | 120 if (m_state == ShortLimitExceeded || m_state == LongLimitExceeded) |
121 static_cast<FontResourceClient*>(c)->fontLoadShortLimitExceeded(this); | 121 static_cast<FontResourceClient*>(c)->fontLoadShortLimitExceeded(this); |
122 if (m_state == LongLimitExceeded) | 122 if (m_state == LongLimitExceeded) |
123 static_cast<FontResourceClient*>(c)->fontLoadLongLimitExceeded(this); | 123 static_cast<FontResourceClient*>(c)->fontLoadLongLimitExceeded(this); |
124 } | 124 } |
125 | 125 |
126 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl) | 126 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl) |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |