1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWeb: Make serializing basic CSS types infallible

This commit is contained in:
Sam Atkins 2023-08-22 12:25:30 +01:00 committed by Sam Atkins
parent b5893ee115
commit 6bee81cfb6
38 changed files with 128 additions and 121 deletions

View file

@ -38,15 +38,15 @@ ErrorOr<String> RadialGradientStyleValue::to_string() const
}());
},
[&](CircleSize const& circle_size) -> ErrorOr<void> {
return builder.try_append(TRY(circle_size.radius.to_string()));
return builder.try_append(circle_size.radius.to_string());
},
[&](EllipseSize const& ellipse_size) -> ErrorOr<void> {
return builder.try_appendff("{} {}", TRY(ellipse_size.radius_a.to_string()), TRY(ellipse_size.radius_b.to_string()));
return builder.try_appendff("{} {}", ellipse_size.radius_a.to_string(), ellipse_size.radius_b.to_string());
}));
if (m_properties.position != PositionValue::center()) {
TRY(builder.try_appendff(" at "sv));
TRY(m_properties.position.serialize(builder));
m_properties.position.serialize(builder);
}
TRY(builder.try_append(", "sv));