mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibWeb: Make absolutizing StyleValues infallible
This commit is contained in:
parent
e177cef8ff
commit
eca144a75e
10 changed files with 17 additions and 18 deletions
|
@ -18,7 +18,7 @@ ErrorOr<String> BorderRadiusStyleValue::to_string() const
|
|||
return String::formatted("{} / {}", TRY(m_properties.horizontal_radius.to_string()), TRY(m_properties.vertical_radius.to_string()));
|
||||
}
|
||||
|
||||
ErrorOr<ValueComparingNonnullRefPtr<StyleValue const>> BorderRadiusStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
ValueComparingNonnullRefPtr<StyleValue const> BorderRadiusStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
{
|
||||
if (m_properties.horizontal_radius.is_percentage() && m_properties.vertical_radius.is_percentage())
|
||||
return *this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue