void ChildListMutationAccumulator::leaveMutationScope() { ASSERT(m_mutationScopes > 0); if (!--m_mutationScopes) { if (!isEmpty()) enqueueMutationRecord(); accumulatorMap().remove(m_target.get()); } }
void ChildListMutationAccumulator::childAdded(PassRefPtr<Node> prpChild) { ASSERT(hasObservers()); RefPtr<Node> child = prpChild; if (!isAddedNodeInOrder(child.get())) enqueueMutationRecord(); if (isEmpty()) { m_previousSibling = child->previousSibling(); m_nextSibling = child->nextSibling(); } m_lastAdded = child.get(); m_addedNodes.append(child.release()); }
void ChildListMutationAccumulator::childAdded(Node& childRef) { ASSERT(hasObservers()); Ref<Node> child(childRef); if (!isAddedNodeInOrder(child.get())) enqueueMutationRecord(); if (isEmpty()) { m_previousSibling = child->previousSibling(); m_nextSibling = child->nextSibling(); } m_lastAdded = &child.get(); m_addedNodes.append(child.get()); }
ChildListMutationAccumulator::~ChildListMutationAccumulator() { if (!isEmpty()) enqueueMutationRecord(); accumulatorMap().remove(&m_target.get()); }