mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
LibHTML: Refactor to go from DOM -> styled tree -> layout tree.
Frame::layout() drives everything now, it takes the DOM contained in the frame and puts it through the tree transformations.
This commit is contained in:
@@ -62,18 +62,3 @@ bool Element::has_class(const StringView& class_name) const
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
RefPtr<LayoutNode> Element::create_layout_node()
|
||||
{
|
||||
if (m_tag_name == "html")
|
||||
return adopt(*new LayoutBlock(*this));
|
||||
if (m_tag_name == "body")
|
||||
return adopt(*new LayoutBlock(*this));
|
||||
if (m_tag_name == "h1")
|
||||
return adopt(*new LayoutBlock(*this));
|
||||
if (m_tag_name == "p")
|
||||
return adopt(*new LayoutBlock(*this));
|
||||
if (m_tag_name == "b")
|
||||
return adopt(*new LayoutInline(*this));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user