summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/ContainerNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/dom/ContainerNode.cpp')
-rw-r--r--WebCore/dom/ContainerNode.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/WebCore/dom/ContainerNode.cpp b/WebCore/dom/ContainerNode.cpp
index 2d79156..569756c 100644
--- a/WebCore/dom/ContainerNode.cpp
+++ b/WebCore/dom/ContainerNode.cpp
@@ -869,16 +869,16 @@ static void dispatchChildInsertionEvents(Node* child, ExceptionCode& ec)
ASSERT(!eventDispatchForbidden());
RefPtr<Node> c = child;
- DocPtr<Document> doc = child->document();
+ RefPtr<Document> document = child->document();
if (c->parentNode() && c->parentNode()->inDocument())
c->insertedIntoDocument();
else
c->insertedIntoTree(true);
- doc->incDOMTreeVersion();
+ document->incDOMTreeVersion();
- if (c->parentNode() && doc->hasListenerType(Document::DOMNODEINSERTED_LISTENER)) {
+ if (c->parentNode() && document->hasListenerType(Document::DOMNODEINSERTED_LISTENER)) {
ec = 0;
c->dispatchMutationEvent(eventNames().DOMNodeInsertedEvent, true, c->parentNode(), String(), String(), ec);
if (ec)
@@ -886,27 +886,28 @@ static void dispatchChildInsertionEvents(Node* child, ExceptionCode& ec)
}
// dispatch the DOMNodeInsertedIntoDocument event to all descendants
- if (c->inDocument() && doc->hasListenerType(Document::DOMNODEINSERTEDINTODOCUMENT_LISTENER))
+ if (c->inDocument() && document->hasListenerType(Document::DOMNODEINSERTEDINTODOCUMENT_LISTENER)) {
for (; c; c = c->traverseNextNode(child)) {
ec = 0;
c->dispatchMutationEvent(eventNames().DOMNodeInsertedIntoDocumentEvent, false, 0, String(), String(), ec);
if (ec)
return;
}
+ }
}
static void dispatchChildRemovalEvents(Node* child, ExceptionCode& ec)
{
RefPtr<Node> c = child;
- DocPtr<Document> doc = child->document();
+ RefPtr<Document> document = child->document();
// update auxiliary doc info (e.g. iterators) to note that node is being removed
- doc->nodeWillBeRemoved(child);
+ document->nodeWillBeRemoved(child);
- doc->incDOMTreeVersion();
+ document->incDOMTreeVersion();
// dispatch pre-removal mutation events
- if (c->parentNode() && doc->hasListenerType(Document::DOMNODEREMOVED_LISTENER)) {
+ if (c->parentNode() && document->hasListenerType(Document::DOMNODEREMOVED_LISTENER)) {
ec = 0;
c->dispatchMutationEvent(eventNames().DOMNodeRemovedEvent, true, c->parentNode(), String(), String(), ec);
if (ec)
@@ -914,7 +915,7 @@ static void dispatchChildRemovalEvents(Node* child, ExceptionCode& ec)
}
// dispatch the DOMNodeRemovedFromDocument event to all descendants
- if (c->inDocument() && doc->hasListenerType(Document::DOMNODEREMOVEDFROMDOCUMENT_LISTENER))
+ if (c->inDocument() && document->hasListenerType(Document::DOMNODEREMOVEDFROMDOCUMENT_LISTENER))
for (; c; c = c->traverseNextNode(child)) {
ec = 0;
c->dispatchMutationEvent(eventNames().DOMNodeRemovedFromDocumentEvent, false, 0, String(), String(), ec);