| 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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 { | 934 { |
| 935 return m_loaders ? m_loaders->size() : 0; | 935 return m_loaders ? m_loaders->size() : 0; |
| 936 } | 936 } |
| 937 | 937 |
| 938 void ResourceFetcher::preload(Resource::Type type, FetchRequest& request, const
String& charset) | 938 void ResourceFetcher::preload(Resource::Type type, FetchRequest& request, const
String& charset) |
| 939 { | 939 { |
| 940 // Ensure main resources aren't preloaded, since the cache can't actually re
use the preload. | 940 // Ensure main resources aren't preloaded, since the cache can't actually re
use the preload. |
| 941 if (type == Resource::MainResource) | 941 if (type == Resource::MainResource) |
| 942 return; | 942 return; |
| 943 | 943 |
| 944 ASSERT(type == Resource::Script || type == Resource::CSSStyleSheet || type =
= Resource::Image); | 944 ASSERT(type == Resource::Script || type == Resource::CSSStyleSheet || type =
= Resource::Image || type == Resource::ImportResource); |
| 945 | 945 |
| 946 String encoding; | 946 String encoding; |
| 947 if (type == Resource::Script || type == Resource::CSSStyleSheet) { | 947 if (type == Resource::Script || type == Resource::CSSStyleSheet || type == R
esource::ImportResource) { |
| 948 encoding = charset.isEmpty() ? context().charset() : charset; | 948 encoding = charset.isEmpty() ? context().charset() : charset; |
| 949 | 949 |
| 950 // RequestContext for Resource::Image is set in fetchImage below. | 950 // RequestContext for Resource::Image is set in fetchImage below. |
| 951 determineRequestContext(request.mutableResourceRequest(), type); | 951 determineRequestContext(request.mutableResourceRequest(), type); |
| 952 } | 952 } |
| 953 | 953 |
| 954 request.setCharset(encoding); | 954 request.setCharset(encoding); |
| 955 request.setForPreload(true); | 955 request.setForPreload(true); |
| 956 | 956 |
| 957 ResourcePtr<Resource> resource; | 957 ResourcePtr<Resource> resource; |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 | 1291 |
| 1292 DEFINE_TRACE(ResourceFetcher) | 1292 DEFINE_TRACE(ResourceFetcher) |
| 1293 { | 1293 { |
| 1294 visitor->trace(m_context); | 1294 visitor->trace(m_context); |
| 1295 visitor->trace(m_archiveResourceCollection); | 1295 visitor->trace(m_archiveResourceCollection); |
| 1296 visitor->trace(m_loaders); | 1296 visitor->trace(m_loaders); |
| 1297 visitor->trace(m_nonBlockingLoaders); | 1297 visitor->trace(m_nonBlockingLoaders); |
| 1298 } | 1298 } |
| 1299 | 1299 |
| 1300 } | 1300 } |
| OLD | NEW |