2019-10-03 10:20:13 -03:00
|
|
|
#include <LibHTML/Layout/LayoutBlock.h>
|
2019-06-15 18:41:15 -03:00
|
|
|
#include <LibHTML/Layout/LayoutInline.h>
|
2019-06-15 17:49:44 -03:00
|
|
|
|
2019-10-04 07:12:39 -03:00
|
|
|
LayoutInline::LayoutInline(const Node& node, RefPtr<StyleProperties> style_properties)
|
2019-09-21 09:32:17 -03:00
|
|
|
: LayoutNode(&node, move(style_properties))
|
2019-06-15 17:49:44 -03:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LayoutInline::~LayoutInline()
|
|
|
|
|
{
|
|
|
|
|
}
|
2019-09-25 06:30:13 -03:00
|
|
|
|
2019-10-03 10:20:13 -03:00
|
|
|
void LayoutInline::split_into_lines(LayoutBlock& container)
|
|
|
|
|
{
|
|
|
|
|
for_each_child([&](auto& child) {
|
|
|
|
|
if (child.is_inline()) {
|
|
|
|
|
static_cast<LayoutInline&>(child).split_into_lines(container);
|
|
|
|
|
} else {
|
|
|
|
|
// FIXME: Support block children of inlines.
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|