| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 importChild->didFinishLoading(); | 175 importChild->didFinishLoading(); |
| 176 | 176 |
| 177 clearResource(); | 177 clearResource(); |
| 178 | 178 |
| 179 DCHECK(!m_document || !m_document->parsing()); | 179 DCHECK(!m_document || !m_document->parsing()); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void HTMLImportLoader::moveToFirst(HTMLImportChild* import) { | 182 void HTMLImportLoader::moveToFirst(HTMLImportChild* import) { |
| 183 size_t position = m_imports.find(import); | 183 size_t position = m_imports.find(import); |
| 184 DCHECK_NE(kNotFound, position); | 184 DCHECK_NE(kNotFound, position); |
| 185 m_imports.remove(position); | 185 m_imports.erase(position); |
| 186 m_imports.insert(0, import); | 186 m_imports.insert(0, import); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void HTMLImportLoader::addImport(HTMLImportChild* import) { | 189 void HTMLImportLoader::addImport(HTMLImportChild* import) { |
| 190 DCHECK_EQ(kNotFound, m_imports.find(import)); | 190 DCHECK_EQ(kNotFound, m_imports.find(import)); |
| 191 | 191 |
| 192 m_imports.push_back(import); | 192 m_imports.push_back(import); |
| 193 import->normalize(); | 193 import->normalize(); |
| 194 if (isDone()) | 194 if (isDone()) |
| 195 import->didFinishLoading(); | 195 import->didFinishLoading(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void HTMLImportLoader::removeImport(HTMLImportChild* client) { | 198 void HTMLImportLoader::removeImport(HTMLImportChild* client) { |
| 199 DCHECK_NE(kNotFound, m_imports.find(client)); | 199 DCHECK_NE(kNotFound, m_imports.find(client)); |
| 200 m_imports.remove(m_imports.find(client)); | 200 m_imports.erase(m_imports.find(client)); |
| 201 } | 201 } |
| 202 | 202 |
| 203 bool HTMLImportLoader::shouldBlockScriptExecution() const { | 203 bool HTMLImportLoader::shouldBlockScriptExecution() const { |
| 204 return firstImport()->state().shouldBlockScriptExecution(); | 204 return firstImport()->state().shouldBlockScriptExecution(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 V0CustomElementSyncMicrotaskQueue* HTMLImportLoader::microtaskQueue() const { | 207 V0CustomElementSyncMicrotaskQueue* HTMLImportLoader::microtaskQueue() const { |
| 208 return m_microtaskQueue; | 208 return m_microtaskQueue; |
| 209 } | 209 } |
| 210 | 210 |
| 211 DEFINE_TRACE(HTMLImportLoader) { | 211 DEFINE_TRACE(HTMLImportLoader) { |
| 212 visitor->trace(m_controller); | 212 visitor->trace(m_controller); |
| 213 visitor->trace(m_imports); | 213 visitor->trace(m_imports); |
| 214 visitor->trace(m_document); | 214 visitor->trace(m_document); |
| 215 visitor->trace(m_writer); | 215 visitor->trace(m_writer); |
| 216 visitor->trace(m_microtaskQueue); | 216 visitor->trace(m_microtaskQueue); |
| 217 DocumentParserClient::trace(visitor); | 217 DocumentParserClient::trace(visitor); |
| 218 ResourceOwner<RawResource>::trace(visitor); | 218 ResourceOwner<RawResource>::trace(visitor); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace blink | 221 } // namespace blink |
| OLD | NEW |