| 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 frame->loader().clear(); | 793 frame->loader().clear(); |
| 794 | 794 |
| 795 if (frame->document()) | 795 if (frame->document()) |
| 796 frame->document()->prepareForDestruction(); | 796 frame->document()->prepareForDestruction(); |
| 797 | 797 |
| 798 if (!shouldReuseDefaultView) | 798 if (!shouldReuseDefaultView) |
| 799 frame->setDOMWindow(DOMWindow::create(*frame)); | 799 frame->setDOMWindow(DOMWindow::create(*frame)); |
| 800 | 800 |
| 801 RefPtr<Document> document = frame->domWindow()->installNewDocument(mimeType,
init); | 801 RefPtr<Document> document = frame->domWindow()->installNewDocument(mimeType,
init); |
| 802 if (ownerDocument) { | 802 if (ownerDocument) { |
| 803 document->setCookieURL(ownerDocument->cookieURL()); | 803 document->setInheritedURL(ownerDocument->inheritedURL()); |
| 804 document->setSecurityOrigin(ownerDocument->securityOrigin()); | 804 document->setSecurityOrigin(ownerDocument->securityOrigin()); |
| 805 } | 805 } |
| 806 | 806 |
| 807 frame->loader().didBeginDocument(dispatch); | 807 frame->loader().didBeginDocument(dispatch); |
| 808 | 808 |
| 809 return DocumentWriter::create(document.get(), mimeType, encoding, userChosen
); | 809 return DocumentWriter::create(document.get(), mimeType, encoding, userChosen
); |
| 810 } | 810 } |
| 811 | 811 |
| 812 const AtomicString& DocumentLoader::mimeType() const | 812 const AtomicString& DocumentLoader::mimeType() const |
| 813 { | 813 { |
| (...skipping 14 matching lines...) Expand all 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 |