LibWeb: Use correct canonical serialization for BorderRadiusStyleValue

This commit is contained in:
Tim Ledbetter 2025-03-18 12:52:58 +00:00 committed by Jelle Raaijmakers
commit f6a8e5aa68
Notes: github-actions[bot] 2025-03-18 20:56:05 +00:00
2 changed files with 4 additions and 5 deletions

View file

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

View file

@ -2,8 +2,7 @@ Harness status: OK
Found 23 tests
21 Pass
2 Fail
23 Pass
Pass e.style['border-radius'] = "initial" should set the property value
Pass e.style['border-radius'] = "inherit" should set the property value
Pass e.style['border-radius'] = "unset" should set the property value
@ -25,5 +24,5 @@ Pass e.style['border-radius'] = "1px 2% 1px 1px" should set the property value
Pass e.style['border-radius'] = "1px 2% 2% 2% / 1px 2% 3px 2%" should set the property value
Pass e.style['border-top-left-radius'] = "10px" should set the property value
Pass e.style['border-top-right-radius'] = "20%" should set the property value
Fail e.style['border-bottom-right-radius'] = "30px 40%" should set the property value
Fail e.style['border-bottom-left-radius'] = "50% 60px" should set the property value
Pass e.style['border-bottom-right-radius'] = "30px 40%" should set the property value
Pass e.style['border-bottom-left-radius'] = "50% 60px" should set the property value