mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:28:11 +00:00
LibWeb: Support repeating-radial-gradient()
s
This commit is contained in:
parent
f539bf467c
commit
28028be2fc
4 changed files with 17 additions and 5 deletions
|
@ -2655,8 +2655,14 @@ RefPtr<StyleValue> Parser::parse_radial_gradient_function(ComponentValue const&
|
|||
if (!component_value.is_function())
|
||||
return {};
|
||||
|
||||
auto repeating_gradient = GradientRepeating::No;
|
||||
|
||||
auto function_name = component_value.function().name();
|
||||
|
||||
function_name = consume_if_starts_with(function_name, "repeating-"sv, [&] {
|
||||
repeating_gradient = GradientRepeating::Yes;
|
||||
});
|
||||
|
||||
if (!function_name.equals_ignoring_case("radial-gradient"sv))
|
||||
return {};
|
||||
|
||||
|
@ -2786,7 +2792,7 @@ RefPtr<StyleValue> Parser::parse_radial_gradient_function(ComponentValue const&
|
|||
if (!color_stops.has_value())
|
||||
return {};
|
||||
|
||||
return RadialGradientStyleValue::create(ending_shape, size, at_position, move(*color_stops));
|
||||
return RadialGradientStyleValue::create(ending_shape, size, at_position, move(*color_stops), repeating_gradient);
|
||||
}
|
||||
|
||||
Optional<PositionValue> Parser::parse_position(TokenStream<ComponentValue>& tokens, PositionValue initial_value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue