| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ASSERT(loader); | 122 ASSERT(loader); |
| 123 HTMLImportChild* child = createChild(request.url(), loader, parent, clie
nt); | 123 HTMLImportChild* child = createChild(request.url(), loader, parent, clie
nt); |
| 124 child->didShareLoader(); | 124 child->didShareLoader(); |
| 125 return child; | 125 return child; |
| 126 } | 126 } |
| 127 | 127 |
| 128 bool sameOriginRequest = master()->securityOrigin()->canRequest(request.url(
)); | 128 bool sameOriginRequest = master()->securityOrigin()->canRequest(request.url(
)); |
| 129 request.setCrossOriginAccessControl( | 129 request.setCrossOriginAccessControl( |
| 130 master()->securityOrigin(), sameOriginRequest ? AllowStoredCredentials :
DoNotAllowStoredCredentials, | 130 master()->securityOrigin(), sameOriginRequest ? AllowStoredCredentials :
DoNotAllowStoredCredentials, |
| 131 ClientDidNotRequestCredentials); | 131 ClientDidNotRequestCredentials); |
| 132 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); | 132 ResourcePtr<RawResource> resource = RawResource::fetchImport(request, parent
->document()->fetcher()); |
| 133 if (!resource) | 133 if (!resource) |
| 134 return nullptr; | 134 return nullptr; |
| 135 | 135 |
| 136 HTMLImportLoader* loader = createLoader(); | 136 HTMLImportLoader* loader = createLoader(); |
| 137 HTMLImportChild* child = createChild(request.url(), loader, parent, client); | 137 HTMLImportChild* child = createChild(request.url(), loader, parent, client); |
| 138 // We set resource after the import tree is built since | 138 // We set resource after the import tree is built since |
| 139 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. | 139 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. |
| 140 loader->startLoading(resource); | 140 loader->startLoading(resource); |
| 141 child->didStartLoading(); | 141 child->didStartLoading(); |
| 142 return child; | 142 return child; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 DEFINE_TRACE(HTMLImportsController) | 179 DEFINE_TRACE(HTMLImportsController) |
| 180 { | 180 { |
| 181 visitor->trace(m_root); | 181 visitor->trace(m_root); |
| 182 visitor->trace(m_loaders); | 182 visitor->trace(m_loaders); |
| 183 WillBeHeapSupplement<Document>::trace(visitor); | 183 WillBeHeapSupplement<Document>::trace(visitor); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace blink | 186 } // namespace blink |
| OLD | NEW |