mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27:35 +00:00
LibWeb: Remove unnecessary ErrorOr<> from StyleComputer
All of this error propogation came from a single call to HashMap::try_ensure_capacity! As part of the ongoing effort to ignore small allocation failures, lets just assert this works. This has the nice side-effect of propogating out to a few other classes.
This commit is contained in:
parent
a511f1ef85
commit
1ca31e0dc1
7 changed files with 45 additions and 65 deletions
|
@ -27,7 +27,7 @@ private:
|
|||
|
||||
i32 calculate_list_item_index(DOM::Node&);
|
||||
|
||||
ErrorOr<void> create_layout_tree(DOM::Node&, Context&);
|
||||
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(); }
|
||||
|
@ -49,7 +49,7 @@ private:
|
|||
Prepend,
|
||||
};
|
||||
void insert_node_into_inline_or_block_ancestor(Layout::Node&, CSS::Display, AppendOrPrepend);
|
||||
ErrorOr<void> create_pseudo_element_if_needed(DOM::Element&, CSS::Selector::PseudoElement::Type, AppendOrPrepend);
|
||||
void create_pseudo_element_if_needed(DOM::Element&, CSS::Selector::PseudoElement::Type, AppendOrPrepend);
|
||||
|
||||
JS::GCPtr<Layout::Node> m_layout_root;
|
||||
Vector<JS::NonnullGCPtr<Layout::NodeWithStyle>> m_ancestor_stack;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue