mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
LibWeb: Implement SVG fill-rule
attribute
Previously, we did an evenodd fill for everything which while for most SVGs works, it is not correct default (it should be nonzero), and broke some SVGs. This fixes a few of the icons on https://shopify.com/.
This commit is contained in:
parent
ead56e88db
commit
377ff0ac26
13 changed files with 74 additions and 3 deletions
|
@ -705,6 +705,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
else if (stroke_width->is_percentage())
|
||||
computed_values.set_stroke_width(CSS::LengthPercentage { stroke_width->as_percentage().percentage() });
|
||||
|
||||
if (auto fill_rule = computed_style.fill_rule(); fill_rule.has_value())
|
||||
computed_values.set_fill_rule(*fill_rule);
|
||||
|
||||
computed_values.set_fill_opacity(computed_style.fill_opacity());
|
||||
computed_values.set_stroke_opacity(computed_style.stroke_opacity());
|
||||
computed_values.set_stop_opacity(computed_style.stop_opacity());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue