LibWeb: Convert CSS Token::to_debug_string() to ::to_string() :^)

Using from_utf8_short_string() for all cases that are <= 3 bytes long.
Which is almost all of the static ones.
This commit is contained in:
Sam Atkins 2023-02-11 16:47:52 +00:00 committed by Linus Groh
commit 476ec563bc
Notes: sideshowbarker 2024-07-17 04:32:07 +09:00
4 changed files with 30 additions and 30 deletions

View file

@ -29,7 +29,7 @@ ComponentValue::~ComponentValue() = default;
DeprecatedString ComponentValue::to_deprecated_string() const
{
return m_value.visit(
[](Token const& token) { return token.to_deprecated_string(); },
[](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<Function> const& function) { return function->to_deprecated_string(); });
}