| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return 0; | 60 return 0; |
| 61 return m_loader->importedDocument(); | 61 return m_loader->importedDocument(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void LinkImport::process() | 64 void LinkImport::process() |
| 65 { | 65 { |
| 66 if (m_loader) | 66 if (m_loader) |
| 67 return; | 67 return; |
| 68 if (!m_owner) | 68 if (!m_owner) |
| 69 return; | 69 return; |
| 70 if (!m_owner->document()->frame() && !m_owner->document()->import()) | 70 if (!m_owner->document().frame() && !m_owner->document().import()) |
| 71 return; | 71 return; |
| 72 | 72 |
| 73 if (!m_owner->document()->import()) { | 73 if (!m_owner->document().import()) { |
| 74 ASSERT(m_owner->document()->frame()); // The document should be the mast
er. | 74 ASSERT(m_owner->document().frame()); // The document should be the maste
r. |
| 75 HTMLImportsController::provideTo(m_owner->document()); | 75 HTMLImportsController::provideTo(&m_owner->document()); |
| 76 } | 76 } |
| 77 | 77 |
| 78 LinkRequestBuilder builder(m_owner); | 78 LinkRequestBuilder builder(m_owner); |
| 79 if (!builder.isValid()) { | 79 if (!builder.isValid()) { |
| 80 didFinish(); | 80 didFinish(); |
| 81 return; | 81 return; |
| 82 } | 82 } |
| 83 | 83 |
| 84 HTMLImport* parent = m_owner->document()->import(); | 84 HTMLImport* parent = m_owner->document().import(); |
| 85 HTMLImportsController* controller = parent->controller(); | 85 HTMLImportsController* controller = parent->controller(); |
| 86 m_loader = controller->createLoader(parent, builder.build(true)); | 86 m_loader = controller->createLoader(parent, builder.build(true)); |
| 87 if (!m_loader) { | 87 if (!m_loader) { |
| 88 didFinish(); | 88 didFinish(); |
| 89 return; | 89 return; |
| 90 } | 90 } |
| 91 | 91 |
| 92 m_loader->addClient(this); | 92 m_loader->addClient(this); |
| 93 } | 93 } |
| 94 | 94 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 113 return; | 113 return; |
| 114 m_owner->scheduleEvent(); | 114 m_owner->scheduleEvent(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 bool LinkImport::hasLoaded() const | 117 bool LinkImport::hasLoaded() const |
| 118 { | 118 { |
| 119 return m_loader && m_loader->isLoaded(); | 119 return m_loader && m_loader->isLoaded(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace WebCore | 122 } // namespace WebCore |
| OLD | NEW |