| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // DocumentWriter::begin() gets called and creates the Document. | 273 // DocumentWriter::begin() gets called and creates the Document. |
| 274 if (!m_writer) | 274 if (!m_writer) |
| 275 commitData(0, 0); | 275 commitData(0, 0); |
| 276 } | 276 } |
| 277 | 277 |
| 278 endWriting(m_writer.get()); | 278 endWriting(m_writer.get()); |
| 279 | 279 |
| 280 if (!m_mainDocumentError.isNull()) | 280 if (!m_mainDocumentError.isNull()) |
| 281 return; | 281 return; |
| 282 clearMainResourceLoader(); | 282 clearMainResourceLoader(); |
| 283 if (!frameLoader()->stateMachine()->creatingInitialEmptyDocument()) | |
| 284 frameLoader()->checkLoadComplete(); | |
| 285 | 283 |
| 286 // If the document specified an application cache manifest, it violates the
author's intent if we store it in the memory cache | 284 // If the document specified an application cache manifest, it violates the
author's intent if we store it in the memory cache |
| 287 // and deny the appcache the chance to intercept it in the future, so remove
from the memory cache. | 285 // and deny the appcache the chance to intercept it in the future, so remove
from the memory cache. |
| 288 if (m_frame) { | 286 if (m_frame) { |
| 289 if (m_mainResource && m_frame->document()->hasAppCacheManifest()) | 287 if (m_mainResource && m_frame->document()->hasAppCacheManifest()) |
| 290 memoryCache()->remove(m_mainResource.get()); | 288 memoryCache()->remove(m_mainResource.get()); |
| 291 } | 289 } |
| 292 m_applicationCacheHost->finishedLoadingMainResource(); | 290 m_applicationCacheHost->finishedLoadingMainResource(); |
| 293 clearMainResourceHandle(); | 291 clearMainResourceHandle(); |
| 294 } | 292 } |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 833 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 836 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 834 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 837 { | 835 { |
| 838 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 836 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 839 if (!source.isNull()) | 837 if (!source.isNull()) |
| 840 m_writer->appendReplacingData(source); | 838 m_writer->appendReplacingData(source); |
| 841 endWriting(m_writer.get()); | 839 endWriting(m_writer.get()); |
| 842 } | 840 } |
| 843 | 841 |
| 844 } // namespace blink | 842 } // namespace blink |
| OLD | NEW |