| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 setState(finishWriting()); | 102 setState(finishWriting()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) | 105 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) |
| 106 { | 106 { |
| 107 ASSERT(!m_imports.isEmpty()); | 107 ASSERT(!m_imports.isEmpty()); |
| 108 DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()->
contextDocument(), m_controller) | 108 DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()->
contextDocument(), m_controller) |
| 109 .withRegistrationContext(m_controller->master()->registrationContext()); | 109 .withRegistrationContext(m_controller->master()->registrationContext()); |
| 110 m_importedDocument = HTMLDocument::create(init); | 110 m_importedDocument = HTMLDocument::create(init); |
| 111 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp
e(), response.textEncodingName()); | 111 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp
e(), "UTF-8"); |
| 112 | 112 |
| 113 return StateLoading; | 113 return StateLoading; |
| 114 } | 114 } |
| 115 | 115 |
| 116 HTMLImportLoader::State HTMLImportLoader::finishWriting() | 116 HTMLImportLoader::State HTMLImportLoader::finishWriting() |
| 117 { | 117 { |
| 118 return StateWritten; | 118 return StateWritten; |
| 119 } | 119 } |
| 120 | 120 |
| 121 HTMLImportLoader::State HTMLImportLoader::finishParsing() | 121 HTMLImportLoader::State HTMLImportLoader::finishParsing() |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 client->didFinishLoading(); | 188 client->didFinishLoading(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void HTMLImportLoader::removeImport(HTMLImportChild* client) | 191 void HTMLImportLoader::removeImport(HTMLImportChild* client) |
| 192 { | 192 { |
| 193 ASSERT(kNotFound != m_imports.find(client)); | 193 ASSERT(kNotFound != m_imports.find(client)); |
| 194 m_imports.remove(m_imports.find(client)); | 194 m_imports.remove(m_imports.find(client)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace WebCore | 197 } // namespace WebCore |
| OLD | NEW |