mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibWeb: Use correct canonical serialization for BorderRadiusStyleValue
This commit is contained in:
parent
85728b297f
commit
f6a8e5aa68
Notes:
github-actions[bot]
2025-03-18 20:56:05 +00:00
Author: https://github.com/tcl3
Commit: f6a8e5aa68
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3982
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
2 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue