| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 OwnPtr<HTMLImportChild> loader = adoptPtr(new HTMLImportChild(*m_master, url
, mode)); | 95 OwnPtr<HTMLImportChild> loader = adoptPtr(new HTMLImportChild(*m_master, url
, mode)); |
| 96 loader->setClient(client); | 96 loader->setClient(client); |
| 97 parent->appendImport(loader.get()); | 97 parent->appendImport(loader.get()); |
| 98 m_imports.append(loader.release()); | 98 m_imports.append(loader.release()); |
| 99 return m_imports.last().get(); | 99 return m_imports.last().get(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 HTMLImportChild* HTMLImportsController::load(HTMLImport* parent, HTMLImportChild
Client* client, FetchRequest request) | 102 HTMLImportChild* HTMLImportsController::load(HTMLImport* parent, HTMLImportChild
Client* client, FetchRequest request) |
| 103 { | 103 { |
| 104 ASSERT(!request.url().isEmpty() && request.url().isValid()); | 104 ASSERT(!request.url().isEmpty() && request.url().isValid()); |
| 105 ASSERT(parent == this || toHTMLImportChild(parent)->loader()->isFirstImport(
toHTMLImportChild(parent))); |
| 105 | 106 |
| 106 if (findLinkFor(request.url())) { | 107 if (findLinkFor(request.url())) { |
| 107 HTMLImportChild* child = createChild(request.url(), parent, client); | 108 HTMLImportChild* child = createChild(request.url(), parent, client); |
| 108 child->wasAlreadyLoaded(); | 109 child->wasAlreadyLoaded(); |
| 109 return child; | 110 return child; |
| 110 } | 111 } |
| 111 | 112 |
| 112 bool sameOriginRequest = securityOrigin()->canRequest(request.url()); | 113 bool sameOriginRequest = securityOrigin()->canRequest(request.url()); |
| 113 request.setCrossOriginAccessControl( | 114 request.setCrossOriginAccessControl( |
| 114 securityOrigin(), sameOriginRequest ? AllowStoredCredentials : DoNotAllo
wStoredCredentials, | 115 securityOrigin(), sameOriginRequest ? AllowStoredCredentials : DoNotAllo
wStoredCredentials, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 { | 224 { |
| 224 for (size_t i = 0; i < m_loaders.size(); ++i) { | 225 for (size_t i = 0; i < m_loaders.size(); ++i) { |
| 225 if (m_loaders[i]->document() == &document) | 226 if (m_loaders[i]->document() == &document) |
| 226 return m_loaders[i].get(); | 227 return m_loaders[i].get(); |
| 227 } | 228 } |
| 228 | 229 |
| 229 return 0; | 230 return 0; |
| 230 } | 231 } |
| 231 | 232 |
| 232 } // namespace WebCore | 233 } // namespace WebCore |
| OLD | NEW |