예제 #1
0
void ChildListMutationAccumulator::leaveMutationScope()
{
    ASSERT(m_mutationScopes > 0);
    if (!--m_mutationScopes) {
        if (!isEmpty())
            enqueueMutationRecord();
        accumulatorMap().remove(m_target.get());
    }
}
예제 #2
0
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());
}
예제 #3
0
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());
}
예제 #4
0
ChildListMutationAccumulator::~ChildListMutationAccumulator()
{
    if (!isEmpty())
        enqueueMutationRecord();
    accumulatorMap().remove(&m_target.get());
}