1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:18:12 +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:
MacDue 2023-06-11 16:43:46 +01:00 committed by Andreas Kling
parent ead56e88db
commit 377ff0ac26
13 changed files with 74 additions and 3 deletions

View file

@ -309,6 +309,12 @@ float StyleProperties::stop_opacity() const
return resolve_opacity_value(*value);
}
Optional<CSS::FillRule> StyleProperties::fill_rule() const
{
auto value = property(CSS::PropertyID::FillRule);
return value_id_to_fill_rule(value->to_identifier());
}
Optional<CSS::FlexDirection> StyleProperties::flex_direction() const
{
auto value = property(CSS::PropertyID::FlexDirection);