RenderObject* element = new RenderObject(); element->setChildrenInline(true); RenderObject* child1 = new RenderText("This is some text"); RenderObject* child2 = new RenderText("This is some more text"); element->addChild(child1); element->addChild(child2);
RenderObject* element = new RenderObject(); element->setChildrenInline(false); RenderObject* child1 = new RenderBlock(); RenderObject* child2 = new RenderBlock(); element->addChild(child1); element->addChild(child2);In this example, the "childrenInline" property of the parent element "element" is set to "false." This means that the child elements ("child1" and "child2") will be treated as block elements and will cause a line break. Package Library: These examples are from the WebKit package/library.