[webkit-dev] How to find out how many children in a RenderObject

Johnny Ding jnd at chromium.org
Thu Jun 25 23:32:08 PDT 2009


Not sure whether the following way fits your need or not.1. get DOM node
via RenderObject->node();
2. walk through all child nodes of that DOM node via Node interface, such as
(child = node->firstChild(); child; child = child->nextSibling())
3. get child's RenderObject via child->renderer()?


2009/6/26 n179911 <n179911 at gmail.com>

> Can you please tell me how can I find out how many children in a
> RenderObject?
> In RenderObject, I only see these method, I can't find a way which
> return the number of children from a given RenderObject
>
>  RenderObject* childAt(unsigned) const;
>  RenderObject* firstLeafChild() const;
>  RenderObject* lastLeafChild() const;
>
> Thank you.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>



-- 
Best Regards.
Johnny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090626/b7b51b80/attachment.html>


More information about the webkit-dev mailing list