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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if (!frameLoader()) | 298 if (!frameLoader()) |
299 return; | 299 return; |
300 | 300 |
301 if (!maybeCreateArchive()) { | 301 if (!maybeCreateArchive()) { |
302 // If this is an empty document, it will not have actually been created
yet. Commit dummy data so that | 302 // If this is an empty document, it will not have actually been created
yet. Commit dummy data so that |
303 // DocumentWriter::begin() gets called and creates the Document. | 303 // DocumentWriter::begin() gets called and creates the Document. |
304 if (!m_writer) | 304 if (!m_writer) |
305 commitData(0, 0); | 305 commitData(0, 0); |
306 } | 306 } |
307 | 307 |
| 308 if (!m_frame) |
| 309 return; |
| 310 |
308 m_applicationCacheHost->finishedLoadingMainResource(); | 311 m_applicationCacheHost->finishedLoadingMainResource(); |
309 endWriting(m_writer.get()); | 312 endWriting(m_writer.get()); |
310 if (m_state < MainResourceDone) | 313 if (m_state < MainResourceDone) |
311 m_state = MainResourceDone; | 314 m_state = MainResourceDone; |
312 clearMainResourceHandle(); | 315 clearMainResourceHandle(); |
313 } | 316 } |
314 | 317 |
315 void DocumentLoader::updateRequest(Resource* resource, const ResourceRequest& re
quest) | 318 void DocumentLoader::updateRequest(Resource* resource, const ResourceRequest& re
quest) |
316 { | 319 { |
317 ASSERT_UNUSED(resource, resource == m_mainResource); | 320 ASSERT_UNUSED(resource, resource == m_mainResource); |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 { | 768 { |
766 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 769 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
767 if (!source.isNull()) | 770 if (!source.isNull()) |
768 m_writer->appendReplacingData(source); | 771 m_writer->appendReplacingData(source); |
769 endWriting(m_writer.get()); | 772 endWriting(m_writer.get()); |
770 } | 773 } |
771 | 774 |
772 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 775 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
773 | 776 |
774 } // namespace blink | 777 } // namespace blink |
OLD | NEW |