OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 3184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3195 | 3195 |
3196 FrameLoadType FrameLoader::loadType() const | 3196 FrameLoadType FrameLoader::loadType() const |
3197 { | 3197 { |
3198 return m_loadType; | 3198 return m_loadType; |
3199 } | 3199 } |
3200 | 3200 |
3201 CachePolicy FrameLoader::cachePolicy() const | 3201 CachePolicy FrameLoader::cachePolicy() const |
3202 { | 3202 { |
3203 if (m_isComplete) | 3203 if (m_isComplete) |
3204 return CachePolicyVerify; | 3204 return CachePolicyVerify; |
3205 | 3205 |
| 3206 // FIXME: This will return CachePolicyReload for any subresource of a docume
nt resulting from a POST request, |
| 3207 // making WebCore cache malfunction for such documents (see DocLoader::check
ForReload()). |
3206 if (m_loadType == FrameLoadTypeReloadFromOrigin || documentLoader()->request
().cachePolicy() == ReloadIgnoringCacheData) | 3208 if (m_loadType == FrameLoadTypeReloadFromOrigin || documentLoader()->request
().cachePolicy() == ReloadIgnoringCacheData) |
3207 return CachePolicyReload; | 3209 return CachePolicyReload; |
3208 | 3210 |
3209 if (Frame* parentFrame = m_frame->tree()->parent()) { | 3211 if (Frame* parentFrame = m_frame->tree()->parent()) { |
3210 CachePolicy parentCachePolicy = parentFrame->loader()->cachePolicy(); | 3212 CachePolicy parentCachePolicy = parentFrame->loader()->cachePolicy(); |
3211 if (parentCachePolicy != CachePolicyVerify) | 3213 if (parentCachePolicy != CachePolicyVerify) |
3212 return parentCachePolicy; | 3214 return parentCachePolicy; |
3213 } | 3215 } |
3214 | 3216 |
3215 if (m_loadType == FrameLoadTypeReload) | 3217 if (m_loadType == FrameLoadTypeReload) |
3216 return CachePolicyRevalidate; | 3218 return CachePolicyRevalidate; |
3217 | 3219 |
3218 return CachePolicyVerify; | 3220 return CachePolicyVerify; |
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5271 m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(),
request, resource->response(), resource->encodedSize()); | 5273 m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(),
request, resource->response(), resource->encodedSize()); |
5272 } | 5274 } |
5273 } | 5275 } |
5274 | 5276 |
5275 bool FrameLoaderClient::hasHTMLView() const | 5277 bool FrameLoaderClient::hasHTMLView() const |
5276 { | 5278 { |
5277 return true; | 5279 return true; |
5278 } | 5280 } |
5279 | 5281 |
5280 } // namespace WebCore | 5282 } // namespace WebCore |
OLD | NEW |