mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
@@ -19,7 +19,7 @@ class ConicGradientStyleValue final : public AbstractImageStyleValue {
|
||||
public:
|
||||
static ValueComparingNonnullRefPtr<ConicGradientStyleValue> create(Angle from_angle, ValueComparingNonnullRefPtr<PositionStyleValue> position, Vector<AngularColorStopListElement> color_stop_list, GradientRepeating repeating)
|
||||
{
|
||||
VERIFY(color_stop_list.size() >= 2);
|
||||
VERIFY(!color_stop_list.is_empty());
|
||||
return adopt_ref(*new (nothrow) ConicGradientStyleValue(from_angle, move(position), move(color_stop_list), repeating));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user