mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-23 01:38:56 +00:00
LibWeb: Propagate errors from absolutizing StyleValues
This commit is contained in:
parent
d16600a48b
commit
d732a83de8
Notes:
sideshowbarker
2024-07-17 05:19:06 +09:00
Author: https://github.com/AtkinsSJ
Commit: d732a83de8
Pull-request: https://github.com/SerenityOS/serenity/pull/18607
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