[webkit-dev] DOM tree vs. Render tree
darin at apple.com
Thu Jun 16 08:53:55 PDT 2011
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.
More information about the webkit-dev