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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 m_resource = 0; | 106 m_resource = 0; |
107 } | 107 } |
108 | 108 |
109 ASSERT(!document() || !document()->parsing()); | 109 ASSERT(!document() || !document()->parsing()); |
110 root()->importWasDisposed(); | 110 root()->importWasDisposed(); |
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 // Current canAccess() implementation isn't sufficient for catching cross-do main redirects: http://crbug.com/256976 | 115 // Current canAccess() implementation isn't sufficient for catching cross-do main redirects: http://crbug.com/256976 |
116 if (!m_parent->document()->fetcher()->canAccess(m_resource.get())) | 116 if (!m_parent->document()->fetcher()->canAccess(m_resource.get(), true)) |
abarth-chromium
2013/11/14 16:34:48
If we keep this design, we should use an enum rath
sof
2013/11/15 08:05:23
Definitely agree. Now done, with hopefully compreh
| |
117 return StateError; | 117 return StateError; |
118 | 118 |
119 DocumentInit init = DocumentInit(response.url(), 0, root()->document()->cont extDocument(), this) | 119 DocumentInit init = DocumentInit(response.url(), 0, root()->document()->cont extDocument(), this) |
120 .withRegistrationContext(root()->document()->registrationContext()); | 120 .withRegistrationContext(root()->document()->registrationContext()); |
121 m_importedDocument = HTMLDocument::create(init); | 121 m_importedDocument = HTMLDocument::create(init); |
122 m_importedDocument->initContentSecurityPolicy(ContentSecurityPolicyResponseH eaders(response)); | 122 m_importedDocument->initContentSecurityPolicy(ContentSecurityPolicyResponseH eaders(response)); |
123 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp e(), response.textEncodingName()); | 123 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp e(), response.textEncodingName()); |
124 | 124 |
125 return StateLoading; | 125 return StateLoading; |
126 } | 126 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 } | 200 } |
201 | 201 |
202 bool HTMLImportLoader::isProcessing() const | 202 bool HTMLImportLoader::isProcessing() const |
203 { | 203 { |
204 if (!m_importedDocument) | 204 if (!m_importedDocument) |
205 return !isDone(); | 205 return !isDone(); |
206 return m_importedDocument->parsing(); | 206 return m_importedDocument->parsing(); |
207 } | 207 } |
208 | 208 |
209 } // namespace WebCore | 209 } // namespace WebCore |
OLD | NEW |