| 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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 return DocumentWriter::create(document.get(), mimeType, encoding, userChosen
); | 996 return DocumentWriter::create(document.get(), mimeType, encoding, userChosen
); |
| 997 } | 997 } |
| 998 | 998 |
| 999 String DocumentLoader::mimeType() const | 999 String DocumentLoader::mimeType() const |
| 1000 { | 1000 { |
| 1001 if (m_writer) | 1001 if (m_writer) |
| 1002 return m_writer->mimeType(); | 1002 return m_writer->mimeType(); |
| 1003 return m_response.mimeType(); | 1003 return m_response.mimeType(); |
| 1004 } | 1004 } |
| 1005 | 1005 |
| 1006 void DocumentLoader::setUserChosenEncoding(const String& charset) |
| 1007 { |
| 1008 if (m_writer) |
| 1009 m_writer->setUserChosenEncoding(charset); |
| 1010 } |
| 1011 |
| 1006 // This is only called by ScriptController::executeScriptIfJavaScriptURL | 1012 // This is only called by ScriptController::executeScriptIfJavaScriptURL |
| 1007 // and always contains the result of evaluating a javascript: url. | 1013 // and always contains the result of evaluating a javascript: url. |
| 1008 // This is the <iframe src="javascript:'html'"> case. | 1014 // This is the <iframe src="javascript:'html'"> case. |
| 1009 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 1015 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
| 1010 { | 1016 { |
| 1011 m_frame->loader()->stopAllLoaders(); | 1017 m_frame->loader()->stopAllLoaders(); |
| 1012 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); | 1018 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); |
| 1013 if (!source.isNull()) | 1019 if (!source.isNull()) |
| 1014 m_writer->appendReplacingData(source); | 1020 m_writer->appendReplacingData(source); |
| 1015 endWriting(m_writer.get()); | 1021 endWriting(m_writer.get()); |
| 1016 } | 1022 } |
| 1017 | 1023 |
| 1018 } // namespace WebCore | 1024 } // namespace WebCore |
| OLD | NEW |