1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +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

@ -15,7 +15,7 @@ ErrorOr<String> BorderRadiusStyleValue::to_string() const
{
if (m_properties.horizontal_radius == m_properties.vertical_radius)
return m_properties.horizontal_radius.to_string();
return String::formatted("{} / {}", TRY(m_properties.horizontal_radius.to_string()), TRY(m_properties.vertical_radius.to_string()));
return String::formatted("{} / {}", m_properties.horizontal_radius.to_string(), m_properties.vertical_radius.to_string());
}
ValueComparingNonnullRefPtr<StyleValue const> BorderRadiusStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const