LibWeb: Make CSS::Selector reference counted

The end goal is to make the PseudoClass::not_selector be a Selector
instead of a String that is repeatedly re-parsed. But since Selector
contains a Vector of ComplexSelectors, which each have a Vector of
SimpleSelectors, it's probably a good idea to not be passing them
around by value anyway. :^)
This commit is contained in:
Sam Atkins 2021-07-12 17:30:40 +01:00 committed by Andreas Kling
commit 776b1f4548
Notes: sideshowbarker 2024-07-18 09:04:14 +09:00
9 changed files with 48 additions and 38 deletions

View file

@ -8,7 +8,7 @@
namespace Web::CSS {
CSSStyleRule::CSSStyleRule(Vector<Selector>&& selectors, NonnullRefPtr<CSSStyleDeclaration>&& declaration)
CSSStyleRule::CSSStyleRule(NonnullRefPtrVector<Selector>&& selectors, NonnullRefPtr<CSSStyleDeclaration>&& declaration)
: m_selectors(move(selectors))
, m_declaration(move(declaration))
{