mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibWeb: Propagate errors from absolutizing StyleValues
This commit is contained in:
parent
d16600a48b
commit
d732a83de8
10 changed files with 20 additions and 20 deletions
|
@ -27,10 +27,10 @@ ErrorOr<ValueComparingNonnullRefPtr<LengthStyleValue>> LengthStyleValue::create(
|
|||
return adopt_nonnull_ref_or_enomem(new (nothrow) LengthStyleValue(length));
|
||||
}
|
||||
|
||||
ValueComparingNonnullRefPtr<StyleValue const> LengthStyleValue::absolutized(CSSPixelRect const& viewport_rect, Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const
|
||||
ErrorOr<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()).release_value_but_fixme_should_propagate_errors();
|
||||
return LengthStyleValue::create(length.release_value());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue