| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // If this is an empty document, it will not have actually been created
yet. Commit dummy data so that | 287 // If this is an empty document, it will not have actually been created
yet. Commit dummy data so that |
| 288 // DocumentWriter::begin() gets called and creates the Document. | 288 // DocumentWriter::begin() gets called and creates the Document. |
| 289 if (!m_writer) | 289 if (!m_writer) |
| 290 commitData(0, 0); | 290 commitData(0, 0); |
| 291 } | 291 } |
| 292 | 292 |
| 293 endWriting(m_writer.get()); | 293 endWriting(m_writer.get()); |
| 294 | 294 |
| 295 if (!m_mainDocumentError.isNull()) | 295 if (!m_mainDocumentError.isNull()) |
| 296 return; | 296 return; |
| 297 m_state = MainResourceDone; | 297 m_state = url() == blankURL() || (m_mainResource && !m_mainResource->encoded
Size()) ? MainResourceDoneButEmpty : MainResourceDone; |
| 298 | 298 |
| 299 // If the document specified an application cache manifest, it violates the
author's intent if we store it in the memory cache | 299 // If the document specified an application cache manifest, it violates the
author's intent if we store it in the memory cache |
| 300 // and deny the appcache the chance to intercept it in the future, so remove
from the memory cache. | 300 // and deny the appcache the chance to intercept it in the future, so remove
from the memory cache. |
| 301 if (m_frame) { | 301 if (m_frame) { |
| 302 if (m_mainResource && m_frame->document()->hasAppCacheManifest()) | 302 if (m_mainResource && m_frame->document()->hasAppCacheManifest()) |
| 303 memoryCache()->remove(m_mainResource.get()); | 303 memoryCache()->remove(m_mainResource.get()); |
| 304 } | 304 } |
| 305 m_applicationCacheHost->finishedLoadingMainResource(); | 305 m_applicationCacheHost->finishedLoadingMainResource(); |
| 306 clearMainResourceHandle(); | 306 clearMainResourceHandle(); |
| 307 } | 307 } |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 { | 869 { |
| 870 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 870 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 871 if (!source.isNull()) | 871 if (!source.isNull()) |
| 872 m_writer->appendReplacingData(source); | 872 m_writer->appendReplacingData(source); |
| 873 endWriting(m_writer.get()); | 873 endWriting(m_writer.get()); |
| 874 } | 874 } |
| 875 | 875 |
| 876 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 876 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 877 | 877 |
| 878 } // namespace blink | 878 } // namespace blink |
| OLD | NEW |