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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 if (!m_mainDocumentError.isNull()) | 269 if (!m_mainDocumentError.isNull()) |
270 return; | 270 return; |
271 clearMainResourceLoader(); | 271 clearMainResourceLoader(); |
272 if (!frameLoader()->stateMachine()->creatingInitialEmptyDocument()) | 272 if (!frameLoader()->stateMachine()->creatingInitialEmptyDocument()) |
273 frameLoader()->checkLoadComplete(); | 273 frameLoader()->checkLoadComplete(); |
274 | 274 |
275 // If the document specified an application cache manifest, it violates the
author's intent if we store it in the memory cache | 275 // If the document specified an application cache manifest, it violates the
author's intent if we store it in the memory cache |
276 // and deny the appcache the chance to intercept it in the future, so remove
from the memory cache. | 276 // and deny the appcache the chance to intercept it in the future, so remove
from the memory cache. |
277 if (m_frame) { | 277 if (m_frame) { |
278 if (m_mainResource && m_frame->document()->hasManifest()) | 278 if (m_mainResource && m_frame->document()->hasAppCacheManifest()) |
279 memoryCache()->remove(m_mainResource.get()); | 279 memoryCache()->remove(m_mainResource.get()); |
280 } | 280 } |
281 m_applicationCacheHost->finishedLoadingMainResource(); | 281 m_applicationCacheHost->finishedLoadingMainResource(); |
282 clearMainResourceHandle(); | 282 clearMainResourceHandle(); |
283 } | 283 } |
284 | 284 |
285 bool DocumentLoader::isRedirectAfterPost(const ResourceRequest& newRequest, cons
t ResourceResponse& redirectResponse) | 285 bool DocumentLoader::isRedirectAfterPost(const ResourceRequest& newRequest, cons
t ResourceResponse& redirectResponse) |
286 { | 286 { |
287 int status = redirectResponse.httpStatusCode(); | 287 int status = redirectResponse.httpStatusCode(); |
288 if (((status >= 301 && status <= 303) || status == 307) | 288 if (((status >= 301 && status <= 303) || status == 307) |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 822 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
823 { | 823 { |
824 m_frame->loader().stopAllLoaders(); | 824 m_frame->loader().stopAllLoaders(); |
825 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); | 825 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); |
826 if (!source.isNull()) | 826 if (!source.isNull()) |
827 m_writer->appendReplacingData(source); | 827 m_writer->appendReplacingData(source); |
828 endWriting(m_writer.get()); | 828 endWriting(m_writer.get()); |
829 } | 829 } |
830 | 830 |
831 } // namespace WebCore | 831 } // namespace WebCore |
OLD | NEW |