| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010. Adam Barth. All rights reserved. | 2 * Copyright (C) 2010. Adam Barth. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 m_parser->setDecoder(decoder.release()); | 110 m_parser->setDecoder(decoder.release()); |
| 111 } | 111 } |
| 112 // flush() can result replacing DocumentLoader::m_writer. | 112 // flush() can result replacing DocumentLoader::m_writer. |
| 113 RefPtr<DocumentWriter> protectingThis(this); | 113 RefPtr<DocumentWriter> protectingThis(this); |
| 114 m_parser->flush(); | 114 m_parser->flush(); |
| 115 | 115 |
| 116 if (!m_parser) | 116 if (!m_parser) |
| 117 return; | 117 return; |
| 118 | 118 |
| 119 m_parser->finish(); | 119 m_parser->finish(); |
| 120 m_parser = 0; | 120 m_parser = nullptr; |
| 121 m_document = 0; | 121 m_document = 0; |
| 122 } | 122 } |
| 123 | 123 |
| 124 void DocumentWriter::setUserChosenEncoding(const String& charset) | 124 void DocumentWriter::setUserChosenEncoding(const String& charset) |
| 125 { | 125 { |
| 126 TextResourceDecoder* decoder = m_parser->decoder(); | 126 TextResourceDecoder* decoder = m_parser->decoder(); |
| 127 if (decoder) | 127 if (decoder) |
| 128 decoder->setEncoding(charset, TextResourceDecoder::UserChosenEncoding); | 128 decoder->setEncoding(charset, TextResourceDecoder::UserChosenEncoding); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void DocumentWriter::setDocumentWasLoadedAsPartOfNavigation() | 131 void DocumentWriter::setDocumentWasLoadedAsPartOfNavigation() |
| 132 { | 132 { |
| 133 ASSERT(m_parser && !m_parser->isStopped()); | 133 ASSERT(m_parser && !m_parser->isStopped()); |
| 134 m_parser->setDocumentWasLoadedAsPartOfNavigation(); | 134 m_parser->setDocumentWasLoadedAsPartOfNavigation(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace WebCore | 137 } // namespace WebCore |
| OLD | NEW |