LibWeb: Launder const in CSS::Selector::absolutized when returning self

This const method tries to return a RefPtr to non-const self. That's
not kosher, but fixing it needs some architecture work.
This commit is contained in:
Andrew Kaster 2025-04-15 16:02:05 -06:00 committed by Andrew Kaster
parent 16e764ddb6
commit c36c7ed67b
Notes: github-actions[bot] 2025-04-16 16:43:12 +00:00

View file

@ -602,7 +602,7 @@ bool Selector::contains_unknown_webkit_pseudo_element() const
RefPtr<Selector> Selector::absolutized(Selector::SimpleSelector const& selector_for_nesting) const
{
if (!contains_the_nesting_selector())
return *this;
return fixme_launder_const_through_pointer_cast(*this);
Vector<CompoundSelector> absolutized_compound_selectors;
absolutized_compound_selectors.ensure_capacity(m_compound_selectors.size());