[webkit-dev] WebCore rendering questions

David Hyatt hyatt at apple.com
Tue May 26 12:03:55 PDT 2009

On May 26, 2009, at 1:42 PM, ying lcs wrote:

> Hi,
> In here http://webkit.org/blog/114/webcore-rendering-i-the-basics/, it
> talks about DOM tree and Render tree.
> Can you please tell me does it mean for each DOM element,
> * there will be a Render Object (1-to-1 mapping)?
> What about invisible
> element? e.g. <input type=hidden>

A node can have 0-n renderers.
	0 = the node is display:none or not in the main document's subtree
	1 = the common case
	2-n = the renderer has continuations (a split inline like a <b> or  

> * does each DOM element will have it unique Render object (i.e. no 2
> different element type will be represented by the same render object
> type)? e.g. LI, OL will have their own Render objects?

No.  Many different HTML elements map to the same renderers by  
default.  CSS display most commonly controls what kind of renderer you  
get, so the same kind of DOM element can even have different types of  
renderers depending on what CSS has specified.

(hyatt at apple.com)

More information about the webkit-dev mailing list