1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibWeb: Move DOM classes into the Web::DOM namespace

LibWeb keeps growing and the Web namespace is filling up fast.
Let's put DOM stuff into Web::DOM, just like we already started doing
with SVG stuff in Web::SVG.
This commit is contained in:
Andreas Kling 2020-07-26 19:37:56 +02:00
parent 96d13f75cf
commit 11ff9d0f17
178 changed files with 516 additions and 523 deletions

View file

@ -37,7 +37,7 @@ LayoutTreeBuilder::LayoutTreeBuilder()
{
}
static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties* parent_style)
static RefPtr<LayoutNode> create_layout_tree(DOM::Node& node, const StyleProperties* parent_style)
{
auto layout_node = node.create_layout_node(parent_style);
if (!layout_node)
@ -50,7 +50,7 @@ static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties*
bool have_inline_children = false;
bool have_noninline_children = false;
downcast<ParentNode>(node).for_each_child([&](Node& child) {
downcast<DOM::ParentNode>(node).for_each_child([&](DOM::Node& child) {
auto layout_child = create_layout_tree(child, &layout_node->specified_style());
if (!layout_child)
return;
@ -77,9 +77,9 @@ static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties*
return layout_node;
}
RefPtr<LayoutNode> LayoutTreeBuilder::build(Node& node)
RefPtr<LayoutNode> LayoutTreeBuilder::build(DOM::Node& node)
{
if (!is<Document>(node) && node.has_children()) {
if (!is<DOM::Document>(node) && node.has_children()) {
dbg() << "FIXME: Support building partial layout trees.";
return nullptr;
}