mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
LibWeb: Make external StyleValue-parsing methods infallible
This commit is contained in:
parent
9e1bbfbd37
commit
28c2836c24
13 changed files with 70 additions and 70 deletions
|
@ -45,10 +45,10 @@ public:
|
|||
auto font_style_value_result = parse_css_value(parsing_context, font, CSS::PropertyID::Font);
|
||||
|
||||
// If the new value is syntactically incorrect (including using property-independent style sheet syntax like 'inherit' or 'initial'), then it must be ignored, without assigning a new font value.
|
||||
if (font_style_value_result.is_error() || !font_style_value_result.value()) {
|
||||
if (!font_style_value_result) {
|
||||
return;
|
||||
}
|
||||
my_drawing_state().font_style_value = font_style_value_result.value();
|
||||
my_drawing_state().font_style_value = font_style_value_result.release_nonnull();
|
||||
|
||||
// Load font with font style value properties
|
||||
auto const& font_style_value = my_drawing_state().font_style_value->as_font();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue