[webkit-dev] Dimension of Render Containers

n179911 n179911 at gmail.com
Thu Jun 25 11:11:42 PDT 2009


On Thu, Jun 25, 2009 at 9:50 AM, n179911<n179911 at gmail.com> 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?
>
> Thank you.
>
I found a case which does not follow this rule (The Render container
encompasses its children dimension:

RenderBlock (anonymous) at (2,0) size 980x0 {11.00,147.00}
                      RenderInline {A} at (0,0) size 0x0
[color=#004276] {11.00,147.00}
                        RenderImage {IMG} at (956,0) size 24x27 {967.00,147.00}


The container is 980x0, but it has a child 24x27.

Not sure if the RenderBlock is 'anonymous' (like in this case) means
it break such rule.


More information about the webkit-dev mailing list