LibWeb: Return Web::CSS::Selector::pseudo_element by reference

This avoids many allocations and deallocations.
This commit is contained in:
Jonne Ransijn 2024-10-27 01:12:09 +02:00 committed by Andreas Kling
parent 5d7a7a43c4
commit 8409178a11
Notes: github-actions[bot] 2024-10-27 08:34:13 +00:00

View file

@ -243,7 +243,7 @@ public:
~Selector() = default;
Vector<CompoundSelector> const& compound_selectors() const { return m_compound_selectors; }
Optional<PseudoElement> pseudo_element() const { return m_pseudo_element; }
Optional<PseudoElement> const& pseudo_element() const { return m_pseudo_element; }
NonnullRefPtr<Selector> relative_to(SimpleSelector const&) const;
bool contains_the_nesting_selector() const { return m_contains_the_nesting_selector; }
NonnullRefPtr<Selector> absolutized(SimpleSelector const& selector_for_nesting) const;