| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 { | 178 { |
| 179 // Doesn't check m_client nullity because we allow | 179 // Doesn't check m_client nullity because we allow |
| 180 // clearClient() to reenter. | 180 // clearClient() to reenter. |
| 181 m_client = nullptr; | 181 m_client = nullptr; |
| 182 } | 182 } |
| 183 #endif | 183 #endif |
| 184 | 184 |
| 185 HTMLLinkElement* HTMLImportChild::link() const | 185 HTMLLinkElement* HTMLImportChild::link() const |
| 186 { | 186 { |
| 187 if (!m_client) | 187 if (!m_client) |
| 188 return 0; | 188 return nullptr; |
| 189 return m_client->link(); | 189 return m_client->link(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 // Ensuring following invariants against the import tree: | 192 // Ensuring following invariants against the import tree: |
| 193 // - HTMLImportChild::firstImport() is the "first import" of the DFS order of th
e import tree. | 193 // - HTMLImportChild::firstImport() is the "first import" of the DFS order of th
e import tree. |
| 194 // - The "first import" manages all the children that is loaded by the document. | 194 // - The "first import" manages all the children that is loaded by the document. |
| 195 void HTMLImportChild::normalize() | 195 void HTMLImportChild::normalize() |
| 196 { | 196 { |
| 197 if (!loader()->isFirstImport(this) && this->precedes(loader()->firstImport()
)) { | 197 if (!loader()->isFirstImport(this) && this->precedes(loader()->firstImport()
)) { |
| 198 HTMLImportChild* oldFirst = loader()->firstImport(); | 198 HTMLImportChild* oldFirst = loader()->firstImport(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 223 | 223 |
| 224 void HTMLImportChild::trace(Visitor* visitor) | 224 void HTMLImportChild::trace(Visitor* visitor) |
| 225 { | 225 { |
| 226 visitor->trace(m_customElementMicrotaskStep); | 226 visitor->trace(m_customElementMicrotaskStep); |
| 227 visitor->trace(m_loader); | 227 visitor->trace(m_loader); |
| 228 visitor->trace(m_client); | 228 visitor->trace(m_client); |
| 229 HTMLImport::trace(visitor); | 229 HTMLImport::trace(visitor); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace blink | 232 } // namespace blink |
| OLD | NEW |