LibWeb: Make external StyleValue-parsing methods infallible

This commit is contained in:
Sam Atkins 2023-08-19 15:01:21 +01:00 committed by Andreas Kling
parent 9e1bbfbd37
commit 28c2836c24
Notes: sideshowbarker 2024-07-17 01:12:07 +09:00
13 changed files with 70 additions and 70 deletions

View file

@ -52,10 +52,10 @@ void SVGForeignObjectElement::apply_presentational_hints(CSS::StyleProperties& s
{
Base::apply_presentational_hints(style);
auto parsing_context = CSS::Parser::ParsingContext { document() };
if (auto width_value = parse_css_value(parsing_context, attribute(Web::HTML::AttributeNames::width), CSS::PropertyID::Width).release_value_but_fixme_should_propagate_errors())
if (auto width_value = parse_css_value(parsing_context, attribute(Web::HTML::AttributeNames::width), CSS::PropertyID::Width))
style.set_property(CSS::PropertyID::Width, width_value.release_nonnull());
if (auto height_value = parse_css_value(parsing_context, attribute(Web::HTML::AttributeNames::height), CSS::PropertyID::Height).release_value_but_fixme_should_propagate_errors())
if (auto height_value = parse_css_value(parsing_context, attribute(Web::HTML::AttributeNames::height), CSS::PropertyID::Height))
style.set_property(CSS::PropertyID::Height, height_value.release_nonnull());
}