| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 n->m_deletionHasBegun = true; | 128 n->m_deletionHasBegun = true; |
| 129 #endif | 129 #endif |
| 130 // Add the node to the list of nodes to be deleted. | 130 // Add the node to the list of nodes to be deleted. |
| 131 // Reuse the nextSibling pointer for this purpose. | 131 // Reuse the nextSibling pointer for this purpose. |
| 132 if (tail) | 132 if (tail) |
| 133 tail->setNextSibling(n); | 133 tail->setNextSibling(n); |
| 134 else | 134 else |
| 135 head = n; | 135 head = n; |
| 136 | 136 |
| 137 tail = n; | 137 tail = n; |
| 138 } else | 138 } else { |
| 139 RefPtr<GenericNode> protect(n); // removedFromDocument may remov
e remove all references to this node. |
| 139 NodeRemovalDispatcher<GenericNode, ShouldDispatchRemovalNotifica
tion<GenericNode>::value>::dispatch(n); | 140 NodeRemovalDispatcher<GenericNode, ShouldDispatchRemovalNotifica
tion<GenericNode>::value>::dispatch(n); |
| 141 } |
| 140 } | 142 } |
| 141 | 143 |
| 142 container->setFirstChild(0); | 144 container->setFirstChild(0); |
| 143 container->setLastChild(0); | 145 container->setLastChild(0); |
| 144 } | 146 } |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 } // namespace WebCore | 149 } // namespace WebCore |
| 148 | 150 |
| 149 #endif // ContainerNodeAlgorithms_h | 151 #endif // ContainerNodeAlgorithms_h |
| OLD | NEW |