| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void LinkImport::process() | 66 void LinkImport::process() |
| 67 { | 67 { |
| 68 if (m_child) | 68 if (m_child) |
| 69 return; | 69 return; |
| 70 if (!m_owner) | 70 if (!m_owner) |
| 71 return; | 71 return; |
| 72 if (!shouldLoadResource()) | 72 if (!shouldLoadResource()) |
| 73 return; | 73 return; |
| 74 | 74 |
| 75 if (!m_owner->document().importsController()) { | 75 if (!m_owner->document().importsController()) { |
| 76 ASSERT(m_owner->document().frame()); // The document should be the maste
r. | 76 // The document should be the master. |
| 77 HTMLImportsController::provideTo(m_owner->document()); | 77 Document& master = m_owner->document(); |
| 78 ASSERT(master.frame()); |
| 79 master.setImportsController(HTMLImportsController::create(master)); |
| 78 } | 80 } |
| 79 | 81 |
| 80 LinkRequestBuilder builder(m_owner); | 82 LinkRequestBuilder builder(m_owner); |
| 81 if (!builder.isValid()) { | 83 if (!builder.isValid()) { |
| 82 didFinish(); | 84 didFinish(); |
| 83 return; | 85 return; |
| 84 } | 86 } |
| 85 | 87 |
| 86 HTMLImportsController* controller = m_owner->document().importsController(); | 88 HTMLImportsController* controller = m_owner->document().importsController(); |
| 87 HTMLImportLoader* loader = m_owner->document().importLoader(); | 89 HTMLImportLoader* loader = m_owner->document().importLoader(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 131 } |
| 130 | 132 |
| 131 DEFINE_TRACE(LinkImport) | 133 DEFINE_TRACE(LinkImport) |
| 132 { | 134 { |
| 133 visitor->trace(m_child); | 135 visitor->trace(m_child); |
| 134 HTMLImportChildClient::trace(visitor); | 136 HTMLImportChildClient::trace(visitor); |
| 135 LinkResource::trace(visitor); | 137 LinkResource::trace(visitor); |
| 136 } | 138 } |
| 137 | 139 |
| 138 } // namespace blink | 140 } // namespace blink |
| OLD | NEW |