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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 return DocumentWriter::create(document.get(), parsingPolicy, mimeType, encod
ing); | 759 return DocumentWriter::create(document.get(), parsingPolicy, mimeType, encod
ing); |
760 } | 760 } |
761 | 761 |
762 const AtomicString& DocumentLoader::mimeType() const | 762 const AtomicString& DocumentLoader::mimeType() const |
763 { | 763 { |
764 if (m_writer) | 764 if (m_writer) |
765 return m_writer->mimeType(); | 765 return m_writer->mimeType(); |
766 return m_response.mimeType(); | 766 return m_response.mimeType(); |
767 } | 767 } |
768 | 768 |
769 void DocumentLoader::setUserChosenEncoding(const String& charset) | |
770 { | |
771 if (m_writer) | |
772 m_writer->setUserChosenEncoding(charset); | |
773 } | |
774 | |
775 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 769 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
776 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 770 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
777 { | 771 { |
778 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 772 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
779 if (!source.isNull()) | 773 if (!source.isNull()) |
780 m_writer->appendReplacingData(source); | 774 m_writer->appendReplacingData(source); |
781 endWriting(m_writer.get()); | 775 endWriting(m_writer.get()); |
782 } | 776 } |
783 | 777 |
784 } // namespace blink | 778 } // namespace blink |
OLD | NEW |