Hi Giri,
WebKit creates shadow nodes for many of the form controls. As you
noticed, these nodes are not visible from the DOM, but the renderers
for those nodes can be traversed in the render tree. For example, a
text field or text area has a shadow DOM that contains all the text
inside the control. A file upload control has a shadow nodes for
the "choose file" button. This is just a way for WebKit to build
elements using HTML without exposing the internal details to web
content.
- Adele
On Oct 23, 2008, at 6:22 PM, Giri Rao wrote:
Hi,
I am running into a bit of a problem, let me try and explain the
best I can:
I am traversing RenderObject tree in webkit. I notice that there
are certain nodes (accessed using render_object->node()) which are
shadow nodes (node->isShadow() returns true). I note down the
address of one such node, lets say the address is 100. The node
name of this node is "DIV"
Now, I traverse the dom tree using Node, for each node I note down
the node's address. I am noticing that I am not seeing any nodes
while traversing the dom tree whose address is 100.
So two questions:
1. Why would webkit create a node which is not part of the dom tree?
2. What are shadow nodes?
Any insight is appreciated.
Thanks
Giri _______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev