LibWeb/CSS: Make StringStyleValue hold a FlyString

We already have a FlyString of its value from parsing, and most users
also want a FlyString from it, so let's use that instead of converting
backwards and forwards.

The two users that did want a String are:
- Quotes, which make sense as FlyString instead, so I've converted that.
- Animation names, which should probably be FlyString too, but the code
  currently also allows for other kinds of StyleValue, and I don't want
  to dive into this right now to figure out if that's needed or not.
This commit is contained in:
Sam Atkins 2024-07-17 12:42:12 +01:00 committed by Tim Ledbetter
commit 9fb44cb057
Notes: sideshowbarker 2024-07-18 02:44:48 +09:00
5 changed files with 15 additions and 14 deletions

View file

@ -6,6 +6,7 @@
#pragma once
#include <AK/FlyString.h>
#include <AK/Optional.h>
#include <LibGfx/FontCascadeList.h>
#include <LibGfx/ScalingMode.h>
@ -49,7 +50,7 @@ struct QuotesData {
Auto,
Specified,
} type;
Vector<Array<String, 2>> strings {};
Vector<Array<FlyString, 2>> strings {};
};
struct ResolvedBackdropFilter {