mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibWeb: Compute element style in Layout::TreeBuilder
Instead of making each Layout::Node compute style for itself, we now compute it in TreeBuilder before even calling create_layout_node(). For non-element DOM nodes, we create the style and layout tree node in TreeBuilder. This allows us to move create_layout_node() from DOM::Node to DOM::Element.
This commit is contained in:
parent
3451673ac8
commit
7e1bf4d300
31 changed files with 48 additions and 91 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
*
|
||||
|
@ -145,11 +145,6 @@ void Node::set_text_content(String const& content)
|
|||
set_needs_style_update(true);
|
||||
}
|
||||
|
||||
RefPtr<Layout::Node> Node::create_layout_node()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Node::invalidate_style()
|
||||
{
|
||||
for_each_in_inclusive_subtree_of_type<Element>([&](auto& element) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue