summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-02-11 19:21:38 +0000
committerAndreas Kling <kling@serenityos.org>2022-02-11 21:38:27 +0100
commit9dcc752bcfeb9fcb94aeb6a9f0b222385ec448bd (patch)
tree4a494218e0aa43a9cb8c54f2d281c6511b855822 /Userland/Libraries/LibWeb
parent44b64cb8b01c0712b3262e578934ac0f134353d1 (diff)
downloadserenity-9dcc752bcfeb9fcb94aeb6a9f0b222385ec448bd.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp6
1 files changed, 4 insertions, 2 deletions
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()