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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); | 113 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); |
114 if (!resource) | 114 if (!resource) |
115 return 0; | 115 return 0; |
116 | 116 |
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 | |
124 return child; | 123 return child; |
125 } | 124 } |
126 | 125 |
127 Document* HTMLImportsController::master() const | 126 Document* HTMLImportsController::master() const |
128 { | 127 { |
129 return root()->document(); | 128 return root()->document(); |
130 } | 129 } |
131 | 130 |
132 bool HTMLImportsController::shouldBlockScriptExecution(const Document& document)
const | 131 bool HTMLImportsController::shouldBlockScriptExecution(const Document& document)
const |
133 { | 132 { |
(...skipping 20 matching lines...) Expand all Loading... |
154 { | 153 { |
155 for (size_t i = 0; i < m_loaders.size(); ++i) { | 154 for (size_t i = 0; i < m_loaders.size(); ++i) { |
156 if (m_loaders[i]->document() == &document) | 155 if (m_loaders[i]->document() == &document) |
157 return m_loaders[i].get(); | 156 return m_loaders[i].get(); |
158 } | 157 } |
159 | 158 |
160 return 0; | 159 return 0; |
161 } | 160 } |
162 | 161 |
163 } // namespace WebCore | 162 } // namespace WebCore |
OLD | NEW |