コード例 #1
0
void RemoteScrollingTreeTextStream::dump(const ScrollingStateTree& stateTree, bool changedPropertiesOnly)
{
    RemoteScrollingTreeTextStream& ts = *this;

    dumpProperty(ts, "has changed properties", stateTree.hasChangedProperties());
    dumpProperty(ts, "has new root node", stateTree.hasNewRootStateNode());

    if (stateTree.rootStateNode())
        recursiveDumpNodes(*stateTree.rootStateNode(), changedPropertiesOnly);

    if (!stateTree.removedNodes().isEmpty())
        dumpProperty<Vector<ScrollingNodeID>>(ts, "removed-nodes", stateTree.removedNodes());
}
コード例 #2
0
ファイル: ScrollingTree.cpp プロジェクト: cheekiatng/webkit
void ScrollingTree::removeDestroyedNodes(const ScrollingStateTree& stateTree)
{
    for (const auto& removedNodeID : stateTree.removedNodes()) {
        m_nodeMap.remove(removedNodeID);
        if (removedNodeID == m_latchedNode)
            clearLatchedNode();
    }
}
コード例 #3
0
void ScrollingTree::removeDestroyedNodes(const ScrollingStateTree& stateTree)
{
    for (const auto& removedNode : stateTree.removedNodes()) {
        ScrollingTreeNode* node = m_nodeMap.take(removedNode);
        if (!node)
            continue;

        if (node->scrollingNodeID() == m_latchedNode)
            clearLatchedNode();

        // Never destroy the root node. There will be a new root node in the state tree, and we will
        // associate it with our existing root node in updateTreeFromStateNode().
        if (node->parent())
            m_rootNode->removeChild(node);
    }
}