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

LibWeb: Use HashMap::try_ensure_capacity in StyleComputer

This commit is contained in:
Thomas Queiroz 2022-12-06 03:08:20 -03:00 committed by Andreas Kling
parent 6debd967ba
commit eacfcac932
7 changed files with 53 additions and 33 deletions

View file

@ -24,7 +24,7 @@ private:
bool has_svg_root = false;
};
void create_layout_tree(DOM::Node&, Context&);
ErrorOr<void> create_layout_tree(DOM::Node&, Context&);
void push_parent(Layout::NodeWithStyle& node) { m_ancestor_stack.append(node); }
void pop_parent() { m_ancestor_stack.take_last(); }
@ -45,7 +45,7 @@ private:
Prepend,
};
void insert_node_into_inline_or_block_ancestor(Layout::Node&, CSS::Display, AppendOrPrepend);
void create_pseudo_element_if_needed(DOM::Element&, CSS::Selector::PseudoElement, AppendOrPrepend);
ErrorOr<void> create_pseudo_element_if_needed(DOM::Element&, CSS::Selector::PseudoElement, AppendOrPrepend);
JS::GCPtr<Layout::Node> m_layout_root;
Vector<Layout::NodeWithStyle&> m_ancestor_stack;