Index: Source/WebCore/dom/ContainerNodeAlgorithms.h |
=================================================================== |
--- Source/WebCore/dom/ContainerNodeAlgorithms.h (revision 126676) |
+++ Source/WebCore/dom/ContainerNodeAlgorithms.h (working copy) |
@@ -46,6 +46,7 @@ |
void notifyNodeInsertedIntoTree(ContainerNode*); |
ContainerNode* m_insertionPoint; |
+ Vector< RefPtr<Node> > m_postInsertionNotificationTargets; |
}; |
class ChildNodeRemovalNotifier { |
@@ -197,8 +198,16 @@ |
if (node->isContainerNode()) |
notifyDescendantInsertedIntoDocument(toContainerNode(node)); |
- if (request == Node::InsertionShouldCallDidNotifyDescendantInsertions) |
+ switch (request) { |
+ case Node::InsertionDone: |
+ break; |
+ case Node::InsertionShouldCallDidNotifyDescendantInsertions: |
node->didNotifyDescendantInsertions(m_insertionPoint); |
+ break; |
+ case Node::InsertionShouldCallDidNotifySubtreeInsertions: |
+ m_postInsertionNotificationTargets.append(node); |
+ break; |
+ } |
} |
inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree(ContainerNode* node) |
@@ -235,6 +244,9 @@ |
notifyNodeInsertedIntoDocument(node); |
else if (node->isContainerNode()) |
notifyNodeInsertedIntoTree(toContainerNode(node)); |
+ |
+ for (size_t i = 0; i < m_postInsertionNotificationTargets.size(); ++i) |
+ m_postInsertionNotificationTargets[i]->didNotifySubtreeInsertions(m_insertionPoint); |
} |