From 5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 Mon Sep 17 00:00:00 2001 From: Iain Merrick Date: Mon, 13 Sep 2010 16:35:48 +0100 Subject: Merge WebKit at r67178 : Initial merge by git. Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18 --- WebCore/dom/ContainerNode.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'WebCore/dom/ContainerNode.cpp') 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 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 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 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 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 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 c = child; RefPtr 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 c = child; RefPtr document = child->document(); -- cgit v1.1