| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 if (HTMLImportChild* found = root()->findLinkFor(m_url, this)) | 170 if (HTMLImportChild* found = root()->findLinkFor(m_url, this)) |
| 171 shareLoader(found); | 171 shareLoader(found); |
| 172 else | 172 else |
| 173 createLoader(); | 173 createLoader(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void HTMLImportChild::createLoader() | 176 void HTMLImportChild::createLoader() |
| 177 { | 177 { |
| 178 ASSERT(!isStateBlockedFromCreatingDocument()); | 178 ASSERT(!isStateBlockedFromCreatingDocument()); |
| 179 ASSERT(!m_loader); | 179 ASSERT(!m_loader); |
| 180 m_loader = HTMLImportLoader::create(this, parent()->document()->fetcher()); | 180 m_loader = HTMLImportLoader::create(this); |
| 181 m_loader->addClient(this); | 181 m_loader->addClient(this); |
| 182 m_loader->startLoading(resource()); | 182 m_loader->startLoading(resource()); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void HTMLImportChild::shareLoader(HTMLImportChild* loader) | 185 void HTMLImportChild::shareLoader(HTMLImportChild* loader) |
| 186 { | 186 { |
| 187 ASSERT(!m_loader); | 187 ASSERT(!m_loader); |
| 188 m_loader = loader->m_loader; | 188 m_loader = loader->m_loader; |
| 189 m_loader->addClient(this); | 189 m_loader->addClient(this); |
| 190 stateWillChange(); | 190 stateWillChange(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 HTMLImport::showThis(); | 232 HTMLImport::showThis(); |
| 233 fprintf(stderr, " loader=%p own=%s async=%s url=%s", | 233 fprintf(stderr, " loader=%p own=%s async=%s url=%s", |
| 234 m_loader.get(), | 234 m_loader.get(), |
| 235 hasLoader() && ownsLoader() ? "Y" : "N", | 235 hasLoader() && ownsLoader() ? "Y" : "N", |
| 236 isCreatedByParser() ? "Y" : "N", | 236 isCreatedByParser() ? "Y" : "N", |
| 237 url().string().utf8().data()); | 237 url().string().utf8().data()); |
| 238 } | 238 } |
| 239 #endif | 239 #endif |
| 240 | 240 |
| 241 } // namespace WebCore | 241 } // namespace WebCore |
| OLD | NEW |