| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void HTMLImport::stateDidChange() | 80 void HTMLImport::stateDidChange() |
| 81 { | 81 { |
| 82 if (!state().shouldBlockScriptExecution()) { | 82 if (!state().shouldBlockScriptExecution()) { |
| 83 if (Document* document = this->document()) | 83 if (Document* document = this->document()) |
| 84 document->didLoadAllImports(); | 84 document->didLoadAllImports(); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 void HTMLImport::recalcTreeState(HTMLImport* root) | 88 void HTMLImport::recalcTreeState(HTMLImport* root) |
| 89 { | 89 { |
| 90 HashMap<HTMLImport*, HTMLImportState> snapshot; | 90 WillBeHeapHashMap<RawPtrWillBeMember<HTMLImport>, HTMLImportState> snapshot; |
| 91 Vector<HTMLImport*> updated; | 91 WillBeHeapVector<RawPtrWillBeMember<HTMLImport> > updated; |
| 92 | 92 |
| 93 for (HTMLImport* i = root; i; i = traverseNext(i)) { | 93 for (HTMLImport* i = root; i; i = traverseNext(i)) { |
| 94 snapshot.add(i, i->state()); | 94 snapshot.add(i, i->state()); |
| 95 i->m_state = HTMLImportState::invalidState(); | 95 i->m_state = HTMLImportState::invalidState(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 // The post-visit DFS order matters here because | 98 // The post-visit DFS order matters here because |
| 99 // HTMLImportStateResolver in recalcState() Depends on | 99 // HTMLImportStateResolver in recalcState() Depends on |
| 100 // |m_state| of its children and precedents of ancestors. | 100 // |m_state| of its children and precedents of ancestors. |
| 101 // Accidental cycle dependency of state computation is prevented | 101 // Accidental cycle dependency of state computation is prevented |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 child->showTree(highlight, depth + 1); | 134 child->showTree(highlight, depth + 1); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void HTMLImport::showThis() | 137 void HTMLImport::showThis() |
| 138 { | 138 { |
| 139 fprintf(stderr, "%p state=%d", this, m_state.peekValueForDebug()); | 139 fprintf(stderr, "%p state=%d", this, m_state.peekValueForDebug()); |
| 140 } | 140 } |
| 141 #endif | 141 #endif |
| 142 | 142 |
| 143 } // namespace WebCore | 143 } // namespace WebCore |
| OLD | NEW |