[webkit-dev] Dimension of Render Containers

David Hyatt hyatt at apple.com
Thu Jun 25 18:36:24 PDT 2009


On Jun 25, 2009, at 11:50 AM, n179911 wrote:

> Hi,
>
> Does the dimension (width X height) of Render Containers (e.g.
> RenderBlock, RenderTableRow, RenderTableCell) always encompass all its
> children?
>
> For example,
> The Render Block is 145 x 14 which encompasses its children
> RenderInline (145x12), RenderText (145x12)
>
> RenderBlock (floating) {DIV} at (458,5) size 145x14 [color=#CCCCCC]
> {467.00,212.00}
>             RenderInline {A} at (0,0) size 145x12 [color=#004276]
> {467.00,212.00}
>                        RenderText {#text} at (0,1) size 145x12  
> {467.00,212.00}
>                          text run at (0,1) width 145: "Make CNN Your  
> Home Page"
>
> Is this always the case? Or there are exceptions to such rule?
> e.g. nested DIV Tags, does the outermost DIV Tag encompasses the inner
> one and and the inner one encompasses the one inside it?

No.  For blocks for example, the width and height is just the border  
box.  Child content can spill outside of this box.



More information about the webkit-dev mailing list