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