LibWeb: Make CSSStyleRule::qualified_layer_name() return a const-ref

And also make it inline. We were spending 8% of selector matching on
creating and destroying FlyString copies here. With this change, it's
now ~1%.
This commit is contained in:
Andreas Kling 2024-09-09 17:35:13 +02:00 committed by Andreas Kling
commit b2aff403fc
Notes: github-actions[bot] 2024-09-09 18:13:00 +00:00
4 changed files with 34 additions and 34 deletions

View file

@ -33,7 +33,7 @@ public:
CSSStyleDeclaration* style();
FlyString qualified_layer_name() const;
[[nodiscard]] FlyString const& qualified_layer_name() const { return parent_layer_internal_qualified_name(); }
private:
CSSStyleRule(JS::Realm&, Vector<NonnullRefPtr<Selector>>&&, PropertyOwningCSSStyleDeclaration&);