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