| 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 26 matching lines...) Expand all Loading... |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 HTMLImport* HTMLImport::root() | 39 HTMLImport* HTMLImport::root() |
| 40 { | 40 { |
| 41 HTMLImport* i = this; | 41 HTMLImport* i = this; |
| 42 while (i->parent()) | 42 while (i->parent()) |
| 43 i = i->parent(); | 43 i = i->parent(); |
| 44 return i; | 44 return i; |
| 45 } | 45 } |
| 46 | 46 |
| 47 void HTMLImport::appendChild(HTMLImport* child) | 47 bool HTMLImport::precedes(HTMLImport* import) |
| 48 { | 48 { |
| 49 TreeNode<HTMLImport>::appendChild(child); | 49 for (HTMLImport* i = this; i; i = traverseNext(i)) { |
| 50 if (i == import) |
| 51 return true; |
| 52 } |
| 53 |
| 54 return false; |
| 55 } |
| 56 |
| 57 void HTMLImport::appendImport(HTMLImport* child) |
| 58 { |
| 59 appendChild(child); |
| 50 | 60 |
| 51 // This prevents HTML parser from going beyond the | 61 // This prevents HTML parser from going beyond the |
| 52 // blockage line before the precise state is computed by recalcState(). | 62 // blockage line before the precise state is computed by recalcState(). |
| 53 if (child->isSync()) | 63 if (child->isSync()) |
| 54 m_state = HTMLImportState::blockedState(); | 64 m_state = HTMLImportState::blockedState(); |
| 55 | 65 |
| 56 stateWillChange(); | 66 stateWillChange(); |
| 57 } | 67 } |
| 58 | 68 |
| 59 void HTMLImport::stateDidChange() | 69 void HTMLImport::stateDidChange() |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 child->showTree(highlight, depth + 1); | 123 child->showTree(highlight, depth + 1); |
| 114 } | 124 } |
| 115 | 125 |
| 116 void HTMLImport::showThis() | 126 void HTMLImport::showThis() |
| 117 { | 127 { |
| 118 fprintf(stderr, "%p state=%d", this, m_state.peekValueForDebug()); | 128 fprintf(stderr, "%p state=%d", this, m_state.peekValueForDebug()); |
| 119 } | 129 } |
| 120 #endif | 130 #endif |
| 121 | 131 |
| 122 } // namespace WebCore | 132 } // namespace WebCore |
| OLD | NEW |