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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 | 87 |
88 setState(finishWriting()); | 88 setState(finishWriting()); |
89 } | 89 } |
90 | 90 |
91 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) | 91 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) |
92 { | 92 { |
93 DocumentInit init = DocumentInit(response.url(), 0, m_import->master()->cont
extDocument(), m_import) | 93 DocumentInit init = DocumentInit(response.url(), 0, m_import->master()->cont
extDocument(), m_import) |
94 .withRegistrationContext(m_import->master()->registrationContext()); | 94 .withRegistrationContext(m_import->master()->registrationContext()); |
95 m_importedDocument = HTMLDocument::create(init); | 95 m_importedDocument = HTMLDocument::create(init); |
96 m_importedDocument->initContentSecurityPolicy(ContentSecurityPolicyResponseH
eaders(response)); | |
97 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp
e(), response.textEncodingName()); | 96 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp
e(), response.textEncodingName()); |
98 | 97 |
99 return StateLoading; | 98 return StateLoading; |
100 } | 99 } |
101 | 100 |
102 HTMLImportLoader::State HTMLImportLoader::finishWriting() | 101 HTMLImportLoader::State HTMLImportLoader::finishWriting() |
103 { | 102 { |
104 return StateWritten; | 103 return StateWritten; |
105 } | 104 } |
106 | 105 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 client->didFinishLoading(); | 155 client->didFinishLoading(); |
157 } | 156 } |
158 | 157 |
159 void HTMLImportLoader::removeClient(HTMLImportLoaderClient* client) | 158 void HTMLImportLoader::removeClient(HTMLImportLoaderClient* client) |
160 { | 159 { |
161 ASSERT(kNotFound != m_clients.find(client)); | 160 ASSERT(kNotFound != m_clients.find(client)); |
162 m_clients.remove(m_clients.find(client)); | 161 m_clients.remove(m_clients.find(client)); |
163 } | 162 } |
164 | 163 |
165 } // namespace WebCore | 164 } // namespace WebCore |
OLD | NEW |