diff options
author | Iain Merrick <husky@google.com> | 2010-09-13 16:35:48 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-09-16 12:10:42 +0100 |
commit | 5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch) | |
tree | ddce1aa5e3b6967a69691892e500897558ff8ab6 /WebCore/dom/ContainerNode.cpp | |
parent | 12bec63ec71e46baba27f0bd9bd9d8067683690a (diff) | |
download | external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2 |
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebCore/dom/ContainerNode.cpp')
-rw-r--r-- | WebCore/dom/ContainerNode.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/WebCore/dom/ContainerNode.cpp b/WebCore/dom/ContainerNode.cpp index 064d4e5..46de749 100644 --- a/WebCore/dom/ContainerNode.cpp +++ b/WebCore/dom/ContainerNode.cpp @@ -151,6 +151,8 @@ bool ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce if (child->parentNode()) break; + InspectorController::willInsertDOMNode(child, this); + insertBeforeCommon(next.get(), child); // Send notification about the children change. @@ -218,6 +220,8 @@ void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node* nextChil for (NodeVector::const_iterator it = targets.begin(); it != targets.end(); ++it) { Node* child = it->get(); + InspectorController::willInsertDOMNode(child, this); + insertBeforeCommon(next.get(), child); childrenChanged(true, nextChildPreviousSibling.get(), nextChild, 1); @@ -291,6 +295,8 @@ bool ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce ASSERT(!child->nextSibling()); ASSERT(!child->previousSibling()); + InspectorController::willInsertDOMNode(child.get(), this); + // Add child after "prev". forbidEventDispatch(); Node* next; @@ -572,6 +578,8 @@ bool ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionCode& ec, bo break; } + InspectorController::willInsertDOMNode(child, this); + // Append child to the end of the list forbidEventDispatch(); child->setParent(this); @@ -610,6 +618,8 @@ void ContainerNode::parserAddChild(PassRefPtr<Node> newChild) ASSERT(newChild); ASSERT(!newChild->parent()); // Use appendChild if you need to handle reparenting (and want DOM mutation events). + InspectorController::willInsertDOMNode(newChild.get(), this); + forbidEventDispatch(); Node* last = m_lastChild; // FIXME: This method should take a PassRefPtr. @@ -981,12 +991,7 @@ static void notifyChildInserted(Node* child) { ASSERT(!eventDispatchForbidden()); -#if ENABLE(INSPECTOR) - if (Page* page = child->document()->page()) { - if (InspectorController* inspectorController = page->inspectorController()) - inspectorController->didInsertDOMNode(child); - } -#endif + InspectorController::didInsertDOMNode(child); RefPtr<Node> c = child; RefPtr<Document> document = child->document(); @@ -1020,12 +1025,7 @@ static void dispatchChildRemovalEvents(Node* child) { ASSERT(!eventDispatchForbidden()); -#if ENABLE(INSPECTOR) - if (Page* page = child->document()->page()) { - if (InspectorController* inspectorController = page->inspectorController()) - inspectorController->didRemoveDOMNode(child); - } -#endif + InspectorController::willRemoveDOMNode(child); RefPtr<Node> c = child; RefPtr<Document> document = child->document(); |