Bug 133051 - document RenderObject::childrenInline
Summary: document RenderObject::childrenInline
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-18 10:33 PDT by Jarek Czekalski
Modified: 2014-05-26 12:50 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarek Czekalski 2014-05-18 10:33:02 PDT
Could you document what is the exact meaning of WebCore::RenderObject::childrenInline information? This flag seems to be crucial for some parts, for example atk accessibility wrapper depends on it. I would expect this documentation to go before function declaration in RenderObject.h.

Makes sense?
Comment 1 Jarek Czekalski 2014-05-26 12:50:07 PDT
You think it's a trivial question? Here is an interesting example I think:

  0B_RenderBlock {HTML} at (0,0) size 800x600
    0B_RenderBody {BODY} at (8,8) size 784x584
      1B_RenderBlock {DIV} at (0,0) size 784x18
        1I_RenderInline {A} at (0,0) size 24x17 [color=#0000EE]
          0B_RenderText {#text} at (0,0) size 24x17
            text run at (0,0) width 24: "link"

This is a simple div with a link inside. Number prefix is equal to childrenInline(), the letter is taken from isRenderInline() fun. So for the render {A} object childrenInline() holds true, despite it having a single child which is not inline.

I was close to formulating a clean description for childrenInline function whichw would be:

Returns true when object has at least one child and all children are inline.
Returns false when object has no children or all are not inline.
An object can never have mixed block and inline children.

But now I am confused again. RenderInline seems to be some exception to the above rule. And actually an exception to a default meaning of "childrenInline" name.