Fix "a serious bug" in the bind_to_tree functions

This commit is contained in:
Michael Howell 2016-12-06 00:42:29 +00:00
parent 479a2c1217
commit f8121ae60d
2 changed files with 9 additions and 3 deletions

View file

@ -71,9 +71,12 @@ impl VirtualMethods for HTMLTitleElement {
}
}
fn bind_to_tree(&self, is_in_doc: bool) {
fn bind_to_tree(&self, tree_in_doc: bool) {
if let Some(ref s) = self.super_type() {
s.bind_to_tree(tree_in_doc);
}
let node = self.upcast::<Node>();
if is_in_doc {
if tree_in_doc {
node.owner_doc().title_changed();
}
}