mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +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:
@@ -4453,7 +4453,14 @@ Vector<FontFace::Source> Parser::parse_font_face_src(TokenStream<ComponentValue>
|
||||
continue;
|
||||
}
|
||||
|
||||
// FIXME: Implement `local()`.
|
||||
if (first.is_function() && first.function().name().equals_ignoring_ascii_case("local"sv)) {
|
||||
if (first.function().values().is_empty()) {
|
||||
continue;
|
||||
}
|
||||
supported_sources.empend(first.function().values().first().to_string(), Optional<FlyString> {});
|
||||
continue;
|
||||
}
|
||||
|
||||
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: @font-face src invalid (failed to parse url from: {}); discarding.", first.to_debug_string());
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user