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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestUserCSSSt
yleSheet(CachedResourceRequest& request) | 179 CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestUserCSSSt
yleSheet(CachedResourceRequest& request) |
180 { | 180 { |
181 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(request.resourceReq
uest().url()); | 181 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(request.resourceReq
uest().url()); |
182 | 182 |
183 if (CachedResource* existing = memoryCache()->resourceForURL(url)) { | 183 if (CachedResource* existing = memoryCache()->resourceForURL(url)) { |
184 if (existing->type() == CachedResource::CSSStyleSheet) | 184 if (existing->type() == CachedResource::CSSStyleSheet) |
185 return static_cast<CachedCSSStyleSheet*>(existing); | 185 return static_cast<CachedCSSStyleSheet*>(existing); |
186 memoryCache()->remove(existing); | 186 memoryCache()->remove(existing); |
187 } | 187 } |
188 | 188 |
189 request.setOptions(ResourceLoaderOptions(DoNotSendCallbacks, SniffContent, B
ufferData, AllowStoredCredentials, AskClientForCrossOriginCredentials, SkipSecur
ityCheck)); | 189 request.setOptions(ResourceLoaderOptions(DoNotSendCallbacks, SniffContent, B
ufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCross
OriginCredentials, SkipSecurityCheck)); |
190 return static_cast<CachedCSSStyleSheet*>(requestResource(CachedResource::CSS
StyleSheet, request).get()); | 190 return static_cast<CachedCSSStyleSheet*>(requestResource(CachedResource::CSS
StyleSheet, request).get()); |
191 } | 191 } |
192 | 192 |
193 CachedResourceHandle<CachedScript> CachedResourceLoader::requestScript(CachedRes
ourceRequest& request) | 193 CachedResourceHandle<CachedScript> CachedResourceLoader::requestScript(CachedRes
ourceRequest& request) |
194 { | 194 { |
195 return static_cast<CachedScript*>(requestResource(CachedResource::Script, re
quest).get()); | 195 return static_cast<CachedScript*>(requestResource(CachedResource::Script, re
quest).get()); |
196 } | 196 } |
197 | 197 |
198 CachedResourceHandle<CachedXSLStyleSheet> CachedResourceLoader::requestXSLStyleS
heet(CachedResourceRequest& request) | 198 CachedResourceHandle<CachedXSLStyleSheet> CachedResourceLoader::requestXSLStyleS
heet(CachedResourceRequest& request) |
199 { | 199 { |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 info.addMember(m_validatedURLs, "validatedURLs"); | 1035 info.addMember(m_validatedURLs, "validatedURLs"); |
1036 info.addMember(m_preloads, "preloads"); | 1036 info.addMember(m_preloads, "preloads"); |
1037 info.addMember(m_pendingPreloads, "pendingPreloads"); | 1037 info.addMember(m_pendingPreloads, "pendingPreloads"); |
1038 info.addMember(m_garbageCollectDocumentResourcesTimer, "garbageCollectDocume
ntResourcesTimer"); | 1038 info.addMember(m_garbageCollectDocumentResourcesTimer, "garbageCollectDocume
ntResourcesTimer"); |
1039 // FIXME: m_initiatorMap has pointers to already deleted CachedResources | 1039 // FIXME: m_initiatorMap has pointers to already deleted CachedResources |
1040 info.ignoreMember(m_initiatorMap); | 1040 info.ignoreMember(m_initiatorMap); |
1041 } | 1041 } |
1042 | 1042 |
1043 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) | 1043 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) |
1044 { | 1044 { |
1045 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); | 1045 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCre
dentials, DoSecurityCheck); |
1046 return options; | 1046 return options; |
1047 } | 1047 } |
1048 | 1048 |
1049 } | 1049 } |
OLD | NEW |