1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

LibWeb: Port CSS::Parser::Block to new Strings

This commit is contained in:
Sam Atkins 2023-02-14 18:49:25 +00:00 committed by Tim Flynn
parent e338ef4914
commit 86d23c63a4
4 changed files with 11 additions and 11 deletions

View file

@ -30,7 +30,7 @@ DeprecatedString ComponentValue::to_deprecated_string() const
{
return m_value.visit(
[](Token const& token) { return token.to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string(); },
[](NonnullRefPtr<Block> const& block) { return block->to_deprecated_string(); },
[](NonnullRefPtr<Block> const& block) { return block->to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string(); },
[](NonnullRefPtr<Function> const& function) { return function->to_deprecated_string(); });
}
@ -41,7 +41,7 @@ ErrorOr<String> ComponentValue::to_debug_string() const
return String::formatted("Token: {}", TRY(token.to_debug_string()));
},
[](NonnullRefPtr<Block> const& block) -> ErrorOr<String> {
return String::formatted("Block: {}", block->to_deprecated_string());
return String::formatted("Block: {}", TRY(block->to_string()));
},
[](NonnullRefPtr<Function> const& function) -> ErrorOr<String> {
return String::formatted("Function: {}", function->to_deprecated_string());