[webkit-help] how webkit store root of dom tree

Eric Zhou englefly at gmail.com
Thu Jun 24 03:40:40 PDT 2010


Hi all,

After parsing html, webkit should maintain a pointer pointing to the root of
dom tree. I followed the parsing process, but the clue is broken at
HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State
state) --- in file htmlTokenizer.cpp.

To summarize this function:

HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State
state)
{
...
RefPtr<Node> n = processToken();
...
}

where the "n" is the root node of dom tree. but after this "n" is not
pointed by any other pointer and not passed out of this function.
My question is how webkit get the root of dom tree after this function?

Best regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100624/b61b9b14/attachment.html>


More information about the webkit-help mailing list