| 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 738 | 738 | 
| 739     ASSERT(!frame->document() || !frame->document()->isActive()); | 739     ASSERT(!frame->document() || !frame->document()->isActive()); | 
| 740     ASSERT(frame->tree().childCount() == 0); | 740     ASSERT(frame->tree().childCount() == 0); | 
| 741 | 741 | 
| 742     if (!init.shouldReuseDefaultView()) | 742     if (!init.shouldReuseDefaultView()) | 
| 743         frame->setDOMWindow(LocalDOMWindow::create(*frame)); | 743         frame->setDOMWindow(LocalDOMWindow::create(*frame)); | 
| 744 | 744 | 
| 745     RefPtrWillBeRawPtr<Document> document = frame->localDOMWindow()->installNewD
     ocument(mimeType, init); | 745     RefPtrWillBeRawPtr<Document> document = frame->localDOMWindow()->installNewD
     ocument(mimeType, init); | 
| 746     if (ownerDocument) { | 746     if (ownerDocument) { | 
| 747         document->setCookieURL(ownerDocument->cookieURL()); | 747         document->setCookieURL(ownerDocument->cookieURL()); | 
| 748         document->setSecurityOrigin(ownerDocument->securityOrigin()); | 748         document->updateSecurityOrigin(ownerDocument->securityOrigin()); | 
| 749     } | 749     } | 
| 750 | 750 | 
| 751     frame->loader().didBeginDocument(dispatch); | 751     frame->loader().didBeginDocument(dispatch); | 
| 752 | 752 | 
| 753     return DocumentWriter::create(document.get(), parsingPolicy, mimeType, encod
     ing); | 753     return DocumentWriter::create(document.get(), parsingPolicy, mimeType, encod
     ing); | 
| 754 } | 754 } | 
| 755 | 755 | 
| 756 const AtomicString& DocumentLoader::mimeType() const | 756 const AtomicString& DocumentLoader::mimeType() const | 
| 757 { | 757 { | 
| 758     if (m_writer) | 758     if (m_writer) | 
| 759         return m_writer->mimeType(); | 759         return m_writer->mimeType(); | 
| 760     return m_response.mimeType(); | 760     return m_response.mimeType(); | 
| 761 } | 761 } | 
| 762 | 762 | 
| 763 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
     L() | 763 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
     L() | 
| 764 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
     it& init, const String& source, Document* ownerDocument) | 764 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
     it& init, const String& source, Document* ownerDocument) | 
| 765 { | 765 { | 
| 766     m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
     ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 766     m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
     ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 
| 767     if (!source.isNull()) | 767     if (!source.isNull()) | 
| 768         m_writer->appendReplacingData(source); | 768         m_writer->appendReplacingData(source); | 
| 769     endWriting(m_writer.get()); | 769     endWriting(m_writer.get()); | 
| 770 } | 770 } | 
| 771 | 771 | 
| 772 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 772 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 
| 773 | 773 | 
| 774 } // namespace blink | 774 } // namespace blink | 
| OLD | NEW | 
|---|