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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 HTMLImportLoader* loader = createLoader(); | 117 HTMLImportLoader* loader = createLoader(); |
118 HTMLImportChild* child = createChild(request.url(), loader, parent, client); | 118 HTMLImportChild* child = createChild(request.url(), loader, parent, client); |
119 // We set resource after the import tree is built since | 119 // We set resource after the import tree is built since |
120 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. | 120 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. |
121 loader->startLoading(resource); | 121 loader->startLoading(resource); |
122 child->didStartLoading(); | 122 child->didStartLoading(); |
123 | 123 |
124 return child; | 124 return child; |
125 } | 125 } |
126 | 126 |
127 void HTMLImportsController::showSecurityErrorMessage(const String& message) | |
128 { | |
129 master()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message); | |
130 } | |
131 | |
132 Document* HTMLImportsController::master() const | 127 Document* HTMLImportsController::master() const |
133 { | 128 { |
134 return root()->document(); | 129 return root()->document(); |
135 } | 130 } |
136 | 131 |
137 bool HTMLImportsController::shouldBlockScriptExecution(const Document& document)
const | 132 bool HTMLImportsController::shouldBlockScriptExecution(const Document& document)
const |
138 { | 133 { |
139 ASSERT(document.importsController() == this); | 134 ASSERT(document.importsController() == this); |
140 if (HTMLImportLoader* loader = loaderFor(document)) | 135 if (HTMLImportLoader* loader = loaderFor(document)) |
141 return loader->shouldBlockScriptExecution(); | 136 return loader->shouldBlockScriptExecution(); |
(...skipping 17 matching lines...) Expand all Loading... |
159 { | 154 { |
160 for (size_t i = 0; i < m_loaders.size(); ++i) { | 155 for (size_t i = 0; i < m_loaders.size(); ++i) { |
161 if (m_loaders[i]->document() == &document) | 156 if (m_loaders[i]->document() == &document) |
162 return m_loaders[i].get(); | 157 return m_loaders[i].get(); |
163 } | 158 } |
164 | 159 |
165 return 0; | 160 return 0; |
166 } | 161 } |
167 | 162 |
168 } // namespace WebCore | 163 } // namespace WebCore |
OLD | NEW |