Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: Source/WebCore/dom/ContainerNodeAlgorithms.h

Issue 10875067: Merge 126131 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/frames/iframe-onload-and-domnodeinserted-expected.txt ('k') | Source/WebCore/dom/Node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « LayoutTests/fast/frames/iframe-onload-and-domnodeinserted-expected.txt ('k') | Source/WebCore/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698