2019-06-15 18:41:15 -03:00
|
|
|
#include <LibHTML/DOM/Element.h>
|
|
|
|
|
#include <LibHTML/Layout/LayoutBlock.h>
|
2019-06-15 17:49:44 -03:00
|
|
|
|
2019-07-08 12:42:23 -03:00
|
|
|
LayoutBlock::LayoutBlock(const Node* node, const StyledNode* styled_node)
|
|
|
|
|
: LayoutNode(node, styled_node)
|
2019-06-15 17:49:44 -03:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LayoutBlock::~LayoutBlock()
|
|
|
|
|
{
|
|
|
|
|
}
|
2019-06-20 18:00:26 -03:00
|
|
|
|
2019-07-08 12:42:23 -03:00
|
|
|
LayoutNode& LayoutBlock::inline_wrapper()
|
|
|
|
|
{
|
|
|
|
|
if (!last_child() || !last_child()->is_block()) {
|
|
|
|
|
append_child(adopt(*new LayoutBlock(nullptr, nullptr)));
|
|
|
|
|
}
|
|
|
|
|
return *last_child();
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-20 18:00:26 -03:00
|
|
|
void LayoutBlock::layout()
|
|
|
|
|
{
|
2019-07-01 02:28:37 -03:00
|
|
|
compute_width();
|
|
|
|
|
|
2019-06-20 18:00:26 -03:00
|
|
|
LayoutNode::layout();
|
|
|
|
|
|
2019-07-01 02:28:37 -03:00
|
|
|
compute_height();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LayoutBlock::compute_width()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LayoutBlock::compute_height()
|
|
|
|
|
{
|
2019-06-20 18:00:26 -03:00
|
|
|
}
|