mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-19 01:22: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
|
@ -33,11 +33,11 @@ void SVGStopElement::apply_presentational_hints(CSS::StyleProperties& style) con
|
|||
for_each_attribute([&](auto& name, auto& value) {
|
||||
CSS::Parser::ParsingContext parsing_context { document() };
|
||||
if (name.equals_ignoring_ascii_case("stop-color"sv)) {
|
||||
if (auto stop_color = parse_css_value(parsing_context, value, CSS::PropertyID::StopColor).release_value_but_fixme_should_propagate_errors()) {
|
||||
if (auto stop_color = parse_css_value(parsing_context, value, CSS::PropertyID::StopColor)) {
|
||||
style.set_property(CSS::PropertyID::StopColor, stop_color.release_nonnull());
|
||||
}
|
||||
} else if (name.equals_ignoring_ascii_case("stop-opacity"sv)) {
|
||||
if (auto stop_opacity = parse_css_value(parsing_context, value, CSS::PropertyID::StopOpacity).release_value_but_fixme_should_propagate_errors()) {
|
||||
if (auto stop_opacity = parse_css_value(parsing_context, value, CSS::PropertyID::StopOpacity)) {
|
||||
style.set_property(CSS::PropertyID::StopOpacity, stop_opacity.release_nonnull());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue