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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 } | 187 } |
188 | 188 |
189 void FontResource::allClientsRemoved() | 189 void FontResource::allClientsRemoved() |
190 { | 190 { |
191 m_fontData.clear(); | 191 m_fontData.clear(); |
192 Resource::allClientsRemoved(); | 192 Resource::allClientsRemoved(); |
193 } | 193 } |
194 | 194 |
195 void FontResource::checkNotify() | 195 void FontResource::checkNotify() |
196 { | 196 { |
197 // When checkNotify() is called while stillNeedsLoad() is true, for | |
198 // example when the FontResource is created by | |
Nate Chapin
2016/03/01 19:17:28
"for example" doesn't seem right here, as this sho
hiroshige
2016/03/01 22:11:51
Done.
| |
199 // ResourceFetcher::preCacheData(), we no longer need loading, so we set | |
Nate Chapin
2016/03/01 19:17:28
Update preCacheData() to the new name.
hiroshige
2016/03/01 22:11:51
Done.
| |
200 // |m_state| to |LoadInitiated| and make stillNeedsLoad() false here. | |
201 if (stillNeedsLoad()) | |
202 m_state = LoadInitiated; | |
Nate Chapin
2016/03/01 19:17:28
Doing this work here is kind of hacky. Is there an
hiroshige
2016/03/01 22:11:52
Not sure > anywhere else.
ksakamoto@, do you have
| |
203 | |
197 m_fontLoadShortLimitTimer.stop(); | 204 m_fontLoadShortLimitTimer.stop(); |
198 m_fontLoadLongLimitTimer.stop(); | 205 m_fontLoadLongLimitTimer.stop(); |
199 ResourceClientWalker<FontResourceClient> w(m_clients); | 206 ResourceClientWalker<FontResourceClient> w(m_clients); |
200 while (FontResourceClient* c = w.next()) | 207 while (FontResourceClient* c = w.next()) |
201 c->fontLoaded(this); | 208 c->fontLoaded(this); |
202 } | 209 } |
203 | 210 |
204 } // namespace blink | 211 } // namespace blink |
OLD | NEW |