mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibHTML: Remove unused LayoutInline::layout()
Inline layout now happens in the containing block, specifically in LayoutBlock::layout_inline_children().
This commit is contained in:
parent
f908a2718a
commit
d68c1effcb
2 changed files with 0 additions and 30 deletions
|
@ -1,4 +1,3 @@
|
|||
#include <LibHTML/DOM/Element.h>
|
||||
#include <LibHTML/Layout/LayoutBlock.h>
|
||||
#include <LibHTML/Layout/LayoutInline.h>
|
||||
|
||||
|
@ -11,32 +10,6 @@ LayoutInline::~LayoutInline()
|
|||
{
|
||||
}
|
||||
|
||||
void LayoutInline::layout()
|
||||
{
|
||||
Point origin;
|
||||
|
||||
if (previous_sibling() != nullptr) {
|
||||
auto& previous_sibling_rect = previous_sibling()->rect();
|
||||
auto& previous_sibling_style = previous_sibling()->style();
|
||||
origin = previous_sibling_rect.location();
|
||||
// FIXME: Implement proper inline positioning when
|
||||
// there are nodes with different heights. And don't
|
||||
// hardcode font size like we do here.
|
||||
origin.move_by(previous_sibling_rect.width(), previous_sibling_rect.height());
|
||||
origin.move_by(previous_sibling_style.full_margin().right, -11);
|
||||
} else {
|
||||
origin = parent()->rect().location();
|
||||
}
|
||||
|
||||
rect().set_location(origin);
|
||||
|
||||
for_each_child([&](auto& child) {
|
||||
child.layout();
|
||||
rect().set_right(child.rect().right() + child.style().full_margin().right);
|
||||
rect().set_bottom(child.rect().bottom() + child.style().full_margin().bottom);
|
||||
});
|
||||
}
|
||||
|
||||
void LayoutInline::split_into_lines(LayoutBlock& container)
|
||||
{
|
||||
for_each_child([&](auto& child) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue