LibWeb/SVG: Support url() in the stroke attribute

This allows you to draw gradients in strokes, for example.
This commit is contained in:
Luke Wilde 2023-06-06 20:40:10 +01:00 committed by Andreas Kling
commit 42a183720b
Notes: sideshowbarker 2024-07-17 02:21:14 +09:00
8 changed files with 51 additions and 12 deletions

View file

@ -7453,6 +7453,7 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> Parser::parse_css_value(Property
return parsed_value.release_nonnull();
return ParseError ::SyntaxError;
case PropertyID::Fill:
case PropertyID::Stroke:
if (component_values.size() == 1) {
if (auto parsed_url = FIXME_TRY(parse_url_value(component_values.first())))
return parsed_url.release_nonnull();

View file

@ -1663,8 +1663,10 @@
"affects-layout": false,
"inherited": true,
"initial": "none",
"__comment": "FIXME: Use `paint` as the type, once we have a PaintStyleValue and generic parsing for it.",
"valid-types": [
"color"
"color",
"url"
],
"valid-identifiers": [
"none"