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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 void DocumentLoader::detachFromFrame() | 677 void DocumentLoader::detachFromFrame() |
678 { | 678 { |
679 ASSERT(m_frame); | 679 ASSERT(m_frame); |
680 RefPtr<Frame> protectFrame(m_frame); | 680 RefPtr<Frame> protectFrame(m_frame); |
681 RefPtr<DocumentLoader> protectLoader(this); | 681 RefPtr<DocumentLoader> protectLoader(this); |
682 | 682 |
683 // It never makes sense to have a document loader that is detached from its | 683 // It never makes sense to have a document loader that is detached from its |
684 // frame have any loads active, so go ahead and kill all the loads. | 684 // frame have any loads active, so go ahead and kill all the loads. |
685 stopLoading(); | 685 stopLoading(); |
686 | 686 |
687 m_applicationCacheHost->setDOMApplicationCache(0); | 687 m_applicationCacheHost->setApplicationCache(0); |
688 InspectorInstrumentation::loaderDetachedFromFrame(m_frame, this); | 688 InspectorInstrumentation::loaderDetachedFromFrame(m_frame, this); |
689 m_frame = 0; | 689 m_frame = 0; |
690 } | 690 } |
691 | 691 |
692 void DocumentLoader::clearMainResourceLoader() | 692 void DocumentLoader::clearMainResourceLoader() |
693 { | 693 { |
694 m_loadingMainResource = false; | 694 m_loadingMainResource = false; |
695 if (this == frameLoader()->activeDocumentLoader()) | 695 if (this == frameLoader()->activeDocumentLoader()) |
696 checkLoadComplete(); | 696 checkLoadComplete(); |
697 } | 697 } |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 1015 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
1016 { | 1016 { |
1017 m_frame->loader()->stopAllLoaders(); | 1017 m_frame->loader()->stopAllLoaders(); |
1018 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); | 1018 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); |
1019 if (!source.isNull()) | 1019 if (!source.isNull()) |
1020 m_writer->appendReplacingData(source); | 1020 m_writer->appendReplacingData(source); |
1021 endWriting(m_writer.get()); | 1021 endWriting(m_writer.get()); |
1022 } | 1022 } |
1023 | 1023 |
1024 } // namespace WebCore | 1024 } // namespace WebCore |
OLD | NEW |