| 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 23 matching lines...) Expand all Loading... |
| 34 #include <wtf/text/WTFString.h> | 34 #include <wtf/text/WTFString.h> |
| 35 #include <wtf/UnusedParam.h> | 35 #include <wtf/UnusedParam.h> |
| 36 #include "bindings/v8/ScriptController.h" | 36 #include "bindings/v8/ScriptController.h" |
| 37 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
| 38 #include "core/html/HTMLElement.h" | 38 #include "core/html/HTMLElement.h" |
| 39 #include "core/html/HTMLFrameOwnerElement.h" | 39 #include "core/html/HTMLFrameOwnerElement.h" |
| 40 #include "core/loader/DocumentLoader.h" | 40 #include "core/loader/DocumentLoader.h" |
| 41 #include "core/loader/FrameLoader.h" | 41 #include "core/loader/FrameLoader.h" |
| 42 #include "core/loader/FrameLoaderClient.h" | 42 #include "core/loader/FrameLoaderClient.h" |
| 43 #include "core/loader/PingLoader.h" | 43 #include "core/loader/PingLoader.h" |
| 44 #include "core/loader/appcache/ApplicationCacheHost.h" |
| 44 #include "core/loader/cache/CachedCSSStyleSheet.h" | 45 #include "core/loader/cache/CachedCSSStyleSheet.h" |
| 45 #include "core/loader/cache/CachedDocument.h" | 46 #include "core/loader/cache/CachedDocument.h" |
| 46 #include "core/loader/cache/CachedFont.h" | 47 #include "core/loader/cache/CachedFont.h" |
| 47 #include "core/loader/cache/CachedImage.h" | 48 #include "core/loader/cache/CachedImage.h" |
| 48 #include "core/loader/cache/CachedRawResource.h" | 49 #include "core/loader/cache/CachedRawResource.h" |
| 49 #include "core/loader/cache/CachedResourceRequest.h" | 50 #include "core/loader/cache/CachedResourceRequest.h" |
| 50 #include "core/loader/cache/CachedScript.h" | 51 #include "core/loader/cache/CachedScript.h" |
| 51 #include "core/loader/cache/CachedShader.h" | 52 #include "core/loader/cache/CachedShader.h" |
| 52 #include "core/loader/cache/CachedXSLStyleSheet.h" | 53 #include "core/loader/cache/CachedXSLStyleSheet.h" |
| 53 #include "core/loader/cache/MemoryCache.h" | 54 #include "core/loader/cache/MemoryCache.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 resource->setLoadPriority(request.priority()); | 393 resource->setLoadPriority(request.priority()); |
| 393 | 394 |
| 394 if ((policy != Use || resource->stillNeedsLoad()) && CachedResourceRequest::
NoDefer == request.defer()) { | 395 if ((policy != Use || resource->stillNeedsLoad()) && CachedResourceRequest::
NoDefer == request.defer()) { |
| 395 if (!frame()) | 396 if (!frame()) |
| 396 return 0; | 397 return 0; |
| 397 | 398 |
| 398 FrameLoader* frameLoader = frame()->loader(); | 399 FrameLoader* frameLoader = frame()->loader(); |
| 399 if (request.options().securityCheck == DoSecurityCheck && (frameLoader->
state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || fram
eLoader->activeDocumentLoader()->isStopping())) | 400 if (request.options().securityCheck == DoSecurityCheck && (frameLoader->
state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || fram
eLoader->activeDocumentLoader()->isStopping())) |
| 400 return 0; | 401 return 0; |
| 401 | 402 |
| 402 resource->load(this, request.options()); | 403 if (!m_documentLoader->scheduleArchiveLoad(resource.get(), request.resou
rceRequest())) { |
| 404 m_documentLoader->applicationCacheHost()->willStartLoadingResource(r
equest.mutableResourceRequest()); |
| 405 resource->load(this, request.options()); |
| 406 } |
| 403 | 407 |
| 404 // We don't support immediate loads, but we do support immediate failure
. | 408 // We don't support immediate loads, but we do support immediate failure
. |
| 405 if (resource->errorOccurred()) { | 409 if (resource->errorOccurred()) { |
| 406 if (resource->inCache()) | 410 if (resource->inCache()) |
| 407 memoryCache()->remove(resource.get()); | 411 memoryCache()->remove(resource.get()); |
| 408 return 0; | 412 return 0; |
| 409 } | 413 } |
| 410 } | 414 } |
| 411 | 415 |
| 412 // FIXME: Temporarily leave main resource caching disabled for chromium, see
https://bugs.webkit.org/show_bug.cgi?id=107962 | 416 // FIXME: Temporarily leave main resource caching disabled for chromium, see
https://bugs.webkit.org/show_bug.cgi?id=107962 |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 info.addMember(m_garbageCollectDocumentResourcesTimer, "garbageCollectDocume
ntResourcesTimer"); | 979 info.addMember(m_garbageCollectDocumentResourcesTimer, "garbageCollectDocume
ntResourcesTimer"); |
| 976 } | 980 } |
| 977 | 981 |
| 978 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) | 982 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) |
| 979 { | 983 { |
| 980 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCre
dentials, DoSecurityCheck, CheckContentSecurityPolicy); | 984 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCre
dentials, DoSecurityCheck, CheckContentSecurityPolicy); |
| 981 return options; | 985 return options; |
| 982 } | 986 } |
| 983 | 987 |
| 984 } | 988 } |
| OLD | NEW |