
This patch adds parsing of <img> into HTMLImageElement objects. It also adds LayoutImage and its parent class LayoutReplaced, which is going to represent CSS "replaced elements."
23 lines
581 B
C++
23 lines
581 B
C++
#include <LibHTML/Layout/LayoutBlock.h>
|
|
#include <LibHTML/Layout/LayoutInline.h>
|
|
|
|
LayoutInline::LayoutInline(const Node& node, RefPtr<StyleProperties> style_properties)
|
|
: LayoutNode(&node, move(style_properties))
|
|
{
|
|
set_inline(true);
|
|
}
|
|
|
|
LayoutInline::~LayoutInline()
|
|
{
|
|
}
|
|
|
|
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.
|
|
}
|
|
});
|
|
}
|