1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

LibWeb: Fix parsing bug for SVG attributes

This doesn't seem to actually have fixed any bugs, as having
FillOpacity instead of StrokeOpacity in the call to parse_css_value
doesn't seem to have actually been causing bugs. But, I still think it's
worthwhile correcting.

The reason that it wasn't causing bugs is that having FillOpacity
instead of StrokeOpacity in the call to parse_css_value means that when
parsing the value is compared to the acceptable values for that property
(for example the value can only be a percentage, or a number, etc.). In
this case both FillOpacity and StrokeOpacity seem to accept the same
values.
This commit is contained in:
martinfalisse 2023-08-16 17:47:52 +02:00 committed by Andreas Kling
parent f2047a5c32
commit 70919dbed7
3 changed files with 30 additions and 3 deletions

View file

@ -0,0 +1,11 @@
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<circle
cx="40"
cy="40"
r="25"
stroke-opacity="50%"
fill-opacity="20%"
stroke="green"
opacity="90%"
stroke-width="20" />
</svg>

After

Width:  |  Height:  |  Size: 225 B