mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Make StyleValue::to_string() infallible
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 05:01:20 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/7fe97ee6c5 Pull-request: https://github.com/SerenityOS/serenity/pull/20709
@@ -12,19 +12,19 @@
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
ErrorOr<String> TransformationStyleValue::to_string() const
|
||||
String TransformationStyleValue::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
TRY(builder.try_append(CSS::to_string(m_properties.transform_function)));
|
||||
TRY(builder.try_append('('));
|
||||
builder.append(CSS::to_string(m_properties.transform_function));
|
||||
builder.append('(');
|
||||
for (size_t i = 0; i < m_properties.values.size(); ++i) {
|
||||
TRY(builder.try_append(TRY(m_properties.values[i]->to_string())));
|
||||
builder.append(m_properties.values[i]->to_string());
|
||||
if (i != m_properties.values.size() - 1)
|
||||
TRY(builder.try_append(", "sv));
|
||||
builder.append(", "sv);
|
||||
}
|
||||
TRY(builder.try_append(')'));
|
||||
builder.append(')');
|
||||
|
||||
return builder.to_string();
|
||||
return MUST(builder.to_string());
|
||||
}
|
||||
|
||||
bool TransformationStyleValue::Properties::operator==(Properties const& other) const
|
||||
|
||||
Reference in New Issue
Block a user