summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-02-18 15:13:29 +0000
committerLinus Groh <mail@linusgroh.de>2023-02-19 00:51:16 +0100
commitc2f0b20d6ba028fcc094dea4d1108b80f6170d55 (patch)
tree741636ebb6a8765195f158115403b97c6e528934 /Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
parent33e9c4e1b2f4e678cef0e3d49b1754c1807ac2a3 (diff)
downloadserenity-c2f0b20d6ba028fcc094dea4d1108b80f6170d55.zip
LibWeb: Port FontFace to new Strings
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index 84ca9c5c7e..cffd2e6b97 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -5300,7 +5300,7 @@ CSSRule* Parser::parse_font_face_rule(TokenStream<ComponentValue>& tokens)
{
auto declarations_and_at_rules = parse_a_list_of_declarations(tokens);
- Optional<DeprecatedFlyString> font_family;
+ Optional<FlyString> font_family;
Vector<FontFace::Source> src;
Vector<UnicodeRange> unicode_range;
@@ -5352,7 +5352,7 @@ CSSRule* Parser::parse_font_face_rule(TokenStream<ComponentValue>& tokens)
if (had_syntax_error || font_family_parts.is_empty())
continue;
- font_family = DeprecatedString::join(' ', font_family_parts);
+ font_family = String::join(' ', font_family_parts).release_value_but_fixme_should_propagate_errors();
continue;
}
if (declaration.name().equals_ignoring_case("src"sv)) {
@@ -5423,7 +5423,7 @@ Vector<FontFace::Source> Parser::parse_font_face_src(TokenStream<ComponentValue>
// FIXME: Implement optional tech() function from CSS-Fonts-4.
if (auto maybe_url = parse_url_function(first, AllowedDataUrlType::Font); maybe_url.has_value()) {
auto url = maybe_url.release_value();
- Optional<DeprecatedFlyString> format;
+ Optional<FlyString> format;
source_tokens.skip_whitespace();
if (!source_tokens.has_next_token()) {
@@ -5457,7 +5457,7 @@ Vector<FontFace::Source> Parser::parse_font_face_src(TokenStream<ComponentValue>
continue;
}
- format = format_name;
+ format = FlyString::from_utf8(format_name).release_value_but_fixme_should_propagate_errors();
} else {
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: @font-face src invalid (unrecognized function token `{}`); discarding.", function.name());
return {};