OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d
ata, dataLength, encodedDataLength); | 1243 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d
ata, dataLength, encodedDataLength); |
1244 } | 1244 } |
1245 | 1245 |
1246 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength,
int encodedDataLength) | 1246 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength,
int encodedDataLength) |
1247 { | 1247 { |
1248 context().dispatchDidDownloadData(m_documentLoader, resource->identifier(),
dataLength, encodedDataLength); | 1248 context().dispatchDidDownloadData(m_documentLoader, resource->identifier(),
dataLength, encodedDataLength); |
1249 } | 1249 } |
1250 | 1250 |
1251 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo
ader) | 1251 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo
ader) |
1252 { | 1252 { |
1253 if (m_multipartLoaders) | 1253 if (!m_multipartLoaders) |
1254 m_multipartLoaders->add(loader); | 1254 m_multipartLoaders = adoptPtr(new ResourceLoaderSet()); |
1255 if (m_loaders) | 1255 m_multipartLoaders->add(loader); |
1256 m_loaders->remove(loader); | 1256 m_loaders->remove(loader); |
1257 if (LocalFrame* frame = this->frame()) | 1257 if (LocalFrame* frame = this->frame()) |
1258 return frame->loader().checkLoadComplete(m_documentLoader); | 1258 return frame->loader().checkLoadComplete(m_documentLoader); |
1259 } | 1259 } |
1260 | 1260 |
1261 void ResourceFetcher::didInitializeResourceLoader(ResourceLoader* loader) | 1261 void ResourceFetcher::didInitializeResourceLoader(ResourceLoader* loader) |
1262 { | 1262 { |
1263 if (!m_document) | 1263 if (!m_document) |
1264 return; | 1264 return; |
1265 if (!m_loaders) | 1265 if (!m_loaders) |
1266 m_loaders = adoptPtr(new ResourceLoaderSet()); | 1266 m_loaders = adoptPtr(new ResourceLoaderSet()); |
1267 ASSERT(!m_loaders->contains(loader)); | 1267 ASSERT(!m_loaders->contains(loader)); |
1268 m_loaders->add(loader); | 1268 m_loaders->add(loader); |
1269 } | 1269 } |
1270 | 1270 |
1271 void ResourceFetcher::willTerminateResourceLoader(ResourceLoader* loader) | 1271 void ResourceFetcher::willTerminateResourceLoader(ResourceLoader* loader) |
1272 { | 1272 { |
1273 if (!m_loaders || !m_loaders->contains(loader)) | 1273 if (m_loaders && m_loaders->contains(loader)) |
1274 return; | 1274 m_loaders->remove(loader); |
1275 m_loaders->remove(loader); | 1275 if (m_multipartLoaders && m_multipartLoaders->contains(loader)) |
| 1276 m_multipartLoaders->remove(loader); |
1276 if (LocalFrame* frame = this->frame()) | 1277 if (LocalFrame* frame = this->frame()) |
1277 frame->loader().checkLoadComplete(m_documentLoader); | 1278 frame->loader().checkLoadComplete(m_documentLoader); |
1278 } | 1279 } |
1279 | 1280 |
1280 void ResourceFetcher::willStartLoadingResource(ResourceRequest& request) | 1281 void ResourceFetcher::willStartLoadingResource(ResourceRequest& request) |
1281 { | 1282 { |
1282 if (m_documentLoader) | 1283 if (m_documentLoader) |
1283 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque
st); | 1284 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque
st); |
1284 } | 1285 } |
1285 | 1286 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 case Revalidate: | 1431 case Revalidate: |
1431 ++m_revalidateCount; | 1432 ++m_revalidateCount; |
1432 return; | 1433 return; |
1433 case Use: | 1434 case Use: |
1434 ++m_useCount; | 1435 ++m_useCount; |
1435 return; | 1436 return; |
1436 } | 1437 } |
1437 } | 1438 } |
1438 | 1439 |
1439 } | 1440 } |
OLD | NEW |