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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 void DocumentLoader::detachFromFrame() | 694 void DocumentLoader::detachFromFrame() |
695 { | 695 { |
696 ASSERT(m_frame); | 696 ASSERT(m_frame); |
697 RefPtr<Frame> protectFrame(m_frame); | 697 RefPtr<Frame> protectFrame(m_frame); |
698 RefPtr<DocumentLoader> protectLoader(this); | 698 RefPtr<DocumentLoader> protectLoader(this); |
699 | 699 |
700 // It never makes sense to have a document loader that is detached from its | 700 // It never makes sense to have a document loader that is detached from its |
701 // frame have any loads active, so go ahead and kill all the loads. | 701 // frame have any loads active, so go ahead and kill all the loads. |
702 stopLoading(); | 702 stopLoading(); |
703 | 703 |
704 m_applicationCacheHost->setDOMApplicationCache(0); | 704 m_applicationCacheHost->setApplicationCache(0); |
705 InspectorInstrumentation::loaderDetachedFromFrame(m_frame, this); | 705 InspectorInstrumentation::loaderDetachedFromFrame(m_frame, this); |
706 m_frame = 0; | 706 m_frame = 0; |
707 } | 707 } |
708 | 708 |
709 void DocumentLoader::clearMainResourceLoader() | 709 void DocumentLoader::clearMainResourceLoader() |
710 { | 710 { |
711 m_loadingMainResource = false; | 711 m_loadingMainResource = false; |
712 if (this == frameLoader()->activeDocumentLoader()) | 712 if (this == frameLoader()->activeDocumentLoader()) |
713 checkLoadComplete(); | 713 checkLoadComplete(); |
714 } | 714 } |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 1032 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
1033 { | 1033 { |
1034 m_frame->loader()->stopAllLoaders(); | 1034 m_frame->loader()->stopAllLoaders(); |
1035 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); | 1035 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); |
1036 if (!source.isNull()) | 1036 if (!source.isNull()) |
1037 m_writer->appendReplacingData(source); | 1037 m_writer->appendReplacingData(source); |
1038 endWriting(m_writer.get()); | 1038 endWriting(m_writer.get()); |
1039 } | 1039 } |
1040 | 1040 |
1041 } // namespace WebCore | 1041 } // namespace WebCore |
OLD | NEW |