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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 setState(finishWriting()); | 110 setState(finishWriting()); |
111 } | 111 } |
112 | 112 |
113 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) | 113 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) |
114 { | 114 { |
115 ASSERT(!m_imports.isEmpty()); | 115 ASSERT(!m_imports.isEmpty()); |
116 DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()->
contextDocument(), m_controller) | 116 DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()->
contextDocument(), m_controller) |
117 .withRegistrationContext(m_controller->master()->registrationContext()); | 117 .withRegistrationContext(m_controller->master()->registrationContext()); |
118 m_document = HTMLDocument::create(init); | 118 m_document = HTMLDocument::create(init); |
119 m_writer = DocumentWriter::create(m_document.get(), response.mimeType(), "UT
F-8"); | 119 m_writer = DocumentWriter::create(m_document.get(), AllowAsynchronousParsing
, response.mimeType(), "UTF-8"); |
120 | 120 |
121 DocumentParser* parser = m_document->parser(); | 121 DocumentParser* parser = m_document->parser(); |
122 ASSERT(parser); | 122 ASSERT(parser); |
123 parser->addClient(this); | 123 parser->addClient(this); |
124 | 124 |
125 return StateLoading; | 125 return StateLoading; |
126 } | 126 } |
127 | 127 |
128 HTMLImportLoader::State HTMLImportLoader::finishWriting() | 128 HTMLImportLoader::State HTMLImportLoader::finishWriting() |
129 { | 129 { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 #if ENABLE(OILPAN) | 231 #if ENABLE(OILPAN) |
232 visitor->trace(m_imports); | 232 visitor->trace(m_imports); |
233 #endif | 233 #endif |
234 visitor->trace(m_document); | 234 visitor->trace(m_document); |
235 visitor->trace(m_writer); | 235 visitor->trace(m_writer); |
236 visitor->trace(m_microtaskQueue); | 236 visitor->trace(m_microtaskQueue); |
237 DocumentParserClient::trace(visitor); | 237 DocumentParserClient::trace(visitor); |
238 } | 238 } |
239 | 239 |
240 } // namespace blink | 240 } // namespace blink |
OLD | NEW |