mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Make absolutizing StyleValues infallible
This commit is contained in:
committed by
Andreas Kling
parent
e177cef8ff
commit
eca144a75e
@@ -27,7 +27,7 @@ ValueComparingNonnullRefPtr<LengthStyleValue> LengthStyleValue::create(Length co
|
||||
return adopt_ref(*new (nothrow) LengthStyleValue(length));
|
||||
}
|
||||
|
||||
ErrorOr<ValueComparingNonnullRefPtr<StyleValue const>> LengthStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
ValueComparingNonnullRefPtr<StyleValue const> LengthStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
{
|
||||
if (auto length = m_length.absolutize(viewport_rect, font_metrics, root_font_metrics); length.has_value())
|
||||
return LengthStyleValue::create(length.release_value());
|
||||
|
||||
Reference in New Issue
Block a user