diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-14 20:50:41 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-02-15 12:48:26 -0500 |
commit | 85f3de6331d687437c91d6c059349ac43206d969 (patch) | |
tree | d779a311e0f30de34b6c960163f0f299cd13e59f /Userland/Libraries/LibWeb/CSS/Parser/Token.cpp | |
parent | a0b1eddc56eebdfab7f8223b3ac9a6bf687a4190 (diff) | |
download | serenity-85f3de6331d687437c91d6c059349ac43206d969.zip |
LibWeb: Port CSS/Serialize.{h,cpp} to new Strings, and propagate errors
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Parser/Token.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Token.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp index 2fc5e340fc..db07758519 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp @@ -18,26 +18,26 @@ ErrorOr<String> Token::to_string() const case Type::EndOfFile: return String {}; case Type::Ident: - return String::from_utf8(serialize_an_identifier(ident())); + return serialize_an_identifier(ident()); case Type::Function: - return String::formatted("{}(", serialize_an_identifier(function())); + return String::formatted("{}(", TRY(serialize_an_identifier(function()))); case Type::AtKeyword: - return String::formatted("@{}", serialize_an_identifier(at_keyword())); + return String::formatted("@{}", TRY(serialize_an_identifier(at_keyword()))); case Type::Hash: { switch (m_hash_type) { case HashType::Id: - return String::formatted("#{}", serialize_an_identifier(hash_value())); + return String::formatted("#{}", TRY(serialize_an_identifier(hash_value()))); case HashType::Unrestricted: return String::formatted("#{}", hash_value()); } VERIFY_NOT_REACHED(); } case Type::String: - return String::from_utf8(serialize_a_string(string())); + return serialize_a_string(string()); case Type::BadString: return String {}; case Type::Url: - return String::from_utf8(serialize_a_url(url())); + return serialize_a_url(url()); case Type::BadUrl: return String::from_utf8("url()"sv); case Type::Delim: |