mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibWeb: Allow specifying a URL for an SVG fill
This does not do anything yet, but will allow for gradients later!
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 18:13:59 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/a5fa5e55ef Pull-request: https://github.com/SerenityOS/serenity/pull/18473 Reviewed-by: https://github.com/nico
@@ -519,6 +519,12 @@ bool property_accepts_value(PropertyID property_id, StyleValue& style_value)
|
||||
output_numeric_value_check(property_generator, "is_time"sv, "as_time().time().to_seconds()"sv, Array { "Time"sv }, min_value, max_value);
|
||||
} else if (type_name == "url") {
|
||||
// FIXME: Handle urls!
|
||||
} else if (type_name == "paint") {
|
||||
// https://svgwg.org/svg2-draft/painting.html#SpecifyingPaint
|
||||
property_generator.append(R"~~~(
|
||||
if (style_value.has_color() || style_value.is_url())
|
||||
return true;
|
||||
)~~~");
|
||||
} else {
|
||||
// Assume that any other type names are defined in Enums.json.
|
||||
// If they're not, the output won't compile, but that's fine since it's invalid.
|
||||
|
||||
Reference in New Issue
Block a user