summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/DOM/Node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibHTML/DOM/Node.cpp')
-rw-r--r--Libraries/LibHTML/DOM/Node.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/Libraries/LibHTML/DOM/Node.cpp b/Libraries/LibHTML/DOM/Node.cpp
index 5bfa99895f..700a26bcd7 100644
--- a/Libraries/LibHTML/DOM/Node.cpp
+++ b/Libraries/LibHTML/DOM/Node.cpp
@@ -19,31 +19,6 @@ Node::~Node()
{
}
-RefPtr<LayoutNode> Node::create_layout_node(const StyleResolver& resolver, const StyleProperties* parent_properties) const
-{
- if (is_document())
- return adopt(*new LayoutDocument(static_cast<const Document&>(*this), StyleProperties::create()));
-
- if (is_text())
- return adopt(*new LayoutText(static_cast<const Text&>(*this)));
-
- ASSERT(is_element());
-
- auto style_properties = resolver.resolve_style(static_cast<const Element&>(*this), parent_properties);
-
- auto display_property = style_properties->property("display");
- String display = display_property.has_value() ? display_property.release_value()->to_string() : "inline";
-
- if (display == "none")
- return nullptr;
- if (display == "block" || display == "list-item")
- return adopt(*new LayoutBlock(this, move(style_properties)));
- if (display == "inline")
- return adopt(*new LayoutInline(*this, move(style_properties)));
-
- ASSERT_NOT_REACHED();
-}
-
RefPtr<LayoutNode> Node::create_layout_tree(const StyleResolver& resolver, const StyleProperties* parent_properties) const
{
auto layout_node = create_layout_node(resolver, parent_properties);