From 9dcc752bcfeb9fcb94aeb6a9f0b222385ec448bd Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 11 Feb 2022 19:21:38 +0000 Subject: 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. --- Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Userland') diff --git a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp index 8387f031b2..d4723ba21c 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp @@ -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); - if (name == "d") + if (name == "d") { m_instructions = AttributeParser::parse_path_data(value); + m_path.clear(); + } } Gfx::Path& SVGPathElement::get_path() -- cgit v1.2.3