diff --git a/Libraries/LibWeb/CSS/Parser/RuleParsing.cpp b/Libraries/LibWeb/CSS/Parser/RuleParsing.cpp index a18455ad8f9..cf662a36505 100644 --- a/Libraries/LibWeb/CSS/Parser/RuleParsing.cpp +++ b/Libraries/LibWeb/CSS/Parser/RuleParsing.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -592,15 +593,6 @@ GC::Ptr Parser::convert_to_property_rule(AtRule const& rule) template Vector Parser::parse_font_face_src(TokenStream& component_values) { - // FIXME: Get this information from the system somehow? - // Format-name table: https://www.w3.org/TR/css-fonts-4/#font-format-definitions - auto font_format_is_supported = [](StringView name) { - // The spec requires us to treat opentype and truetype as synonymous. - if (name.is_one_of_ignoring_ascii_case("opentype"sv, "truetype"sv, "woff"sv, "woff2"sv)) - return true; - return false; - }; - Vector supported_sources; auto list_of_source_token_lists = parse_a_comma_separated_list_of_component_values(component_values); @@ -637,7 +629,7 @@ Vector Parser::parse_font_face_src(TokenStream& compo TokenStream format_tokens { function.value }; format_tokens.discard_whitespace(); auto const& format_name_token = format_tokens.consume_a_token(); - StringView format_name; + FlyString format_name; if (format_name_token.is(Token::Type::Ident)) { format_name = format_name_token.token().ident(); } else if (format_name_token.is(Token::Type::String)) { @@ -652,7 +644,7 @@ Vector Parser::parse_font_face_src(TokenStream& compo continue; } - format = FlyString::from_utf8(format_name).release_value_but_fixme_should_propagate_errors(); + format = move(format_name); } else { dbgln_if(CSS_PARSER_DEBUG, "CSSParser: @font-face src invalid (unrecognized function token `{}`); discarding.", function.name); return {};