mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
LibWeb: Parse src: local(...) in CSS @font-face rules
Note that we don't load the local font as specified, but at least we no longer reject such src properties in the CSS parser. This makes the custom fonts used on http://apple.com/ actually load. :^)
This commit is contained in:
@@ -2827,7 +2827,9 @@ void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)
|
||||
Vector<AK::URL> urls;
|
||||
for (auto& source : font_face.sources()) {
|
||||
// FIXME: These should be loaded relative to the stylesheet URL instead of the document URL.
|
||||
urls.append(m_document->parse_url(source.url.to_deprecated_string()));
|
||||
if (source.local_or_url.has<AK::URL>())
|
||||
urls.append(m_document->parse_url(source.local_or_url.get<AK::URL>().to_deprecated_string()));
|
||||
// FIXME: Handle local()
|
||||
}
|
||||
|
||||
if (urls.is_empty())
|
||||
|
||||
Reference in New Issue
Block a user