LibWeb: Implement the SVG clip-rule attribute

This controls the fill rule used when rasterizing `<clipPath>` elements.
This commit is contained in:
MacDue 2024-05-12 20:19:43 +01:00 committed by Sam Atkins
commit 6c9069fa5d
Notes: sideshowbarker 2024-07-16 22:34:39 +09:00
13 changed files with 74 additions and 8 deletions

View file

@ -804,6 +804,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
if (auto clip_path = computed_style.property(CSS::PropertyID::ClipPath); clip_path->is_url())
computed_values.set_clip_path(clip_path->as_url().url());
if (auto clip_rule = computed_style.clip_rule(); clip_rule.has_value())
computed_values.set_clip_rule(*clip_rule);
if (auto fill_rule = computed_style.fill_rule(); fill_rule.has_value())
computed_values.set_fill_rule(*fill_rule);