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

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

This commit is contained in:
Sam Atkins 2023-02-14 19:04:12 +00:00 committed by Tim Flynn
parent 05c1b09621
commit a168cda4a7
4 changed files with 13 additions and 13 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -26,12 +26,12 @@ ComponentValue::ComponentValue(NonnullRefPtr<Block> block)
ComponentValue::~ComponentValue() = default;
DeprecatedString ComponentValue::to_deprecated_string() const
ErrorOr<String> ComponentValue::to_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_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string(); },
[](NonnullRefPtr<Function> const& function) { return function->to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string(); });
[](Token const& token) { return token.to_string(); },
[](NonnullRefPtr<Block> const& block) { return block->to_string(); },
[](NonnullRefPtr<Function> const& function) { return function->to_string(); });
}
ErrorOr<String> ComponentValue::to_debug_string() const