mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
LibWeb: Clear the path of a SVGPathElement if the attribute changes
Otherwise, modifying the `d` attribute would not cause any visual changes to the path.
This commit is contained in:
parent
44b64cb8b0
commit
9dcc752bcf
1 changed files with 4 additions and 2 deletions
|
@ -88,12 +88,14 @@ SVGPathElement::SVGPathElement(DOM::Document& document, QualifiedName qualified_
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void SVGPathElement::parse_attribute(const FlyString& name, const String& value)
|
void SVGPathElement::parse_attribute(FlyString const& name, String const& value)
|
||||||
{
|
{
|
||||||
SVGGeometryElement::parse_attribute(name, value);
|
SVGGeometryElement::parse_attribute(name, value);
|
||||||
|
|
||||||
if (name == "d")
|
if (name == "d") {
|
||||||
m_instructions = AttributeParser::parse_path_data(value);
|
m_instructions = AttributeParser::parse_path_data(value);
|
||||||
|
m_path.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx::Path& SVGPathElement::get_path()
|
Gfx::Path& SVGPathElement::get_path()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue