LibWeb: Use correct colors for SVGFEFloodElement::flood_color

Previously we would always render floods as black, we now use the
computed color.

We also now support relative lengths within any `calc`s present.
This commit is contained in:
Callum Law 2025-07-19 16:31:03 +12:00 committed by Sam Atkins
commit 344d6199da
Notes: github-actions[bot] 2025-08-04 10:30:18 +00:00
7 changed files with 46 additions and 17 deletions

View file

@ -666,7 +666,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
if (computed_style.filter().has_filters())
computed_values.set_filter(resolve_filter(computed_style.filter()));
computed_values.set_flood_color(computed_style.flood_color(*this));
computed_values.set_flood_color(computed_style.color_or_fallback(CSS::PropertyID::FloodColor, CSS::ColorResolutionContext::for_layout_node_with_style(*this), CSS::InitialValues::flood_color()));
computed_values.set_flood_opacity(computed_style.flood_opacity());
computed_values.set_justify_content(computed_style.justify_content());