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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 m_resource = 0; | 104 m_resource = 0; |
105 } | 105 } |
106 | 106 |
107 ASSERT(!document() || !document()->parsing()); | 107 ASSERT(!document() || !document()->parsing()); |
108 root()->importWasDisposed(); | 108 root()->importWasDisposed(); |
109 } | 109 } |
110 | 110 |
111 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) | 111 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
esponse& response) |
112 { | 112 { |
113 // Current canAccess() implementation isn't sufficient for catching cross-do
main redirects: http://crbug.com/256976 | 113 // Current canAccess() implementation isn't sufficient for catching cross-do
main redirects: http://crbug.com/256976 |
114 if (!parent()->document()->fetcher()->canAccess(m_resource.get())) | 114 if (!parent()->document()->fetcher()->canAccess(m_resource.get(), Potentiall
yCORSEnabled)) |
115 return StateError; | 115 return StateError; |
116 | 116 |
117 DocumentInit init = DocumentInit(response.url(), 0, root()->document()->cont
extDocument(), this) | 117 DocumentInit init = DocumentInit(response.url(), 0, root()->document()->cont
extDocument(), this) |
118 .withRegistrationContext(root()->document()->registrationContext()); | 118 .withRegistrationContext(root()->document()->registrationContext()); |
119 m_importedDocument = HTMLDocument::create(init); | 119 m_importedDocument = HTMLDocument::create(init); |
120 m_importedDocument->initContentSecurityPolicy(ContentSecurityPolicyResponseH
eaders(response)); | 120 m_importedDocument->initContentSecurityPolicy(ContentSecurityPolicyResponseH
eaders(response)); |
121 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp
e(), response.textEncodingName()); | 121 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp
e(), response.textEncodingName()); |
122 | 122 |
123 return StateLoading; | 123 return StateLoading; |
124 } | 124 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 bool HTMLImportLoader::isProcessing() const | 196 bool HTMLImportLoader::isProcessing() const |
197 { | 197 { |
198 if (!m_importedDocument) | 198 if (!m_importedDocument) |
199 return !isDone(); | 199 return !isDone(); |
200 return m_importedDocument->parsing(); | 200 return m_importedDocument->parsing(); |
201 } | 201 } |
202 | 202 |
203 } // namespace WebCore | 203 } // namespace WebCore |
OLD | NEW |