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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 if (!m_archiveResourceCollection) | 624 if (!m_archiveResourceCollection) |
625 m_archiveResourceCollection = adoptPtr(new ArchiveResourceCollection); | 625 m_archiveResourceCollection = adoptPtr(new ArchiveResourceCollection); |
626 m_archiveResourceCollection->addAllResources(archive); | 626 m_archiveResourceCollection->addAllResources(archive); |
627 } | 627 } |
628 | 628 |
629 void DocumentLoader::prepareSubframeArchiveLoadIfNeeded() | 629 void DocumentLoader::prepareSubframeArchiveLoadIfNeeded() |
630 { | 630 { |
631 if (!m_frame->tree().parent() || !m_frame->tree().parent()->isLocalFrame()) | 631 if (!m_frame->tree().parent() || !m_frame->tree().parent()->isLocalFrame()) |
632 return; | 632 return; |
633 | 633 |
634 ArchiveResourceCollection* parentCollection = m_frame->tree().parent()->load
er().documentLoader()->m_archiveResourceCollection.get(); | 634 ArchiveResourceCollection* parentCollection = toLocalFrame(m_frame->tree().p
arent())->loader().documentLoader()->m_archiveResourceCollection.get(); |
635 if (!parentCollection) | 635 if (!parentCollection) |
636 return; | 636 return; |
637 | 637 |
638 m_archive = parentCollection->popSubframeArchive(m_frame->tree().uniqueName(
), m_request.url()); | 638 m_archive = parentCollection->popSubframeArchive(m_frame->tree().uniqueName(
), m_request.url()); |
639 | 639 |
640 if (!m_archive) | 640 if (!m_archive) |
641 return; | 641 return; |
642 addAllArchiveResources(m_archive.get()); | 642 addAllArchiveResources(m_archive.get()); |
643 | 643 |
644 ArchiveResource* mainResource = m_archive->mainResource(); | 644 ArchiveResource* mainResource = m_archive->mainResource(); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 828 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
829 { | 829 { |
830 m_frame->loader().stopAllLoaders(); | 830 m_frame->loader().stopAllLoaders(); |
831 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); | 831 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); |
832 if (!source.isNull()) | 832 if (!source.isNull()) |
833 m_writer->appendReplacingData(source); | 833 m_writer->appendReplacingData(source); |
834 endWriting(m_writer.get()); | 834 endWriting(m_writer.get()); |
835 } | 835 } |
836 | 836 |
837 } // namespace WebCore | 837 } // namespace WebCore |
OLD | NEW |