[webkit-dev] DOM tree vs. Render tree
song.7.liu at nokia.com
song.7.liu at nokia.com
Thu Jun 16 16:30:59 PDT 2011
Thanks, but why not generate a tree according to document ang css style at the same time? Or why is the post style decision needed?
Thanks,
Song
-----原信息-----
发自: ext Darin Adler
发送: 2011-06-16, 23:54
To: Liu Song.7 (Nokia-MP/Beijing)
Cc: webkit-dev at lists.webkit.org
主题: Re: [webkit-dev] DOM tree vs. Render tree
On Jun 16, 2011, at 7:21 AM, song.7.liu at nokia.com wrote:
> Could some share what’s the design consideration about the DOM tree and Render tree separation?
CSS styling makes it easy for almost any DOM node to render as almost anything. To give one trivial example, a paragraph element can be turned into a table cell with "display: table-cell" or removed from rendering entirely with "display: none". The main reason to have a separate render tree is that the structure and classes of the render tree nodes can reflect the post-style-computation decisions of what will actually be rendered, which can be quite a bit different from the structure of the document itself. The DOM tree nodes represent the document’s structure.
-- Darin
More information about the webkit-dev
mailing list