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
@@ -11,11 +11,11 @@
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
ErrorOr<String> BorderRadiusStyleValue::to_string() const
|
||||
String BorderRadiusStyleValue::to_string() const
|
||||
{
|
||||
if (m_properties.horizontal_radius == m_properties.vertical_radius)
|
||||
return m_properties.horizontal_radius.to_string();
|
||||
return 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<StyleValue const> BorderRadiusStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
|
||||
Reference in New Issue
Block a user