Repository: LadybirdBrowser/ladybird
File: Libraries/LibWeb/CSS/Interpolation.cpp (C++)

Code before:
        auto interpolated_top = interpolate_value(element, calculation_context, from_border_image_slice.top(), to_border_image_slice.top(), delta, allow_discrete);
        auto interpolated_right = interpolate_value(element, calculation_context, from_border_image_slice.right(), to_border_image_slice.right(), delta, allow_discrete);
        auto interpolated_bottom = interpolate_value(element, calculation_context, from_border_image_slice.bottom(), to_border_image_slice.bottom(), delta, allow_discrete);
        auto interpolated_left = interpolate_value(element, calculation_context, from_border_image_slice.left(), to_border_image_slice.left(), delta, allow_discrete);
        if (!interpolated_top || !interpolated_right || !interpolated_bottom || !interpolated_left)
            return {};
        return BorderImageSliceStyleValue::create(
            interpolated_top.release_nonnull(),
            interpolated_right.release_nonnull(),
            interpolated_bottom.release_nonnull(),
            interpolated_left.release_nonnull(),
            from_border_image_slice.fill());
    }
    case StyleValue::Type::BorderRadius: {
        auto const& from_horizontal_radius = from.as_border_radius().horizontal_radius();
        auto const& to_horizontal_radius = to.as_border_radius().horizontal_radius();
        auto const& from_vertical_radius = from.as_border_radius().vertical_radius();
        auto const& to_vertical_radius = to.as_border_radius().vertical_radius();
        auto const interpolated_horizontal_radius = interpolate_length_percentage(calculation_context, from_horizontal_radius, to_horizontal_radius, delta);
        auto const interpolated_vertical_radius = interpolate_length_percentage(calculation_context, from_vertical_radius, to_vertical_radius, delta);
        if (!interpolated_horizontal_radius.has_value() || !interpolated_vertical_radius.has_value())
            return {};
        return BorderRadiusStyleValue::create(
            interpolated_horizontal_radius.value(),
            interpolated_vertical_radius.value()
            );
    }
    case StyleValue::Type::Color: {
        ColorResolutionContext color_resolution_context {};
        if (auto node = element.layout_node()) {
            color_resolution_context = ColorResolutionContext::for_layout_node_with_style(*element.layout_node());
        }

        auto color_syntax = ColorSyntax::Legacy;
        if ((!from.is_keyword() && from.as_color().color_syntax() == ColorSyntax::Modern)
            || (!to.is_keyword() && to.as_color().color_syntax() == ColorSyntax::Modern)) {
            color_syntax = ColorSyntax::Modern;
        }

        // FIXME: If we aren't able to resolve the colors here, we should postpone interpolation until we can (perhaps
        //        by creating something similar to a ColorMixStyleValue).
        auto from_color = from.to_color(color_resolution_context);
        auto to_color = to.to_color(color_resolution_context);

        Color interpolated_color = Color::Black;

        if (from_color.has_value() && to_color.has_value())
            interpolated_color = interpolate_color(from_color.value(), to_color.value(), delta, color_syntax);

        return ColorStyleValue::create_from_color(interpolated_color, ColorSyntax::Modern);
    }

Review comment (suggestion):
The linter on CI is complaining about this.
```suggestion
            interpolated_vertical_radius.value());
```

Code after:
        auto interpolated_top = interpolate_value(element, calculation_context, from_border_image_slice.top(), to_border_image_slice.top(), delta, allow_discrete);
        auto interpolated_right = interpolate_value(element, calculation_context, from_border_image_slice.right(), to_border_image_slice.right(), delta, allow_discrete);
        auto interpolated_bottom = interpolate_value(element, calculation_context, from_border_image_slice.bottom(), to_border_image_slice.bottom(), delta, allow_discrete);
        auto interpolated_left = interpolate_value(element, calculation_context, from_border_image_slice.left(), to_border_image_slice.left(), delta, allow_discrete);
        if (!interpolated_top || !interpolated_right || !interpolated_bottom || !interpolated_left)
            return {};
        return BorderImageSliceStyleValue::create(
            interpolated_top.release_nonnull(),
            interpolated_right.release_nonnull(),
            interpolated_bottom.release_nonnull(),
            interpolated_left.release_nonnull(),
            from_border_image_slice.fill());
    }
    case StyleValue::Type::BorderRadius: {
        auto const& from_horizontal_radius = from.as_border_radius().horizontal_radius();
        auto const& to_horizontal_radius = to.as_border_radius().horizontal_radius();
        auto const& from_vertical_radius = from.as_border_radius().vertical_radius();
        auto const& to_vertical_radius = to.as_border_radius().vertical_radius();
        auto const interpolated_horizontal_radius = interpolate_length_percentage(calculation_context, from_horizontal_radius, to_horizontal_radius, delta);
        auto const interpolated_vertical_radius = interpolate_length_percentage(calculation_context, from_vertical_radius, to_vertical_radius, delta);
        if (!interpolated_horizontal_radius.has_value() || !interpolated_vertical_radius.has_value())
            return {};
        return BorderRadiusStyleValue::create(
            interpolated_horizontal_radius.value(),
            interpolated_vertical_radius.value());
    }
    case StyleValue::Type::Color: {
        ColorResolutionContext color_resolution_context {};
        if (auto node = element.layout_node()) {
            color_resolution_context = ColorResolutionContext::for_layout_node_with_style(*element.layout_node());
        }

        auto color_syntax = ColorSyntax::Legacy;
        if ((!from.is_keyword() && from.as_color().color_syntax() == ColorSyntax::Modern)
            || (!to.is_keyword() && to.as_color().color_syntax() == ColorSyntax::Modern)) {
            color_syntax = ColorSyntax::Modern;
        }

        // FIXME: If we aren't able to resolve the colors here, we should postpone interpolation until we can (perhaps
        //        by creating something similar to a ColorMixStyleValue).
        auto from_color = from.to_color(color_resolution_context);
        auto to_color = to.to_color(color_resolution_context);

        Color interpolated_color = Color::Black;

        if (from_color.has_value() && to_color.has_value())
            interpolated_color = interpolate_color(from_color.value(), to_color.value(), delta, color_syntax);

        return ColorStyleValue::create_from_color(interpolated_color, ColorSyntax::Modern);
    }
    case StyleValue::Type::Edge: {