| 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 PassRefPtrWillBeRawPtr<DocumentWriter> DocumentLoader::createWriterFor(const Doc
ument* ownerDocument, const DocumentInit& init, const AtomicString& mimeType, co
nst AtomicString& encoding, bool dispatch) | 799 PassRefPtrWillBeRawPtr<DocumentWriter> DocumentLoader::createWriterFor(const Doc
ument* ownerDocument, const DocumentInit& init, const AtomicString& mimeType, co
nst AtomicString& encoding, bool dispatch) |
| 800 { | 800 { |
| 801 LocalFrame* frame = init.frame(); | 801 LocalFrame* frame = init.frame(); |
| 802 | 802 |
| 803 if (frame->document()) | 803 if (frame->document()) |
| 804 frame->document()->prepareForDestruction(); | 804 frame->document()->prepareForDestruction(); |
| 805 | 805 |
| 806 if (!init.shouldReuseDefaultView()) | 806 if (!init.shouldReuseDefaultView()) |
| 807 frame->setDOMWindow(LocalDOMWindow::create(*frame)); | 807 frame->setDOMWindow(LocalDOMWindow::create(*frame)); |
| 808 | 808 |
| 809 RefPtrWillBeRawPtr<Document> document = frame->domWindow()->installNewDocume
nt(mimeType, init); | 809 RefPtrWillBeRawPtr<Document> document = frame->localDOMWindow()->installNewD
ocument(mimeType, init); |
| 810 if (ownerDocument) { | 810 if (ownerDocument) { |
| 811 document->setCookieURL(ownerDocument->cookieURL()); | 811 document->setCookieURL(ownerDocument->cookieURL()); |
| 812 document->setSecurityOrigin(ownerDocument->securityOrigin()); | 812 document->setSecurityOrigin(ownerDocument->securityOrigin()); |
| 813 if (ownerDocument->isTransitionDocument()) | 813 if (ownerDocument->isTransitionDocument()) |
| 814 document->setIsTransitionDocument(); | 814 document->setIsTransitionDocument(); |
| 815 } | 815 } |
| 816 | 816 |
| 817 frame->loader().didBeginDocument(dispatch); | 817 frame->loader().didBeginDocument(dispatch); |
| 818 | 818 |
| 819 return DocumentWriter::create(document.get(), mimeType, encoding); | 819 return DocumentWriter::create(document.get(), mimeType, encoding); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 835 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 835 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 836 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 836 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 837 { | 837 { |
| 838 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); | 838 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); |
| 839 if (!source.isNull()) | 839 if (!source.isNull()) |
| 840 m_writer->appendReplacingData(source); | 840 m_writer->appendReplacingData(source); |
| 841 endWriting(m_writer.get()); | 841 endWriting(m_writer.get()); |
| 842 } | 842 } |
| 843 | 843 |
| 844 } // namespace blink | 844 } // namespace blink |
| OLD | NEW |