OLD | NEW |
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) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "core/loader/FormState.h" | 49 #include "core/loader/FormState.h" |
50 #include "core/loader/FrameLoader.h" | 50 #include "core/loader/FrameLoader.h" |
51 #include "core/loader/FrameLoaderClient.h" | 51 #include "core/loader/FrameLoaderClient.h" |
52 #include "core/loader/ResourceLoader.h" | 52 #include "core/loader/ResourceLoader.h" |
53 #include "core/loader/TextResourceDecoder.h" | 53 #include "core/loader/TextResourceDecoder.h" |
54 #include "core/loader/UniqueIdentifier.h" | 54 #include "core/loader/UniqueIdentifier.h" |
55 #include "core/loader/appcache/ApplicationCacheHost.h" | 55 #include "core/loader/appcache/ApplicationCacheHost.h" |
56 #include "core/loader/archive/ArchiveResourceCollection.h" | 56 #include "core/loader/archive/ArchiveResourceCollection.h" |
57 #include "core/loader/archive/MHTMLArchive.h" | 57 #include "core/loader/archive/MHTMLArchive.h" |
58 #include "core/loader/cache/CachedResourceLoader.h" | 58 #include "core/loader/cache/CachedResourceLoader.h" |
| 59 #include "core/loader/cache/CachedResourceRequestInitiators.h" |
59 #include "core/loader/cache/MemoryCache.h" | 60 #include "core/loader/cache/MemoryCache.h" |
60 #include "core/page/DOMWindow.h" | 61 #include "core/page/DOMWindow.h" |
61 #include "core/page/Frame.h" | 62 #include "core/page/Frame.h" |
62 #include "core/page/FrameTree.h" | 63 #include "core/page/FrameTree.h" |
63 #include "core/page/Page.h" | 64 #include "core/page/Page.h" |
64 #include "core/page/Settings.h" | 65 #include "core/page/Settings.h" |
65 #include "core/platform/Logging.h" | 66 #include "core/platform/Logging.h" |
66 #include "weborigin/SchemeRegistry.h" | 67 #include "weborigin/SchemeRegistry.h" |
67 #include "weborigin/SecurityPolicy.h" | 68 #include "weborigin/SecurityPolicy.h" |
68 | 69 |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 if (m_substituteData.isValid()) { | 1073 if (m_substituteData.isValid()) { |
1073 m_identifierForLoadWithoutResourceLoader = createUniqueIdentifier(); | 1074 m_identifierForLoadWithoutResourceLoader = createUniqueIdentifier(); |
1074 frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierFor
LoadWithoutResourceLoader, m_request, ResourceResponse()); | 1075 frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierFor
LoadWithoutResourceLoader, m_request, ResourceResponse()); |
1075 handleSubstituteDataLoadSoon(); | 1076 handleSubstituteDataLoadSoon(); |
1076 return; | 1077 return; |
1077 } | 1078 } |
1078 | 1079 |
1079 ResourceRequest request(m_request); | 1080 ResourceRequest request(m_request); |
1080 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, | 1081 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, |
1081 (SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, Client
RequestedCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck, Che
ckContentSecurityPolicy)); | 1082 (SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, Client
RequestedCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck, Che
ckContentSecurityPolicy)); |
1082 CachedResourceRequest cachedResourceRequest(request, mainResourceLoadOptions
); | 1083 CachedResourceRequest cachedResourceRequest(request, cachedResourceRequestIn
itiators().document, mainResourceLoadOptions); |
1083 m_mainResource = m_cachedResourceLoader->requestMainResource(cachedResourceR
equest); | 1084 m_mainResource = m_cachedResourceLoader->requestMainResource(cachedResourceR
equest); |
1084 if (!m_mainResource) { | 1085 if (!m_mainResource) { |
1085 setRequest(ResourceRequest()); | 1086 setRequest(ResourceRequest()); |
1086 // If the load was aborted by clearing m_request, it's possible the Appl
icationCacheHost | 1087 // If the load was aborted by clearing m_request, it's possible the Appl
icationCacheHost |
1087 // is now in a state where starting an empty load will be inconsistent.
Replace it with | 1088 // is now in a state where starting an empty load will be inconsistent.
Replace it with |
1088 // a new ApplicationCacheHost. | 1089 // a new ApplicationCacheHost. |
1089 m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this)); | 1090 m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this)); |
1090 maybeLoadEmpty(); | 1091 maybeLoadEmpty(); |
1091 return; | 1092 return; |
1092 } | 1093 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 commitLoad(resourceData->data(), resourceData->size()); | 1140 commitLoad(resourceData->data(), resourceData->size()); |
1140 } | 1141 } |
1141 | 1142 |
1142 void DocumentLoader::handledOnloadEvents() | 1143 void DocumentLoader::handledOnloadEvents() |
1143 { | 1144 { |
1144 m_wasOnloadHandled = true; | 1145 m_wasOnloadHandled = true; |
1145 applicationCacheHost()->stopDeferringEvents(); | 1146 applicationCacheHost()->stopDeferringEvents(); |
1146 } | 1147 } |
1147 | 1148 |
1148 } // namespace WebCore | 1149 } // namespace WebCore |
OLD | NEW |