Antônio Gomes wrote:
1) during/after finished the loading of a webpage, it is mapped to a DOM TREE to be rendered, right ?
It's not mapped, it _is_ a DOM tree. But the DOM is not what's rendered.
2) and the algorithm used for rendering must walk though this dom tree , right ?!
No, the rendering algorithm walks the layout object tree, which is constructed from the DOM tree. And it doesn't walk the whole thing in order, since that wouldn't work with z-index...
3) if so, I would make some changes on it, making good use of this walking. Actually, during this walking, I will just compare if the current node
The layout objects do not map 1-1 to nodes. It's actually a many-many relationship, in general.
** Does my rationale make sense to you ?
Sort of, yes.
** if so, where I can find (in the sourcebase) the algorithm responsible for providing this walk-though the main dom tree of a webpage ?
I hope my explanation makes it clear that there is no such thing.
** in the worse case (I am totally wrong), what can I do ?
I still suggest using a treewalker or nodeiterator. Or caching your list of relevant DOM nodes and invalidating the cache on DOM mutations as needed.
-Boris _______________________________________________ mozilla-layout mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-layout
