LibWeb/CSS: Use CSS::URL for font-fetching

ParsedFontFace and FontLoader now both keep track of which
CSSStyleSheet (if any) was the source of the font-face, so the URLs can
be completed correctly.
This commit is contained in:
Sam Atkins 2025-05-02 12:07:22 +01:00
commit 9e2e796f2d
Notes: github-actions[bot] 2025-05-03 11:02:47 +00:00
9 changed files with 38 additions and 31 deletions

View file

@ -8,6 +8,7 @@
#include <AK/FlyString.h>
#include <LibWeb/CSS/CSSStyleValue.h>
#include <LibWeb/CSS/URL.h>
namespace Web::CSS {
@ -16,7 +17,7 @@ public:
struct Local {
NonnullRefPtr<CSSStyleValue const> name;
};
using Source = Variant<Local, ::URL::URL>;
using Source = Variant<Local, URL>;
static ValueComparingNonnullRefPtr<FontSourceStyleValue const> create(Source source, Optional<FlyString> format)
{