mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb/CSS: Fix linear-gradient single color-stop usage
The Web::CSS::Parser's GradientParsing ignores color-stops if it is only a single one. This change allows to have color-stops with double positions against a single color. Further, also allows for `linear-gradient(black)` and similar other gradient functions
This commit is contained in:
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
static ValueComparingNonnullRefPtr<RadialGradientStyleValue> create(EndingShape ending_shape, Size size, ValueComparingNonnullRefPtr<PositionStyleValue> position, Vector<LinearColorStopListElement> color_stop_list, GradientRepeating repeating)
|
||||
{
|
||||
VERIFY(color_stop_list.size() >= 2);
|
||||
VERIFY(!color_stop_list.is_empty());
|
||||
return adopt_ref(*new (nothrow) RadialGradientStyleValue(ending_shape, size, move(position), move(color_stop_list), repeating));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user