| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 | 213 |
| 214 inline void ChildNodeInsertionNotifier::notify(Node* node) | 214 inline void ChildNodeInsertionNotifier::notify(Node* node) |
| 215 { | 215 { |
| 216 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); | 216 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); |
| 217 | 217 |
| 218 InspectorInstrumentation::didInsertDOMNode(node->document(), node); | 218 InspectorInstrumentation::didInsertDOMNode(node->document(), node); |
| 219 | 219 |
| 220 RefPtr<Document> protectDocument(node->document()); | 220 RefPtr<Document> protectDocument(node->document()); |
| 221 RefPtr<Node> protectNode(node); | 221 RefPtr<Node> protectNode(node); |
| 222 InsertionCallbackDeferer insertionCallbackDeferer; | |
| 223 | 222 |
| 224 if (m_insertionPoint->inDocument()) | 223 if (m_insertionPoint->inDocument()) |
| 225 notifyNodeInsertedIntoDocument(node); | 224 notifyNodeInsertedIntoDocument(node); |
| 226 else if (node->isContainerNode()) | 225 else if (node->isContainerNode()) |
| 227 notifyNodeInsertedIntoTree(toContainerNode(node)); | 226 notifyNodeInsertedIntoTree(toContainerNode(node)); |
| 228 | 227 |
| 229 for (size_t i = m_postInsertionNotificationTargets.size(); i; --i) | 228 for (size_t i = 0; i < m_postInsertionNotificationTargets.size(); ++i) |
| 230 m_postInsertionNotificationTargets[i - 1]->didNotifySubtreeInsertions(m_
insertionPoint); | 229 m_postInsertionNotificationTargets[i]->didNotifySubtreeInsertions(m_inse
rtionPoint); |
| 231 } | 230 } |
| 232 | 231 |
| 233 | 232 |
| 234 inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument(Node* node) | 233 inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument(Node* node) |
| 235 { | 234 { |
| 236 ASSERT(m_insertionPoint->inDocument()); | 235 ASSERT(m_insertionPoint->inDocument()); |
| 237 node->removedFrom(m_insertionPoint); | 236 node->removedFrom(m_insertionPoint); |
| 238 | 237 |
| 239 if (node->isContainerNode()) | 238 if (node->isContainerNode()) |
| 240 notifyDescendantRemovedFromDocument(toContainerNode(node)); | 239 notifyDescendantRemovedFromDocument(toContainerNode(node)); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 for (Node* child = m_root->firstChild(); child; child = child->nextSibli
ng()) | 330 for (Node* child = m_root->firstChild(); child; child = child->nextSibli
ng()) |
| 332 collectFrameOwners(child); | 331 collectFrameOwners(child); |
| 333 } | 332 } |
| 334 | 333 |
| 335 disconnectCollectedFrameOwners(); | 334 disconnectCollectedFrameOwners(); |
| 336 } | 335 } |
| 337 | 336 |
| 338 } // namespace WebCore | 337 } // namespace WebCore |
| 339 | 338 |
| 340 #endif // ContainerNodeAlgorithms_h | 339 #endif // ContainerNodeAlgorithms_h |
| OLD | NEW |