2019-10-03 15:20:13 +02:00
|
|
|
#include <LibHTML/Layout/LayoutBlock.h>
|
2019-06-15 23:41:15 +02:00
|
|
|
#include <LibHTML/Layout/LayoutInline.h>
|
2019-06-15 22:49:44 +02:00
|
|
|
|
2019-10-04 12:12:39 +02:00
|
|
|
LayoutInline::LayoutInline(const Node& node, RefPtr<StyleProperties> style_properties)
|
2019-09-21 15:32:17 +03:00
|
|
|
: LayoutNode(&node, move(style_properties))
|
2019-06-15 22:49:44 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LayoutInline::~LayoutInline()
|
|
|
|
|
{
|
|
|
|
|
}
|
2019-09-25 12:30:13 +03:00
|
|
|
|
2019-10-03 15:20:13 +02: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.
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|