| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 if (frame->document()) | 796 if (frame->document()) |
| 797 frame->document()->prepareForDestruction(); | 797 frame->document()->prepareForDestruction(); |
| 798 | 798 |
| 799 if (!shouldReuseDefaultView) | 799 if (!shouldReuseDefaultView) |
| 800 frame->setDOMWindow(LocalDOMWindow::create(*frame)); | 800 frame->setDOMWindow(LocalDOMWindow::create(*frame)); |
| 801 | 801 |
| 802 RefPtrWillBeRawPtr<Document> document = frame->domWindow()->installNewDocume
nt(mimeType, init); | 802 RefPtrWillBeRawPtr<Document> document = frame->domWindow()->installNewDocume
nt(mimeType, init); |
| 803 if (ownerDocument) { | 803 if (ownerDocument) { |
| 804 document->setCookieURL(ownerDocument->cookieURL()); | 804 document->setCookieURL(ownerDocument->cookieURL()); |
| 805 document->setSecurityOrigin(ownerDocument->securityOrigin()); | 805 document->setSecurityOrigin(ownerDocument->securityOrigin()); |
| 806 if (ownerDocument->isTransitionDocument()) |
| 807 document->setIsTransitionDocument(); |
| 806 } | 808 } |
| 807 | 809 |
| 808 frame->loader().didBeginDocument(dispatch); | 810 frame->loader().didBeginDocument(dispatch); |
| 809 | 811 |
| 810 return DocumentWriter::create(document.get(), mimeType, encoding, userChosen
); | 812 return DocumentWriter::create(document.get(), mimeType, encoding, userChosen
); |
| 811 } | 813 } |
| 812 | 814 |
| 813 const AtomicString& DocumentLoader::mimeType() const | 815 const AtomicString& DocumentLoader::mimeType() const |
| 814 { | 816 { |
| 815 if (m_writer) | 817 if (m_writer) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 829 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 831 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
| 830 { | 832 { |
| 831 m_frame->loader().stopAllLoaders(); | 833 m_frame->loader().stopAllLoaders(); |
| 832 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); | 834 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); |
| 833 if (!source.isNull()) | 835 if (!source.isNull()) |
| 834 m_writer->appendReplacingData(source); | 836 m_writer->appendReplacingData(source); |
| 835 endWriting(m_writer.get()); | 837 endWriting(m_writer.get()); |
| 836 } | 838 } |
| 837 | 839 |
| 838 } // namespace blink | 840 } // namespace blink |
| OLD | NEW |