LibWeb: Make CSSRule::type() non-virtual

All its overrides return constants, and without virtual dispatch the
`qualified_layer_name` and `absolutized_selectors` functions can benefit
from slightly better optimizations.

`CSSRule`s aren't allocated that often, so the memory impact is minimal.
This commit is contained in:
Jonne Ransijn 2024-10-28 20:16:28 +01:00 committed by Andreas Kling
commit 5c1bbd3eff
Notes: github-actions[bot] 2024-10-28 21:56:20 +00:00
30 changed files with 23 additions and 42 deletions

View file

@ -20,8 +20,6 @@ public:
virtual ~CSSLayerStatementRule() = default;
virtual Type type() const override { return Type::LayerStatement; }
// FIXME: Should be FrozenArray
ReadonlySpan<FlyString> name_list() const { return m_name_list; }
Vector<FlyString> internal_qualified_name_list(Badge<StyleComputer>) const;