| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 Document* HTMLImportLoader::importedDocument() const | 147 Document* HTMLImportLoader::importedDocument() const |
| 148 { | 148 { |
| 149 if (m_state == StateError) | 149 if (m_state == StateError) |
| 150 return 0; | 150 return 0; |
| 151 return m_importedDocument.get(); | 151 return m_importedDocument.get(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void HTMLImportLoader::addClient(HTMLImportLoaderClient* client) | 154 void HTMLImportLoader::addClient(HTMLImportLoaderClient* client) |
| 155 { | 155 { |
| 156 ASSERT(notFound == m_clients.find(client)); | 156 ASSERT(kNotFound == m_clients.find(client)); |
| 157 m_clients.append(client); | 157 m_clients.append(client); |
| 158 if (isDone()) | 158 if (isDone()) |
| 159 client->didFinish(); | 159 client->didFinish(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void HTMLImportLoader::removeClient(HTMLImportLoaderClient* client) | 162 void HTMLImportLoader::removeClient(HTMLImportLoaderClient* client) |
| 163 { | 163 { |
| 164 ASSERT(notFound != m_clients.find(client)); | 164 ASSERT(kNotFound != m_clients.find(client)); |
| 165 m_clients.remove(m_clients.find(client)); | 165 m_clients.remove(m_clients.find(client)); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void HTMLImportLoader::importDestroyed() | 168 void HTMLImportLoader::importDestroyed() |
| 169 { | 169 { |
| 170 m_parent = 0; | 170 m_parent = 0; |
| 171 if (RefPtr<Document> document = m_importedDocument.release()) | 171 if (RefPtr<Document> document = m_importedDocument.release()) |
| 172 document->setImport(0); | 172 document->setImport(0); |
| 173 } | 173 } |
| 174 | 174 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 200 } | 200 } |
| 201 | 201 |
| 202 bool HTMLImportLoader::isProcessing() const | 202 bool HTMLImportLoader::isProcessing() const |
| 203 { | 203 { |
| 204 if (!m_importedDocument) | 204 if (!m_importedDocument) |
| 205 return !isDone(); | 205 return !isDone(); |
| 206 return m_importedDocument->parsing(); | 206 return m_importedDocument->parsing(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace WebCore | 209 } // namespace WebCore |
| OLD | NEW |