mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 16:42:54 +00:00
LibWeb: Make external StyleValue-parsing methods infallible
This commit is contained in:
parent
9e1bbfbd37
commit
28c2836c24
Notes:
sideshowbarker
2024-07-17 01:12:07 +09:00
Author: https://github.com/AtkinsSJ
Commit: 28c2836c24
Pull-request: https://github.com/SerenityOS/serenity/pull/20663
13 changed files with 70 additions and 70 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue