Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: third_party/WebKit/Source/core/fetch/FontResource.cpp

Issue 1410313002: Revert of Revalidate using the same Resource, attempt #3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
109 } 107 }
110 108
111 void FontResource::didAddClient(ResourceClient* c) 109 void FontResource::didAddClient(ResourceClient* c)
112 { 110 {
113 ASSERT(c->resourceClientType() == FontResourceClient::expectedType()); 111 ASSERT(c->resourceClientType() == FontResourceClient::expectedType());
114 Resource::didAddClient(c); 112 Resource::didAddClient(c);
115 if (!isLoading()) 113 if (!isLoading())
116 static_cast<FontResourceClient*>(c)->fontLoaded(this); 114 static_cast<FontResourceClient*>(c)->fontLoaded(this);
117 } 115 }
118 116
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 172
175 void FontResource::checkNotify() 173 void FontResource::checkNotify()
176 { 174 {
177 m_fontLoadWaitLimitTimer.stop(); 175 m_fontLoadWaitLimitTimer.stop();
178 ResourceClientWalker<FontResourceClient> w(m_clients); 176 ResourceClientWalker<FontResourceClient> w(m_clients);
179 while (FontResourceClient* c = w.next()) 177 while (FontResourceClient* c = w.next())
180 c->fontLoaded(this); 178 c->fontLoaded(this);
181 } 179 }
182 180
183 } 181 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698