1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:07:45 +00:00

LibWeb: Split out helper functions in TreeBuilder::create_layout_tree()

Let's make this function a little easier to understand by splitting out
helpers into separate functions.
This commit is contained in:
Andreas Kling 2022-10-06 13:10:03 +02:00
parent 1e26d3d02d
commit 4fdfaff4ca
2 changed files with 76 additions and 64 deletions

View file

@ -40,6 +40,13 @@ private:
void generate_missing_child_wrappers(NodeWithStyle& root);
void generate_missing_parents(NodeWithStyle& root);
enum class AppendOrPrepend {
Append,
Prepend,
};
void insert_node_into_inline_or_block_ancestor(Layout::Node&, AppendOrPrepend);
RefPtr<Layout::Node> create_pseudo_element_if_needed(DOM::Element&, CSS::Selector::PseudoElement);
RefPtr<Layout::Node> m_layout_root;
Vector<Layout::NodeWithStyle&> m_ancestor_stack;
};