X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebCore%2Fdom%2FContainerNode.h;h=970836bd63871e018ad285d0d2037acb3094bcdb;hp=e629e71eb789539fd9ce41bd3f606ac0795958e7;hb=9a76ee0907c687888b3feb3b7123f5071047ff3b;hpb=c00c67852574638589beb646b39542956b9b858a diff --git a/Source/WebCore/dom/ContainerNode.h b/Source/WebCore/dom/ContainerNode.h index e629e71eb789..970836bd6387 100644 --- a/Source/WebCore/dom/ContainerNode.h +++ b/Source/WebCore/dom/ContainerNode.h @@ -227,6 +227,15 @@ inline Node* Node::lastChild() const return toContainerNode(this)->lastChild(); } +typedef Vector, 11> NodeVector; + +inline void getChildNodes(Node* node, NodeVector& nodes) +{ + ASSERT(!nodes.size()); + for (Node* child = node->firstChild(); child; child = child->nextSibling()) + nodes.append(child); +} + } // namespace WebCore #endif // ContainerNode_h