Skip to content

Commit 1d2f9c2

Browse files
committed
clear cache on child mutation
1 parent dbe17a6 commit 1d2f9c2

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

components/script/dom/svgsvgelement.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,11 @@ impl VirtualMethods for SVGSVGElement {
119119
}
120120
}
121121

122-
// fn children_changed(&self, mutation: &super::node::ChildrenMutation) {
123-
// self.super_type()
124-
// .map(|parent| parent.children_changed(mutation));
125-
// println!("XXX children_changed");
126-
// let source: String = self
127-
// .upcast::<Node>()
128-
// .html_serialize(TraversalScope::IncludeNode, false, vec![], CanGc::note())
129-
// .into();
130-
// let base64 = base64::engine::general_purpose::STANDARD.encode(source);
131-
// let source = format!("data:image/svg+xml;base64,{}", base64);
132-
// *self.serialized_data_url.borrow_mut() = source;
133-
// }
122+
fn children_changed(&self, mutation: &super::node::ChildrenMutation) {
123+
if let Some(super_type) = self.super_type() {
124+
super_type.children_changed(mutation);
125+
}
126+
127+
*self.cached_serialized_data.borrow_mut() = None;
128+
}
134129
}

0 commit comments

Comments
 (0)