mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +00:00
LibWeb: Use HashMap::try_ensure_capacity in StyleComputer
This commit is contained in:
parent
6debd967ba
commit
eacfcac932
7 changed files with 53 additions and 33 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue